www in docker support
This commit is contained in:
parent
539a848e95
commit
c227fce036
2145 changed files with 399596 additions and 58 deletions
|
|
@ -0,0 +1,184 @@
|
|||
package it.acxent.cc.servlet.admin;
|
||||
|
||||
import it.acxent.art.Articolo;
|
||||
import it.acxent.art.ArticoloCR;
|
||||
import it.acxent.cc.Attivita;
|
||||
import it.acxent.cc.CCCronSendGoogleXml;
|
||||
import it.acxent.cc.CCImport;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
public class ArticoloSvlt extends it.acxent.art.servlet.ArticoloSvlt {
|
||||
private static final long serialVersionUID = -2291450542550759704L;
|
||||
|
||||
public void _sendGoogleXml(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
CCCronSendGoogleXml sgx = new CCCronSendGoogleXml();
|
||||
ResParm rp = sgx.crontabJob(apFull);
|
||||
sendMessage(req, rp.getMsg());
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _importListinoIngramMicro(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
CCImport bean = new CCImport();
|
||||
ResParm rp = bean.startImportIngramMicro(apFull, 0L, true);
|
||||
sendMessage(req, rp.getMsg());
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _importDispoIngramMicro(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
CCImport bean = new CCImport();
|
||||
ResParm rp = bean.startImportIngramMicro(apFull, 1L, true);
|
||||
sendMessage(req, rp.getMsg());
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _importArticoliDatamaticMail(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
CCImport bean = new CCImport();
|
||||
ResParm rp = bean.startImportDatamaticMail(apFull, true);
|
||||
sendMessage(req, rp.getMsg());
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _importArticoliEsprinet(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
CCImport bean = new CCImport();
|
||||
String fileCsv = getPathTmpFull() + getPathTmpFull();
|
||||
ResParm rp = bean.startImportEsprinet(apFull, fileCsv, true);
|
||||
sendMessage(req, rp.getMsg());
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _importArticoliBrevi(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
CCImport bean = new CCImport();
|
||||
String fileCsv = getPathTmpFull() + getPathTmpFull();
|
||||
ResParm rp = bean.startImportBrevi(apFull, fileCsv, true);
|
||||
sendMessage(req, rp.getMsg());
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
protected void fillComboAfterDetail(DBAdapter l_bean, HttpServletRequest req, HttpServletResponse res) {
|
||||
Attivita attivita = Attivita.getDefaultInstance(getApFull(req));
|
||||
super.fillComboAfterDetail(l_bean, req, res);
|
||||
}
|
||||
|
||||
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {
|
||||
super.fillComboAfterSearch(CR, req, res);
|
||||
}
|
||||
|
||||
public void _importArticoliLogicom(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
CCImport bean = new CCImport();
|
||||
String fileCsv = getPathTmpFull() + getPathTmpFull();
|
||||
ResParm rp = bean.startImportLogicom(apFull, fileCsv, true);
|
||||
sendMessage(req, rp.getMsg());
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _importArticoliDatamatic(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
CCImport bean = new CCImport();
|
||||
String fileCsv = getPathTmpFull() + getPathTmpFull();
|
||||
ResParm rp = bean.startImportDatamatic(apFull, fileCsv, true);
|
||||
sendMessage(req, rp.getMsg());
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _importArticoliLogicomMail(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
CCImport bean = new CCImport();
|
||||
ResParm rp = bean.startImportLogicomMail(apFull, true);
|
||||
sendMessage(req, rp.getMsg());
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _importArticoliFlexit(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
CCImport bean = new CCImport();
|
||||
String fileCsv = getPathTmpFull() + getPathTmpFull();
|
||||
ResParm rp = bean.startImportFlexit(apFull, fileCsv, true);
|
||||
sendMessage(req, rp.getMsg());
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _importArticoliFlexitMail(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
CCImport bean = new CCImport();
|
||||
ResParm rp = bean.startImportFlexitMail(apFull, true);
|
||||
sendMessage(req, rp.getMsg());
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _importRunner(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
CCImport bean = new CCImport();
|
||||
String s_flgTipoImport = getRequestParameter(req, "flgTipoImportRunner");
|
||||
String[] s_flgTipoImportA = s_flgTipoImport.split(",");
|
||||
long[] result = new long[s_flgTipoImportA.length];
|
||||
for (int i = 0; i < s_flgTipoImportA.length; i++)
|
||||
result[i] = Long.parseLong(s_flgTipoImportA[i]);
|
||||
ResParm rp = bean.startImportRunner(apFull, result, true);
|
||||
sendMessage(req, rp.getMsg());
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _importSiaeIngramMicro(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
CCImport bean = new CCImport();
|
||||
ResParm rp = bean.startImportIngramMicro(apFull, 2L, true);
|
||||
sendMessage(req, rp.getMsg());
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _importArticoliCgross(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
CCImport bean = new CCImport();
|
||||
ResParm rp = bean.startImportCgross(apFull, null, true);
|
||||
sendMessage(req, rp.getMsg());
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _importArticoliCgrossWeb(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
CCImport bean = new CCImport();
|
||||
String fileZip = getPathTmpFull() + getPathTmpFull();
|
||||
ResParm rp = bean.startImportCgross(apFull, fileZip, true);
|
||||
sendMessage(req, rp.getMsg());
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _importBestit(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
CCImport bean = new CCImport();
|
||||
String s_flgTipoImport = getRequestParameter(req, "flgTipoImportBestit");
|
||||
String[] s_flgTipoImportA = s_flgTipoImport.split(",");
|
||||
long[] result = new long[s_flgTipoImportA.length];
|
||||
for (int i = 0; i < s_flgTipoImportA.length; i++)
|
||||
result[i] = Long.parseLong(s_flgTipoImportA[i]);
|
||||
ResParm rp = bean.startImportBestit(apFull, result, true);
|
||||
sendMessage(req, rp.getMsg());
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _creaSitemapsStandard(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
Articolo art = new Articolo(apFull);
|
||||
ArticoloCR ACR = new ArticoloCR(apFull);
|
||||
ACR.setFlgReadyForWeb(0L);
|
||||
ACR.setFlgEscludiWeb(-1L);
|
||||
ACR.setFlgQta(1L);
|
||||
ACR.setQtaDa(1L);
|
||||
ACR.setQtaA(9999L);
|
||||
ResParm rp = art.startThreadCreaSitemaps(getApFull(), ACR);
|
||||
sendMessage(req, rp.getMsg());
|
||||
search(req, res);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,306 @@
|
|||
package it.acxent.cc.servlet.admin;
|
||||
|
||||
import it.acxent.anag.Listino;
|
||||
import it.acxent.cc.Attivita;
|
||||
import it.acxent.cc.AttivitaCR;
|
||||
import it.acxent.cc.TipoAttivita;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.mail.MailMessage;
|
||||
import it.acxent.servlet.AblServletSvlt;
|
||||
import it.acxent.servlet.AddImgSvlt;
|
||||
import java.io.File;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/cc/Attivita.abl"})
|
||||
public class AttivitaSvlt extends AblServletSvlt implements AddImgSvlt {
|
||||
private static final long serialVersionUID = 4963856767196841700L;
|
||||
|
||||
protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
req.setAttribute("listaTipoAttivita", new TipoAttivita(apFull).findAll());
|
||||
req.setAttribute("listaListino", new Listino(apFull).findNoListinoBase());
|
||||
}
|
||||
|
||||
protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
req.setAttribute("listaTipoAttivita", new TipoAttivita(apFull).findAll());
|
||||
}
|
||||
|
||||
protected DBAdapter getBean(HttpServletRequest req) {
|
||||
return new Attivita(getApFull(req));
|
||||
}
|
||||
|
||||
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
||||
return new AttivitaCR(getApFull(req));
|
||||
}
|
||||
|
||||
protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
req.setAttribute("listaTipoAttivita", new TipoAttivita(apFull).findAll());
|
||||
}
|
||||
|
||||
protected boolean isSimpleServlet(HttpServletRequest req) {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean isLoadImageServlet() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected ResParm afterSave(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
|
||||
req.getSession().removeAttribute("attivita");
|
||||
Attivita.resetDefaultInstance();
|
||||
return super.afterSave(beanA, req, res);
|
||||
}
|
||||
|
||||
public void _mdd(HttpServletRequest req, HttpServletResponse res) {
|
||||
Attivita attivita = Attivita.getDefaultInstance(getApFull(req));
|
||||
req.setAttribute("id_attivita", Long.valueOf(attivita.getId_attivita()));
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _caricaPrivacy(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
long l_id_attivita = getRequestLongParameter(req, "id_attivita");
|
||||
Attivita bean = new Attivita(apFull);
|
||||
bean.findByPrimaryKey(l_id_attivita);
|
||||
fillObject(req, bean);
|
||||
String l_fileName = getDocBase() + "admin/cc/_template/privacy-" + getDocBase() + ".html";
|
||||
if (bean.getId_attivita() > 0L && new File(l_fileName).exists()) {
|
||||
MailMessage mf = new MailMessage(apFull, l_fileName);
|
||||
mf.setString("ragioneSociale", bean.getNomeAttivita());
|
||||
mf.setString("sedeLegale", bean.getIndirizzoCompletoSede());
|
||||
mf.setString("cf", bean.getCodFisc());
|
||||
mf.setString("responsabileTrattamento", bean.getContatto());
|
||||
bean.setDescTxtLang("privacy", bean.getCurrentLang(), mf.getMessage());
|
||||
bean.save();
|
||||
}
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _caricaCookiePolicy(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
long l_id_attivita = getRequestLongParameter(req, "id_attivita");
|
||||
Attivita bean = new Attivita(apFull);
|
||||
bean.findByPrimaryKey(l_id_attivita);
|
||||
fillObject(req, bean);
|
||||
String l_fileName = getDocBase() + "admin/cc/_template/cookiePolicy-" + getDocBase() + ".html";
|
||||
if (bean.getId_attivita() > 0L && new File(l_fileName).exists()) {
|
||||
MailMessage mf = new MailMessage(apFull, l_fileName);
|
||||
mf.setString("ragioneSociale", bean.getNomeAttivita());
|
||||
mf.setString("sedeLegale", bean.getIndirizzoCompletoSede());
|
||||
mf.setString("cf", bean.getCodFisc());
|
||||
mf.setString("pec", bean.getPec());
|
||||
mf.setString("email", bean.getEmailAttivita());
|
||||
mf.setString("sito", req.getHeader("Host"));
|
||||
mf.setString("pIva", bean.getPIva());
|
||||
mf.setString("indirizzoRestituzione", bean.getIndirizzoCompletoAttivita());
|
||||
mf.setString("responsabileTrattamento", bean.getContatto());
|
||||
bean.setDescTxtLang("cookiePolicyText", bean.getCurrentLang(), mf.getMessage());
|
||||
bean.save();
|
||||
}
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
protected ResParm beforeSave(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
|
||||
Attivita bean = (Attivita)beanA;
|
||||
if (bean.getWwwAddress().isEmpty()) {
|
||||
String serverName;
|
||||
if (req.getHeader("x-forwarded-proto") == null) {
|
||||
serverName = req.getScheme() + "://" + req.getScheme() + req.getServerName() + "/";
|
||||
} else {
|
||||
serverName = req.getHeader("x-forwarded-proto") + "://" + req.getHeader("x-forwarded-proto") + req.getServerName() + "/";
|
||||
}
|
||||
bean.setWwwAddress(serverName);
|
||||
}
|
||||
return super.beforeSave(beanA, req, res);
|
||||
}
|
||||
|
||||
public void _caricaFooter(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
long l_id_attivita = getRequestLongParameter(req, "id_attivita");
|
||||
Attivita bean = new Attivita(apFull);
|
||||
bean.findByPrimaryKey(l_id_attivita);
|
||||
fillObject(req, bean);
|
||||
String l_fileName = getDocBase() + "admin/cc/_template/footer-" + getDocBase() + ".html";
|
||||
if (bean.getId_attivita() > 0L && new File(l_fileName).exists()) {
|
||||
MailMessage mf = new MailMessage(apFull, l_fileName);
|
||||
mf.setString("ragioneSociale", bean.getNomeAttivita());
|
||||
mf.setString("sedeLegale", bean.getIndirizzoCompletoSede());
|
||||
mf.setString("cf", bean.getCodFisc());
|
||||
mf.setString("telefono", bean.getTelefonoAttivita());
|
||||
mf.setString("email", bean.getEmailAttivita());
|
||||
mf.setString("pIva", bean.getPIva());
|
||||
mf.setString("sdi", bean.getCodiceIdentificativoFE());
|
||||
mf.setString("pec", bean.getPec());
|
||||
bean.setDescTxtLang("footerText", bean.getCurrentLang(), mf.getMessage());
|
||||
bean.save();
|
||||
}
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _caricaTermsConditions(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
long l_id_attivita = getRequestLongParameter(req, "id_attivita");
|
||||
Attivita bean = new Attivita(apFull);
|
||||
bean.findByPrimaryKey(l_id_attivita);
|
||||
fillObject(req, bean);
|
||||
String l_fileName = getDocBase() + "admin/cc/_template/termsConditions-" + getDocBase() + ".html";
|
||||
if (bean.getId_attivita() > 0L && new File(l_fileName).exists()) {
|
||||
MailMessage mf = new MailMessage(apFull, l_fileName);
|
||||
mf.setString("ragioneSociale", bean.getNomeAttivita());
|
||||
mf.setString("sedeLegale", bean.getIndirizzoCompletoSede());
|
||||
mf.setString("cf", bean.getCodFisc());
|
||||
mf.setString("email", bean.getEmailAttivita());
|
||||
mf.setString("sito", req.getHeader("Host"));
|
||||
mf.setString("pIva", bean.getPIva());
|
||||
mf.setString("indirizzoRestituzione", bean.getIndirizzoCompletoAttivita());
|
||||
mf.setString("responsabileTrattamento", bean.getContatto());
|
||||
bean.setDescTxtLang("termConditions", bean.getCurrentLang(), mf.getMessage());
|
||||
bean.save();
|
||||
}
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _sendNotificheWishlist(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
long l_id_attivita = getRequestLongParameter(req, "id_attivita");
|
||||
Attivita bean = new Attivita(apFull);
|
||||
bean.findByPrimaryKey(l_id_attivita);
|
||||
ResParm rp = bean.startThreadNotifiche();
|
||||
System.out.println(rp.getMsg());
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _ebayCreaMerchantLocationKey(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
Attivita bean = new Attivita(apFull);
|
||||
long l_id = getRequestLongParameter(req, "id_attivita");
|
||||
bean.findByPrimaryKey(l_id);
|
||||
if (bean.getId_attivita() > 0L) {
|
||||
fillObject(req, bean);
|
||||
ResParm rp = bean.save();
|
||||
if (rp.getStatus()) {
|
||||
rp = bean.ebayCreaMerchantLocationKey();
|
||||
if (rp.getStatus()) {
|
||||
sendMessage(req, rp.getMsg());
|
||||
} else {
|
||||
sendMessage(req, rp.getErrMsg());
|
||||
}
|
||||
} else {
|
||||
sendMessage(req, rp.getErrMsg());
|
||||
}
|
||||
showBean(req, res);
|
||||
} else {
|
||||
sendMessage(req, "Errore! Attivita non trovato");
|
||||
search(req, res);
|
||||
}
|
||||
}
|
||||
|
||||
public void _ebayReturnPolicyId(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
Attivita bean = new Attivita(apFull);
|
||||
long l_id = getRequestLongParameter(req, "id_attivita");
|
||||
bean.findByPrimaryKey(l_id);
|
||||
if (bean.getId_attivita() > 0L) {
|
||||
ResParm rp = bean.ebayUpdateReturnPolicyId();
|
||||
if (rp.getStatus()) {
|
||||
sendMessage(req, rp.getMsg());
|
||||
} else {
|
||||
sendMessage(req, rp.getErrMsg());
|
||||
}
|
||||
showBean(req, res);
|
||||
} else {
|
||||
sendMessage(req, "Errore! Attivita non trovato");
|
||||
search(req, res);
|
||||
}
|
||||
}
|
||||
|
||||
public void _amzUpdateTokens(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
Attivita bean = new Attivita(apFull);
|
||||
long l_id = getRequestLongParameter(req, "id_attivita");
|
||||
bean.findByPrimaryKey(l_id);
|
||||
if (bean.getId_attivita() > 0L) {
|
||||
ResParm rp = bean.amzUpdateTokens(false);
|
||||
if (rp.getStatus()) {
|
||||
sendMessage(req, rp.getMsg());
|
||||
} else {
|
||||
sendMessage(req, rp.getErrMsg());
|
||||
}
|
||||
showBean(req, res);
|
||||
} else {
|
||||
sendMessage(req, "Errore! Attivita non trovato");
|
||||
search(req, res);
|
||||
}
|
||||
}
|
||||
|
||||
public void _ebayFulfillmentPolicyId(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
Attivita bean = new Attivita(apFull);
|
||||
long l_id = getRequestLongParameter(req, "id_attivita");
|
||||
bean.findByPrimaryKey(l_id);
|
||||
if (bean.getId_attivita() > 0L) {
|
||||
ResParm rp = bean.ebayUpdateFulfillmentPolicyId();
|
||||
if (rp.getStatus()) {
|
||||
sendMessage(req, rp.getMsg());
|
||||
} else {
|
||||
sendMessage(req, rp.getErrMsg());
|
||||
}
|
||||
showBean(req, res);
|
||||
} else {
|
||||
sendMessage(req, "Errore! Attivita non trovato");
|
||||
search(req, res);
|
||||
}
|
||||
}
|
||||
|
||||
public void _caricaDirittoDiRecesso(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
long l_id_attivita = getRequestLongParameter(req, "id_attivita");
|
||||
Attivita bean = new Attivita(apFull);
|
||||
bean.findByPrimaryKey(l_id_attivita);
|
||||
fillObject(req, bean);
|
||||
String l_fileName = getDocBase() + "admin/cc/_template/dirittoDiRecesso-" + getDocBase() + ".html";
|
||||
if (bean.getId_attivita() > 0L && new File(l_fileName).exists()) {
|
||||
MailMessage mf = new MailMessage(apFull, l_fileName);
|
||||
mf.setString("ragioneSociale", bean.getNomeAttivita());
|
||||
mf.setString("sedeLegale", bean.getIndirizzoCompletoSede());
|
||||
mf.setString("cf", bean.getCodFisc());
|
||||
mf.setString("pec", bean.getPec());
|
||||
mf.setString("email", bean.getEmailAttivita());
|
||||
mf.setString("sito", req.getHeader("Host"));
|
||||
mf.setString("pIva", bean.getPIva());
|
||||
mf.setString("indirizzoRestituzione", bean.getIndirizzoCompletoAttivita());
|
||||
mf.setString("responsabileTrattamento", bean.getContatto());
|
||||
bean.setDescTxtLang("dirittoDiRecesso", bean.getCurrentLang(), mf.getMessage());
|
||||
bean.save();
|
||||
}
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _ebayPaymentPolicyId(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
Attivita bean = new Attivita(apFull);
|
||||
long l_id = getRequestLongParameter(req, "id_attivita");
|
||||
bean.findByPrimaryKey(l_id);
|
||||
if (bean.getId_attivita() > 0L) {
|
||||
ResParm rp = bean.ebayUpdatePaymentPolicyId();
|
||||
if (rp.getStatus()) {
|
||||
sendMessage(req, rp.getMsg());
|
||||
} else {
|
||||
sendMessage(req, rp.getErrMsg());
|
||||
}
|
||||
showBean(req, res);
|
||||
} else {
|
||||
sendMessage(req, "Errore! Attivita non trovato");
|
||||
search(req, res);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package it.acxent.cc.servlet.admin;
|
||||
|
||||
import it.acxent.cc.TipoAttivita;
|
||||
import it.acxent.cc.TipoAttivitaCR;
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.servlet.AblServletSvlt;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/cc/TipoAttivita.abl"})
|
||||
public class TipoAttivitaSvlt 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 TipoAttivita(getApFull(req));
|
||||
}
|
||||
|
||||
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
||||
return new TipoAttivitaCR(getApFull(req));
|
||||
}
|
||||
|
||||
protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected boolean isSimpleServlet(HttpServletRequest req) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
package it.acxent.cc.servlet.admin;
|
||||
|
||||
import it.acxent.cc.WwwAutomator;
|
||||
import it.acxent.cc.WwwAutomatorCR;
|
||||
import it.acxent.cc.servlet._CCvlt;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.CRAdapter;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/cc/WwwAutomator.abl"})
|
||||
public class WwwAutomatorSvlt extends _CCvlt {
|
||||
private static final long serialVersionUID = 5418623699135974920L;
|
||||
|
||||
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 WwwAutomator(getApFull(req));
|
||||
}
|
||||
|
||||
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
||||
return new WwwAutomatorCR(getApFull(req));
|
||||
}
|
||||
|
||||
protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
|
||||
|
||||
protected boolean isSimpleServlet(HttpServletRequest req) {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void otherCommands(HttpServletRequest req, HttpServletResponse res) {
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _duplicaAutomator(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
long l_id = getRequestLongParameter(req, "id_wwwAutomator");
|
||||
WwwAutomator bean = new WwwAutomator(apFull);
|
||||
bean.findByPrimaryKey(l_id);
|
||||
if (bean.getId_wwwAutomator() > 0L) {
|
||||
bean.setId_wwwAutomator(0L);
|
||||
bean.setDBState(0);
|
||||
bean.setUltimaEsecuzione("");
|
||||
req.setAttribute("bean", bean);
|
||||
forceMessage(req, "Attenzione! Il Record è stato Duplicato!!");
|
||||
}
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _eseguiAutomatorFullCR(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
WwwAutomator bean = new WwwAutomator(apFull);
|
||||
WwwAutomatorCR CR = new WwwAutomatorCR();
|
||||
fillObject(req, CR);
|
||||
CR.setFlgAbilita(1L);
|
||||
bean.startAutomator(getApFull(), CR, false);
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _spostaGiu(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
long l_id = getRequestLongParameter(req, "id_wwwAutomatorSposta");
|
||||
WwwAutomator bean = new WwwAutomator(apFull);
|
||||
bean.findByPrimaryKey(l_id);
|
||||
if (bean.getId_wwwAutomator() > 0L) {
|
||||
ResParm rp = bean.spostaGiu();
|
||||
sendMessage(req, rp.getMsg());
|
||||
}
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _spostaSu(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
long l_id = getRequestLongParameter(req, "id_wwwAutomatorSposta");
|
||||
WwwAutomator bean = new WwwAutomator(apFull);
|
||||
bean.findByPrimaryKey(l_id);
|
||||
if (bean.getId_wwwAutomator() > 0L) {
|
||||
ResParm rp = bean.spostaSu();
|
||||
sendMessage(req, rp.getMsg());
|
||||
}
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _eseguiAutomatorCR(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
long l_id = getRequestLongParameter(req, "id_wwwAutomator");
|
||||
WwwAutomator bean = new WwwAutomator(apFull);
|
||||
bean.findByPrimaryKey(l_id);
|
||||
if (bean.getId_wwwAutomator() > 0L) {
|
||||
ResParm rp = bean.eseguiAutomator();
|
||||
sendMessage(req, rp.getMsg());
|
||||
}
|
||||
search(req, res);
|
||||
}
|
||||
|
||||
public void _eseguiAutomator(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
long l_id = getRequestLongParameter(req, "id_wwwAutomator");
|
||||
WwwAutomator bean = new WwwAutomator(apFull);
|
||||
bean.findByPrimaryKey(l_id);
|
||||
if (bean.getId_wwwAutomator() > 0L) {
|
||||
ResParm rp = bean.eseguiAutomator();
|
||||
sendMessage(req, rp.getMsg());
|
||||
}
|
||||
showBean(req, res);
|
||||
}
|
||||
|
||||
public void _ripristinoOrdine(HttpServletRequest req, HttpServletResponse res) {
|
||||
ApplParmFull apFull = getApFull(req);
|
||||
WwwAutomator bean = new WwwAutomator(apFull);
|
||||
bean.ripristinoOrdine();
|
||||
sendMessage(req, "Ordine tipo + ordine ripristinato");
|
||||
search(req, res);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue