www in docker support

This commit is contained in:
MaddoScientisto 2026-04-22 18:41:37 +02:00
commit c227fce036
2145 changed files with 399596 additions and 58 deletions

View file

@ -0,0 +1,74 @@
package it.acxent.tarop.servlet;
import it.acxent.db.CRAdapter;
import it.acxent.db.DBAdapter;
import it.acxent.tarop.Opzione;
import it.acxent.tarop.OpzioneCR;
import it.acxent.tarop.Tariffa;
import it.acxent.tarop.TariffaCR;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet(urlPatterns = {"/Opzione.abl"})
public class OpzioneSvlt extends _TaropSvlt {
protected void fillComboAfterDetail(DBAdapter l_bean, HttpServletRequest req, HttpServletResponse res) {
Opzione bean = (Opzione)l_bean;
if (getCmd(req).equals("md")) {
req.setAttribute("listaTariffaOpzioni", bean.getTariffe(0, 0));
req.setAttribute("listaOpzioniTelefoni", bean.getOpzioniArticoli());
}
}
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
protected DBAdapter getBean(HttpServletRequest req) {
return new Opzione(getApFull(req));
}
protected CRAdapter getBeanCR(HttpServletRequest req) {
return new OpzioneCR(getApFull(req));
}
protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
protected String getCRAttribute(HttpServletRequest req) {
return "CRT";
}
protected void otherCommands(HttpServletRequest req, HttpServletResponse res) {
String cmd = getCmd(req);
if (cmd.equals("main")) {
main(req, res);
} else if (cmd.equals("detail")) {
dettaglio(req, res);
} else {
search(req, res);
}
}
protected void main(HttpServletRequest req, HttpServletResponse res) {
forceJspPageRelative("tariffePromozioni.jsp", req);
callJsp(req, res);
}
protected void dettaglio(HttpServletRequest req, HttpServletResponse res) {
try {
setJspPageRelative("tariffaCR.jsp", req);
TariffaCR CR = new TariffaCR(getApFull(req));
fillObject(req, CR);
req.setAttribute("CRT", CR);
Tariffa bean = new Tariffa(getApFull(req));
req.setAttribute("list", bean.findWebByCR(CR, 0, 0));
Opzione opzione = new Opzione(getApFull(req));
OpzioneCR CRO = new OpzioneCR(getApFull(req));
fillObject(req, CRO);
req.setAttribute("listaOpzioni", opzione.findWebByCR(CRO, 0, 0));
callJsp(req, res);
} catch (Exception e) {
e.printStackTrace();
forceMessage(req, e.getMessage());
}
showBean(req, res);
}
}

View file

@ -0,0 +1,93 @@
package it.acxent.tarop.servlet;
import it.acxent.contab.Documento;
import it.acxent.db.CRAdapter;
import it.acxent.db.DBAdapter;
import it.acxent.db.ResParm;
import it.acxent.tarop.Opzione;
import it.acxent.tarop.OpzioneCR;
import it.acxent.tarop.Tariffa;
import it.acxent.tarop.TariffaCR;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet(urlPatterns = {"/Tariffa.abl"})
public class TariffaSvlt extends _TaropSvlt {
protected void fillComboAfterDetail(DBAdapter l_bean, HttpServletRequest req, HttpServletResponse res) {
Tariffa bean = (Tariffa)l_bean;
if (getCmd(req).equals("md"))
req.setAttribute("listaOpzioniTariffa", bean.getOpzioni(0, 0));
}
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
protected DBAdapter getBean(HttpServletRequest req) {
return new Tariffa(getApFull(req));
}
protected CRAdapter getBeanCR(HttpServletRequest req) {
return new TariffaCR(getApFull(req));
}
protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
protected void refreshPayment(HttpServletRequest req, HttpServletResponse res) {
try {
long l_id_documento = getRequestLongParameter(req, "id_documento");
Documento bean = new Documento(getApFull(req));
bean.findByPrimaryKey(l_id_documento);
long l_id_tipoPagamento = getRequestLongParameter(req, "id_tipoPagamento");
bean.setId_tipoPagamento(l_id_tipoPagamento);
ResParm rp = bean.save();
String theMsg = "";
req.setAttribute("bean", bean);
forceJspPageRelative("Documento.jsp", req);
callJsp(req, res);
} catch (Exception e) {
e.printStackTrace();
forceMessage(req, e.getMessage());
showBean(req, res);
}
}
protected String getCRAttribute(HttpServletRequest req) {
return "CRT";
}
protected void otherCommands(HttpServletRequest req, HttpServletResponse res) {
String cmd = getCmd(req);
if (cmd.equals("main")) {
main(req, res);
} else if (cmd.equals("detail")) {
dettaglio(req, res);
} else {
search(req, res);
}
}
protected void main(HttpServletRequest req, HttpServletResponse res) {
forceJspPageRelative("tariffePromozioni.jsp", req);
callJsp(req, res);
}
protected void dettaglio(HttpServletRequest req, HttpServletResponse res) {
try {
setJspPageRelative("tariffaCR.jsp", req);
TariffaCR CR = new TariffaCR(getApFull(req));
fillObject(req, CR);
req.setAttribute("CRT", CR);
Tariffa bean = new Tariffa(getApFull(req));
req.setAttribute("list", bean.findWebByCR(CR, 0, 0));
Opzione opzione = new Opzione(getApFull(req));
OpzioneCR CRO = new OpzioneCR(getApFull(req));
fillObject(req, CRO);
req.setAttribute("listaOpzioni", opzione.findWebByCR(CRO, 0, 0));
callJsp(req, res);
} catch (Exception e) {
e.printStackTrace();
forceMessage(req, e.getMessage());
}
showBean(req, res);
}
}

View file

@ -0,0 +1,56 @@
package it.acxent.tarop.servlet;
import it.acxent.common.Users;
import it.acxent.servlet.AblServletSvlt;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public abstract class _TaropSvlt extends AblServletSvlt {
protected boolean checkLoginProfile(HttpServletRequest req) {
try {
if (getLoginUser(req) == null) {
forceJspPage(getLoginPage(null, null), req);
return true;
}
if (getLoginUser(req).getFlgValido().equals("N")) {
forceJspPage(super.getLoginPage(null, null), req);
req.getSession().removeAttribute("loginUser_id");
req.getSession().removeAttribute("utenteLogon");
return false;
}
if (getLoginUser(req).getId_userProfile() > 0L)
return true;
forceJspPage(super.getLoginPage(null, null), req);
req.getSession().removeAttribute("loginUser_id");
req.getSession().removeAttribute("utenteLogon");
return true;
} catch (Exception e) {
handleDebug(e);
return false;
}
}
protected long checkProfile(HttpServletRequest req, String l_permesso) {
return 3L;
}
protected String getLoginPage(HttpServletRequest req, HttpServletResponse res) {
return "Registra.abl";
}
protected Users getUser(HttpServletRequest req) {
return new it.acxent.anag.Users(getApFull(req));
}
protected boolean useAlwaysSendRedirect() {
return true;
}
protected boolean isSecureServlet(HttpServletRequest req) {
return false;
}
public String getPathImgArticoli() {
return getDocBase() + "/" + getDocBase();
}
}

View file

@ -0,0 +1,33 @@
package it.acxent.tarop.servlet.admin;
import it.acxent.db.CRAdapter;
import it.acxent.db.DBAdapter;
import it.acxent.servlet.AblServletSvlt;
import it.acxent.tarop.CategoriaOpzione;
import it.acxent.tarop.CategoriaOpzioneCR;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet(urlPatterns = {"/admin/www/CategoriaOpzione.abl"})
public class CategoriaOpzioneSvlt extends AblServletSvlt {
protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
protected DBAdapter getBean(HttpServletRequest req) {
return new CategoriaOpzione(getApFull(req));
}
protected CRAdapter getBeanCR(HttpServletRequest req) {
return new CategoriaOpzioneCR(getApFull(req));
}
protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
protected boolean isSimpleServlet(HttpServletRequest req) {
return true;
}
}

View file

@ -0,0 +1,96 @@
package it.acxent.tarop.servlet.admin;
import it.acxent.db.CRAdapter;
import it.acxent.db.DBAdapter;
import it.acxent.db.ResParm;
import it.acxent.servlet.AblServletSvlt;
import it.acxent.tarop.CategoriaOpzione;
import it.acxent.tarop.Opzione;
import it.acxent.tarop.OpzioneArticolo;
import it.acxent.tarop.OpzioneCR;
import it.acxent.util.AbMessages;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Object(urlPatterns = {"/admin/www/Opzione.abl"})
public class OpzioneSvlt extends AblServletSvlt {
protected void addRows(HttpServletRequest req, HttpServletResponse res) {
Opzione bean = null;
ResParm rp = new ResParm(true, "");
long l_id = getRequestLongParameter(req, "id_opzione");
bean = new Opzione(getApFull(req));
try {
bean.findByPrimaryKey(l_id);
fillObject(req, bean);
rp = bean.save();
req.setAttribute("id_opzione", String.valueOf(bean.getId_opzione()));
if (rp.getStatus() == true) {
if (getAct(req).equals("addTelefono")) {
OpzioneArticolo row = new OpzioneArticolo(getApFull(req));
long l_id_opzioneArticolo = getRequestLongParameter(req, "id_opzioneArticolo");
fillObject(req, row);
rp = bean.addOpzioneArticolo(row);
sendMessage(req, rp.getMsg());
showBean(req, res);
} else if (getAct(req).equals("delTelefono")) {
OpzioneArticolo row = new OpzioneArticolo(getApFull(req));
long l_id_opzioneArticolo = getRequestLongParameter(req, "id_opzioneArticolo");
if (l_id_opzioneArticolo != 0L) {
fillObject(req, row);
bean.delOpzioneArticolo(row);
sendMessage(req, "Cancellazione Effettuata");
} else {
sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_FAIL"));
}
showBean(req, res);
} else if (getAct(req).equals("modTelefono")) {
OpzioneArticolo row = new OpzioneArticolo(getApFull(req));
long l_id_opzioneArticolo = getRequestLongParameter(req, "id_opzioneArticolo");
if (l_id_opzioneArticolo != 0L) {
fillObject(req, row);
row.findByPrimaryKey(l_id_opzioneArticolo);
req.setAttribute("bean2", row);
sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_OK"));
} else {
sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_FAIL"));
}
showBean(req, res);
}
} else {
req.setAttribute("bean", bean);
sendMessage(req, rp.getMsg());
showBean(req, res);
}
} catch (Exception e) {
forceMessage(req,
AbMessages.getMessage(getLocale(req), "SAVE_FAIL"));
showBean(req, res);
}
}
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
Opzione bean = (Opzione)beanA;
req.setAttribute("listaCategorieOpzioni", new CategoriaOpzione(
getApFull(req)).findAll());
req.setAttribute("listaTelefoni", bean.getOpzioniArticoli());
}
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
protected DBAdapter getBean(HttpServletRequest req) {
return new Opzione(getApFull(req));
}
protected CRAdapter getBeanCR(HttpServletRequest req) {
return new OpzioneCR(getApFull(req));
}
protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {
req.setAttribute("listaCategorieOpzioni", new CategoriaOpzione(
getApFull(req)).findAll());
}
protected boolean isSimpleServlet(HttpServletRequest req) {
return false;
}
}

View file

@ -0,0 +1,33 @@
package it.acxent.tarop.servlet.admin;
import it.acxent.db.CRAdapter;
import it.acxent.db.DBAdapter;
import it.acxent.servlet.AblServletSvlt;
import it.acxent.tarop.Tariffa;
import it.acxent.tarop.TariffaCR;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet(urlPatterns = {"/admin/www/Tariffa.abl"})
public class TariffaSvlt extends AblServletSvlt {
protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
protected DBAdapter getBean(HttpServletRequest req) {
return new Tariffa(getApFull(req));
}
protected CRAdapter getBeanCR(HttpServletRequest req) {
return new TariffaCR(getApFull(req));
}
protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
protected boolean isSimpleServlet(HttpServletRequest req) {
return false;
}
}