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,51 @@
|
|||
package it.acxent.cc;
|
||||
|
||||
import it.acxent.art.Articolo;
|
||||
import it.acxent.art.ArticoloCR;
|
||||
import it.acxent.common.CrontabInterface;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import it.acxent.db.ResParm;
|
||||
import it.acxent.util.StringTokenizer;
|
||||
import it.acxent.util.Timer;
|
||||
import it.acxent.www.Sitemap;
|
||||
import it.acxent.www.SitemapCR;
|
||||
|
||||
public class CCCronSitemapXml implements CrontabInterface {
|
||||
public ResParm crontabJob(ApplParmFull ap) {
|
||||
ResParm rp = new ResParm(true);
|
||||
Timer timer = new Timer();
|
||||
timer.start();
|
||||
System.out.println("CCCronSitemapXml start...");
|
||||
StringBuffer msg = new StringBuffer("\n################# Inizio crontab CCCronSitemapXml CC (" +
|
||||
DBAdapter.getNow().toString() + ")\n#################");
|
||||
ArticoloCR ACR = new ArticoloCR(ap);
|
||||
ACR.setFlgReadyForWeb(1L);
|
||||
ACR.setFlgEscludiWeb(0L);
|
||||
ACR.setLangReadyForWeb("it");
|
||||
SitemapCR CR = new SitemapCR(ap);
|
||||
CR.setACR(ACR);
|
||||
Articolo art = new Articolo(ap);
|
||||
String lang = art.getParm("LANG_AVAILABLE").getTesto();
|
||||
StringTokenizer st = new StringTokenizer(lang, ",");
|
||||
String filenamePre = "sitemap";
|
||||
String filenameXml = ".xml";
|
||||
while (st.hasMoreTokens()) {
|
||||
String currentLang = st.nextToken();
|
||||
msg.append("creazione sitemap in lingua " + currentLang + " file " + CR.getSitemapFilename() + ".xml\n");
|
||||
CR.setLangSitemap(currentLang);
|
||||
Sitemap sitemap = new Sitemap(ap);
|
||||
CR.setSitemapFilename("sitemap");
|
||||
CR.setFlgSitemapType(10L);
|
||||
rp = sitemap.creaFileXmlSitemap(CR);
|
||||
msg.append(rp.getMsg());
|
||||
msg.append("\n");
|
||||
}
|
||||
msg.append("\n################# Fine crontab CCCronSitemapXml CC (" + DBAdapter.getNow().toString() + ")\n#################");
|
||||
timer.stop();
|
||||
msg.append("Durata aggiornamento: " + timer.getDurataHourMin() + "\n");
|
||||
rp.setMsg(msg.toString());
|
||||
System.out.println(msg.toString());
|
||||
return rp;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue