- public static void main(String argv[]){
-
- Configuration.initConfig("config");
-
- System.out.println(Configuration.getProperty("Producer.DocRoot"));
-
- try {
-
- new ProducerContent().handle(new PrintWriter(System.out), null, false,false);
-
- } catch(Exception e) { System.err.println(e.toString()); }
-
- }
-
-
-
- public void handle(PrintWriter htmlout, EntityUsers user, boolean force, boolean sync)
-
- throws StorageObjectException, ModuleException {
-
- handle(htmlout,user,force,sync,null);
-
- }
-
-
-
-
-
- public void handle(PrintWriter htmlout, EntityUsers user, boolean force, boolean sync, String id)
-
- throws StorageObjectException, ModuleException
-
- {
-
-
-
- String contentTemplate = Configuration.getProperty("Producer.Content.Template");
-
- int contentBatchsize = Integer.parseInt(Configuration.getProperty("Producer.Content.Batchsize"));
-
- String extLinkName = Configuration.getProperty("Producer.ExtLinkName");
-
- String intLinkName = Configuration.getProperty("Producer.IntLinkName");
-
- String mailLinkName = Configuration.getProperty("Producer.MailLinkName");
-
- String imageRoot = Configuration.getProperty("Producer.ImageRoot");
-
- long sessionConnectTime = 0;
- long startTime = (new java.util.Date()).getTime();
- String whereClause = " ";
- String orderBy = " ";
- String htmlFileName = null;
- String currentMediaId;
- EntityContent currentContent;
- EntityList batchEntityList;
-
- HashMap currentContentValues;
-
- SimpleHash imageHash = new SimpleHash();
-
- EntityGruppen userEntity=null;
-
-
-
- // production of the content-pages
-
- orderBy="date desc, webdb_lastchange desc";
-
- if(force==true){
-
- whereClause="is_published='1'";
-
-
-
- // if true: produces a single content item
-
- if(id !=null){
-
- whereClause += " AND id="+id;
-
- }
-
- batchEntityList = contentModule.getContent(whereClause, orderBy, 0, contentBatchsize, userEntity);
-
- } else {
-
- whereClause="is_produced='0' AND is_published='1'";
-
-
-
- //if true produces a single contentitem
-
- if(id !=null){
-
- whereClause += " AND id="+id;
-
- }
-
- batchEntityList = contentModule.getContent(whereClause, orderBy, 0, contentBatchsize, userEntity);
-
- }
-
-
-
- while (batchEntityList != null) {
-
- for(int i=0;i<batchEntityList.size();i++) {
-
- currentContent = (EntityContent)batchEntityList.elementAt(i);