dead wood cleaned up
authorzapata <zapata>
Tue, 28 May 2002 00:34:43 +0000 (00:34 +0000)
committerzapata <zapata>
Tue, 28 May 2002 00:34:43 +0000 (00:34 +0000)
21 files changed:
source/mircoders/localizer/basic/MirBasicProducerLocalizer.java
source/mircoders/producer/ContentProducer.java [deleted file]
source/mircoders/producer/ContentProducerFactory.java [deleted file]
source/mircoders/producer/ProducerAll.java [deleted file]
source/mircoders/producer/ProducerContent.java [deleted file]
source/mircoders/producer/ProducerFeature.java [deleted file]
source/mircoders/producer/ProducerList.java [deleted file]
source/mircoders/producer/ProducerNavigation.java [deleted file]
source/mircoders/producer/ProducerOpenPosting.java [deleted file]
source/mircoders/producer/ProducerStartPage.java [deleted file]
source/mircoders/producer/ProducerTopics.java [deleted file]
source/mircoders/producer/ScriptCallProducer.java [deleted file]
source/mircoders/producer/ScriptCallProducerFactory.java [deleted file]
source/mircoders/producer/StartPageProducer.java [deleted file]
source/mircoders/producer/StartPageProducerFactory.java [deleted file]
source/mircoders/producer/StaticProducer.java [deleted file]
source/mircoders/producer/StaticProducerFactory.java [deleted file]
source/mircoders/producer/TopicStartPageProducerFactory.java [deleted file]
source/mirlocal/bolivia.indymedia.org/BoliviaProducerLocalizer.java
source/mirlocal/euskalherria.indymedia.org/EHProducerLocalizer.java
source/mirlocal/indymedia.nl/IndyNLProducerLocalizer.java

index 97e80b2..c55b155 100755 (executable)
@@ -20,42 +20,15 @@ public class MirBasicProducerLocalizer implements MirProducerLocalizer {
   };
 
   protected void setupContentFactory(CompositeProducerFactory aContentFactory) {
-    aContentFactory.addFactory(
-      new ContentProducerFactory(
-      MirGlobal.getConfigProperty("Producer.Content.Template"),
-      "bundles.admin",
-      MirGlobal.getConfigProperty("Producer.StorageRoot") + "/${contentyear}/${contentmonth}/${contentid}.shtml",
-      Integer.parseInt(MirGlobal.getConfigProperty("Producer.Content.Batchsize"))));
   }
 
   protected void setupStartPageFactory(CompositeProducerFactory aStartPageFactory) {
-    aStartPageFactory.addFactory(
-      new StartPageProducerFactory(
-          MirGlobal.getConfigProperty("Producer.StartPage.Template"),
-          "bundles.admin",
-          MirGlobal.getConfigProperty("Producer.StorageRoot") + "/index.shtml",
-          MirGlobal.getConfigIntegerProperty("Producer.StartPage.Items"),
-          MirGlobal.getConfigIntegerProperty("Producer.StartPage.Newswire")));
   }
 
   protected void setupSynchronizationFactory(CompositeProducerFactory aSynchronizationFactory) {
-    if(MirGlobal.getConfigBooleanProperty("Rsync")){
-      aSynchronizationFactory.addFactory(
-        new ScriptCallProducerFactory(MirGlobal.getConfigProperty("Rsync.Script.Path")));
-    }
-    else {
-      NullProducerFactory nullFactory = new NullProducerFactory();
-      nullFactory.addVerb("run");
-      aSynchronizationFactory.addFactory(nullFactory);
-    }
   }
 
   protected void setupStaticFactory(CompositeProducerFactory aStaticFactory) {
-    aStaticFactory.addFactory(
-      new StaticProducerFactory(
-          MirGlobal.getConfigProperty("Producer.Navigation.Template"),
-          "bundles.admin",
-          MirGlobal.getConfigProperty("Producer.StorageRoot") + "/navigation.inc"));
   }
 
   protected void setupFactories(Map aFactoriesMap ) {
diff --git a/source/mircoders/producer/ContentProducer.java b/source/mircoders/producer/ContentProducer.java
deleted file mode 100755 (executable)
index 99902a5..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-package mircoders.producer;
-
-import java.io.*;
-import java.util.*;
-
-import mir.util.*;
-import mir.misc.*;
-import mir.entity.*;
-import mir.producer.*;
-import mir.generator.*;
-
-import mircoders.localizer.*;
-import mircoders.global.*;
-import mircoders.entity.*;
-import mircoders.entity.adapter.*;
-
-import org.apache.struts.util.MessageResources;
-
-public class ContentProducer implements mir.producer.Producer {
-
-  private String generatorIdentifier;
-  private String resourceBundle;
-
-  private String outputFileExpression;
-
-
-  EntityBrowser browser;
-
-  public ContentProducer(
-    EntityBrowser aBrowser,
-    String aGeneratorIdentifier,
-    String aResourceBundle,
-    String anOutputFileExpression) {
-
-    browser = aBrowser;
-    generatorIdentifier = aGeneratorIdentifier;
-    resourceBundle = aResourceBundle;
-    outputFileExpression = anOutputFileExpression;
-  }
-
-  public void produce( PrintWriter aLogger ) throws ProducerFailure {
-    EntityContent content;
-
-    Map generationValues = new HashMap();
-    Map dataMap = new HashMap();
-    String fileName;
-
-    MirGlobal.localizer().producerTool().initializeGenerationValueSet(generationValues);
-
-               MessageResources messages = MessageResources.getMessageResources(resourceBundle);
-               generationValues.put("lang", new MessageMethodModel(null, messages) );
-               generationValues.put("data", dataMap);
-
-    try {
-      Generator generator = MirGlobal.localizer().generators().makeGenerator(generatorIdentifier);
-
-      aLogger.println("ContentProducer.produce:");
-      aLogger.println("generatorIdentifier = " + generatorIdentifier);
-
-      while (browser.hasNext()) {
-        content = (EntityContent) browser.next();
-        dataMap.put("content", ContentAdapterDefinition.getInstance().makeEntityAdapter(content));
-
-        String date = content.getValue("date");
-
-      // ML: this will be done more elegantly soon!
-        dataMap.put("contentmonth", date.substring(4,6));
-        dataMap.put("contentyear", date.substring(0,4));
-        dataMap.put("contentid", content.getValue("id"));
-
-        aLogger.println("unparsed fileName = " + outputFileExpression);
-
-        fileName = ParameterExpander.expandExpression(dataMap, outputFileExpression);
-
-        aLogger.println("fileName = " + fileName);
-
-        try {
-          aLogger.println("generating: " + fileName);
-
-          PrintWriter printWriter = MirGlobal.localizer().producerTool().openWriter(fileName);
-
-          generator.generate(printWriter, generationValues, aLogger);
-
-          MirGlobal.localizer().producerTool().closeWriter(printWriter);
-
-          content.setProduced(true);
-
-          aLogger.println("done generating: " + fileName);
-        }
-        catch (Exception e) {
-          aLogger.println("exception while generating " + fileName + ":");
-          aLogger.println(e.getMessage());
-          e.printStackTrace(aLogger);
-          aLogger.flush();
-        }
-      }
-    }
-    catch (Exception e) {
-      aLogger.println("exception while generating:");
-      aLogger.println(e.getMessage());
-      e.printStackTrace(aLogger);
-      aLogger.flush();
-    }
-
-    aLogger.println("ContentProducer.produce: done");
-
-  }
-
-}
diff --git a/source/mircoders/producer/ContentProducerFactory.java b/source/mircoders/producer/ContentProducerFactory.java
deleted file mode 100755 (executable)
index a455488..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-package mircoders.producer;
-
-import java.util.*;
-import mir.entity.*;
-import mir.producer.*;
-import mircoders.storage.*;
-
-public class ContentProducerFactory implements ProducerFactory {
-  private String generatorIdentifier;
-  private String resourceBundle;
-  private String outputFileNameExpression;
-  private int batchSize;
-
-  public ContentProducerFactory(
-    String aGeneratorIdentifier,
-    String aResourceBundle,
-    String anOutputFileNameExpression,
-    int aBatchSize) {
-
-    generatorIdentifier = aGeneratorIdentifier;
-    resourceBundle = aResourceBundle;
-    outputFileNameExpression = anOutputFileNameExpression;
-    batchSize=aBatchSize;
-  }
-
-  public mir.producer.Producer makeProducer(String aVerb) throws ProducerFailure {
-    try {
-      QueryBuilder queryBuilder = new QueryBuilder();
-
-      queryBuilder.appendAndCondition("is_published='1'");
-
-      if (!aVerb.equals("all")) {
-        queryBuilder.appendAndCondition("is_produced='0'");
-      }
-
-      return new ContentProducer(
-        new EntityBrowser(
-          DatabaseContent.getInstance(),
-          queryBuilder.getWhereClause(),
-          queryBuilder.getOrderByClause(),
-          batchSize),
-        generatorIdentifier,
-        resourceBundle,
-        outputFileNameExpression
-      );
-    } catch (Exception e) {
-      throw new ProducerFailure("Creating Producer failed",e);
-    }
-  };
-
-  public Iterator verbs() {
-    Vector verbList = new Vector();
-
-    verbList.add("new");
-    verbList.add("all");
-
-    return verbList.iterator();
-  };
-}
-
diff --git a/source/mircoders/producer/ProducerAll.java b/source/mircoders/producer/ProducerAll.java
deleted file mode 100755 (executable)
index f98c0fa..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-package mircoders.producer;
-
-import java.io.*;
-import java.lang.*;
-import java.util.*;
-
-import freemarker.template.*;
-
-import mir.misc.*;
-import mir.storage.*;
-import mir.module.*;
-import mir.entity.*;
-
-import mircoders.module.*;
-import mircoders.entity.*;
-import mircoders.storage.*;
-
-
-public class ProducerAll extends Producer{
-
-       private boolean rsync;
-
-       public static void main(String argv[])
-       {
-               try {   new ProducerAll().handle(new PrintWriter(System.out), null, false,false);       }
-               catch(Exception e) { System.err.println(e.toString()); }
-       }
-
-       // handle all
-       public void handle(PrintWriter htmlout, EntityUsers user, boolean force,boolean sync)
-    {
-               printHTML(htmlout, "Producer.All: started");
-
-               long                sessionConnectTime = 0;
-               long                startTime = (new java.util.Date()).getTime();
-    
-        try {
-            new ProducerImages().handle(htmlout, user, force,sync);
-        } catch (Exception e) {
-            logHTML(htmlout, "Producer.All <font color=\"red\">ERROR:</font>"
-                +" in ProducerImages continuing "+ e.toString());
-        }
-        try {
-            new ProducerAudio().handle(htmlout, user, force,sync);
-        } catch (Exception e) {
-            logHTML(htmlout, "Producer.All <font color=\"red\">ERROR:</font>"
-                +" in ProducerAudio continuing "+ e.toString());
-        }
-        try {
-            new ProducerVideo().handle(htmlout, user, force,sync);
-        } catch (Exception e) {
-            logHTML(htmlout, "Producer.All <font color=\"red\">ERROR:</font>"
-                +" in ProducerVideo continuing "+ e.toString());
-        }
-        try {
-            new ProducerOther().handle(htmlout, user, force,sync);
-        } catch (Exception e) {
-            logHTML(htmlout, "Producer.All <font color=\"red\">ERROR:</font>"
-                +" in ProducerOther continuing "+ e.toString());
-        }
-        try {
-            new ProducerStartPage().handle(htmlout, user, force,sync);
-        } catch (Exception e) {
-            logHTML(htmlout, "Producer.All <font color=\"red\">ERROR:</font>"
-                +" in Producer.StartPage continuing "+ e.toString());
-        }
-        try {
-            new ProducerContent().handle(htmlout, user, force,sync);
-        } catch (Exception e) {
-            logHTML(htmlout, "Producer.All <font color=\"red\">ERROR:</font>"
-                +" in Producer.Content continuing "+ e.toString());
-        }
-        try {
-            new ProducerOpenPosting().handle(htmlout, user, force,sync);
-        } catch (Exception e) {
-            logHTML(htmlout, "Producer.All <font color=\"red\">ERROR:</font>"
-                +" in Producer.OpenPosting continuing "+ e.toString());
-        }
-        try {
-            new ProducerTopics().handle(htmlout, user, force,sync);
-        } catch (Exception e) {
-            logHTML(htmlout, "Producer.All <font color=\"red\">ERROR:</font>"
-                +" in Producer.Topics continuing "+ e.toString());
-        }
-        try {
-            new ProducerNavigation().handle(htmlout, user, force,sync);
-        } catch (Exception e) {
-            logHTML(htmlout, "Producer.All <font color=\"red\">ERROR:</font>"
-                +" in Producer.Navigation continuing "+ e.toString());
-        }
-
-               // Finish
-               sessionConnectTime = new java.util.Date().getTime() - startTime;
-               logHTML(htmlout, "Producer.All finished: " + sessionConnectTime + " ms.");
-
-               // do we have to rsync the site
-               if (sync==true){
-                       sessionConnectTime = 0;
-                       if (Helper.rsync()!=0){
-                               sessionConnectTime = new java.util.Date().getTime() - startTime;
-                               logHTML(htmlout, "Rsync failed: " + sessionConnectTime + " ms.");
-                       } else {
-                               sessionConnectTime = new java.util.Date().getTime() - startTime;
-                               logHTML(htmlout, "Rsync succeded: " + sessionConnectTime + " ms.");
-                       }
-               }
-       }
-
-       // handle all
-       public void handle2(PrintWriter htmlout, EntityUsers user, boolean force,boolean sync)
-               throws StorageObjectException, ModuleException {
-               printHTML(htmlout, "Producer.All: started");
-
-               long                sessionConnectTime = 0;
-               long                startTime = (new java.util.Date()).getTime();
-               EntityContent   currentContent;
-
-               //get all new unproduced content-entities
-               String whereClause="is_produced='0' && to_article_type>0";
-               String orderBy="date desc";
-               EntityList entityList = contentModule.getContent(whereClause,orderBy,0,-1,null);
-
-               //get their values
-               while (entityList != null) {
-                       for(int i=0;i<entityList.size();i++) {
-                               currentContent = (EntityContent)entityList.elementAt(i);
-                               EntityList topicEntityList = DatabaseContentToTopics.getInstance().getTopics(currentContent);
-                               SimpleHash topicHash = HTMLTemplateProcessor.makeSimpleHash(topicEntityList);
-
-                               try {
-                                       //check if this content item is related to a topic
-                                       if(currentContent.getId().equals(topicHash.get("content_id"))){
-                                               // produce the ToicsList
-                                               new ProducerTopics().handle(htmlout, user, force,sync,topicHash.get("topic_id").toString());
-                                       }
-                               } catch (TemplateModelException e) {
-                                       logHTML(htmlout, e.toString());
-                               }
-                       }
-               }
-
-               new ProducerContent().handle(htmlout, user, force,sync);
-               new ProducerOpenPosting().handle(htmlout, user, force,sync);
-               new ProducerStartPage().handle(htmlout, user, force,sync);
-               new ProducerTopics().handle(htmlout, user, force,sync);
-
-               // Finish
-               sessionConnectTime = new java.util.Date().getTime() - startTime;
-               logHTML(htmlout, "Producer.All finished: " + sessionConnectTime + " ms.");
-       }
-}
-
diff --git a/source/mircoders/producer/ProducerContent.java b/source/mircoders/producer/ProducerContent.java
deleted file mode 100755 (executable)
index 9880ba8..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-package mircoders.producer;
-
-import java.io.*;
-import java.lang.*;
-import java.util.*;
-
-import freemarker.template.*;
-
-import mir.misc.*;
-import mir.storage.*;
-import mir.module.*;
-import mir.entity.*;
-
-import mircoders.entity.*;
-import mircoders.storage.*;
-
-//for pdf production
-import org.apache.fop.apps.* ;
-import org.xml.sax.InputSource;
-import org.xml.sax.XMLReader;
-import org.apache.log.*;
-
-public class ProducerContent extends Producer {
-
-       private String contentTemplate=MirConfig.getProp("Producer.Content.Template");
-       private String contentPrintableTemplate=MirConfig.getProp("Producer.PrintableContent.Template");
-       private String html2foStyleSheetName=MirConfig.getProp("Producer.PrintableContent.html2foStyleSheetName");
-       private String generateFO=MirConfig.getProp("GenerateFO");
-       private String generatePDF=MirConfig.getProp("GeneratePDF");
-       private String producerStorageRoot=MirConfig.getProp("Producer.StorageRoot");
-       private Logger fopLog=null;
-       private String templateDir = MirConfig.getPropWithHome("HTMLTemplateProcessor.Dir");
-       
-       public static void main(String argv[]){
-               /**
-                * Why are we reloading the config here?
-                * Can someone please explain this?
-                * Hope I didn't break anything
-                * -mh. <heckmann@hbe.ca>
-                *
-                * This is the entry point for standalone production. The code
-                * is then running in a new virtual machine, e.g. when called
-                * from cron-script. In that case the config has to be initliased.
-                * Don't know if is ok that way //rk
-                *
-                * ok, i figured that out a few months ago.. -mh
-                *
-                */
-               //Configuration.initConfig("config");
-               System.out.println(MirConfig.getProp("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
-       {
-
-               long                startTime = System.currentTimeMillis();
-               int                 pageCount=0;
-
-               String              whereClause = " ";
-               String              orderBy = " ";
-               String              htmlFileName = null;
-               String              foFileName = null;
-               String              pdfFileName = null;
-               EntityContent       currentContent;
-               EntityList          batchEntityList;
-               EntityUsers         userEntity=null;
-
-               int                 contentBatchsize =
-                                               Integer.parseInt(MirConfig.getProp("Producer.Content.Batchsize"));
-               // production of the content-pages
-
-               /** @todo this should be moved to ModuleContent */
-               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;
-                               // I think this avoids a select count(*)...
-                               contentBatchsize=-1;
-                       }
-                       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;
-                               // this avoids a select count(*)...
-                               contentBatchsize=-1;
-                       }
-                       batchEntityList = contentModule.getContent(whereClause, orderBy, 0,
-                                                                                                                                                                                               contentBatchsize, userEntity);
-               }
-
-               while (batchEntityList!=null) {
-                       for(int i=0;i<batchEntityList.size();i++) {
-                               currentContent = (EntityContent)batchEntityList.elementAt(i);
-
-                               try {
-
-                                       SimpleHash mergeData=new SimpleHash();
-                                       mergeData.put("content", currentContent);
-
-                                       /** @todo this should be assembled in entity */
-                                       String date = currentContent.getValue("date");
-                                       String year = date.substring(0,4);
-                                       String month = date.substring(4,6);
-                                       htmlFileName =  producerDocRoot + "/" + year + "/" + month + "/" +
-                                                                                                       currentContent.getValue("id") + ".shtml";
-                                       
-                                       //produce html
-                                       boolean retVal = produce(contentTemplate, htmlFileName, mergeData, htmlout);
-                                       if ( retVal ) currentContent.setProduced(true);
-                                       
-                                       //produce xsl:fo and pdf version(if desired)
-                                       if (generateFO.toLowerCase().equals("yes")){
-                                       foFileName =  producerDocRoot + "/" + year + "/" + month + "/" + currentContent.getValue("id") + ".fo";
-                                       boolean foRetVal = produce(contentPrintableTemplate, foFileName, mergeData, htmlout);
-                                       
-                                       if (generatePDF.toLowerCase().equals("yes")){
-                                               pdfFileName =  producerStorageRoot + producerDocRoot +"/" + year + "/" + month + "/" + currentContent.getValue("id") + ".pdf";
-                                               Driver driver = new Driver();
-                                               
-                                               Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
-                                               fopLog = hierarchy.getLoggerFor("fop");
-                                               fopLog.setPriority(Priority.WARN);
-                                               
-                                               driver.setLogger(fopLog);
-                                               driver.setRenderer(Driver.RENDER_PDF);
-                                               File foFile=new File(producerStorageRoot + foFileName);
-                                               File html2foStyleSheet=new File(templateDir+"/"+html2foStyleSheetName);
-                                               InputHandler inputHandler = new XSLTInputHandler(foFile, html2foStyleSheet);
-                                               XMLReader parser = inputHandler.getParser();
-                                               driver.setOutputStream(new FileOutputStream(pdfFileName));
-                                               driver.render(parser, inputHandler.getInputSource());
-                                               }
-                                       }
-                               } catch(Exception e) {
-                                       String errorText = "Producer.Content <font color=red>ERROR</font> while producing content ID:"
-                                                                               + currentContent.getId()+", skipping it :: "+e.toString();
-                                       logHTML(htmlout, errorText);
-                                       theLog.printError(errorText);
-                                       e.printStackTrace();
-                               }
-                               pageCount++;
-                       }//for
-                       // if next batch get it...
-                       if (batchEntityList.hasNextBatch()){
-                               batchEntityList = contentModule.getContent(whereClause, orderBy,
-                                                                                                                                                               batchEntityList.getNextBatch(),
-                                                                                                                                                               contentBatchsize, userEntity);
-                       } else {
-                               batchEntityList=null;
-                       }
-               }
-               logHTMLFinish(htmlout, "Content", pageCount, startTime, System.currentTimeMillis());
-               /** @todo why no syncing here? */
-       }
-}
-
diff --git a/source/mircoders/producer/ProducerFeature.java b/source/mircoders/producer/ProducerFeature.java
deleted file mode 100755 (executable)
index fad6184..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-package mircoders.producer;
-
-import java.io.*;
-import java.lang.*;
-import java.util.*;
-import java.sql.*;
-
-import freemarker.template.*;
-
-import mir.misc.*;
-import mir.storage.*;
-import mir.module.*;
-import mir.entity.*;
-
-import mircoders.module.*;
-import mircoders.entity.*;
-import mircoders.storage.*;
-
-
-
-public class ProducerFeature extends ProducerList {
-
-  public void handle(PrintWriter htmlout, EntityUsers user, boolean force, boolean sync)
-               throws StorageObjectException, ModuleException {
-               orderBy="date desc";
-               listTemplate = MirConfig.getProp("Producer.FeatureList.Template");
-               EntityList featureEntityList = featureModule.getByWhereClause("","title", -1);
-               boolean first=true;
-               whereClause="is_published!=true AND to_article_type=0 AND id IN (";
-               for(int i=0; i < featureEntityList.size(); i++){
-
-            try {
-                EntityTopics currentTopic = (EntityTopics)featureEntityList.elementAt(i);
-                EntityList contentEntityList = DatabaseContentToTopics.getInstance().getContent(currentTopic);
-                if(first==false) {
-                    whereClause += ",";
-                }
-                whereClause += currentTopic.getId();
-                fileDesc = currentTopic.getValue("filename").trim();
-                setAdditional("topic",currentTopic);
-            } catch (Exception e) {
-                logHTML(htmlout, "problem with feature skipping");
-            }
-
-                       first = false;
-               }
-               whereClause += ")";
-               handleIt(htmlout,user,force);
-       }
-
-  public static void main(String argv[]){
-    try {
-      new ProducerOpenPosting().handle(new PrintWriter(System.out), null,false, false);
-    } catch(Exception e) {
-      System.err.println(e.toString());
-    }
-  }
-}
diff --git a/source/mircoders/producer/ProducerList.java b/source/mircoders/producer/ProducerList.java
deleted file mode 100755 (executable)
index 5533a37..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-package mircoders.producer;
-
-import java.io.*;
-import java.lang.*;
-import java.lang.reflect.*;
-import java.util.*;
-import java.sql.*;
-
-import freemarker.template.*;
-
-import mir.misc.*;
-import mir.media.*;
-import mir.storage.*;
-import mir.module.*;
-import mir.entity.*;
-
-import mircoders.module.*;
-import mircoders.entity.*;
-import mircoders.storage.*;
-
-
-
-abstract public class ProducerList extends Producer {
-
-  public String listTemplate;
-  public String whereClause;
-  public String orderBy;
-  public String fileDesc;
-  protected HashMap additional = new HashMap();
-
-
-
-  public void handle(PrintWriter htmlout, EntityUsers user, boolean sync, boolean force)
-    throws StorageObjectException, ModuleException {
-    handleIt(htmlout,user,force);
-  }
-
-  /** @todo this should return the number of pages produced! */
-  public void handleIt(PrintWriter htmlout, EntityUsers user, boolean force)
-    throws StorageObjectException, ModuleException {
-
-    logHTML(htmlout, "Producer.List: started");
-    int newsPerPage = Integer.parseInt(MirConfig.getProp("Producer.StartPage.Newswire"));
-    long                sessionConnectTime = 0;
-    long                startTime = (new java.util.Date()).getTime();
-    String              htmlFileName = "";
-    String              currentMediaId;
-    EntityContent       currentContent;
-    EntityList          list;
-    EntityUsers         userEntity=null;
-    SimpleHash          imageHash = new SimpleHash();
-    int size = 0;
-    int listSize = 0;
-
-    int maxItemsOnPage = Integer.parseInt(MirConfig.getProp("Lists.Max.Items"));
-
-    try {
-      listSize = contentModule.getSize(whereClause);
-    } catch (Exception e) {
-      logHTML(htmlout,e.toString());
-    }
-
-    int modRest = listSize % maxItemsOnPage;
-    int numberOfPages = (listSize - modRest) / maxItemsOnPage;
-    boolean first=true;
-    for (int i = 0;i < numberOfPages+1;i ++) {
-      //break the loop, if only athe actuell pages should be produced
-      if (force == false && i==3) {
-        break;
-      }
-      //break, if only the first page has to be produced
-      if (force == false && modRest != 0 && first==false){
-        break;
-      }
-
-
-      if (first==true) {
-        //get the data for the first page
-        size=maxItemsOnPage + modRest;
-        list = contentModule.getContent(whereClause, orderBy, 0, size, userEntity);
-        first=false;
-      } else {
-        //get the data for the other pages
-        list = contentModule.getContent(whereClause, orderBy, size, maxItemsOnPage, userEntity);
-        size = size + maxItemsOnPage;
-      }
-
-      //now produce the pages
-      if (list!=null || force==true) {
-        SimpleHash mergeData = HTMLTemplateProcessor.makeSimpleHashWithEntitylistInfos(list);
-        //process hashmap additional and add to mergedata
-        if (additional != null) {
-          Set set = additional.keySet();
-          for (Iterator it = set.iterator();it.hasNext();) {
-            String key = (String)it.next();
-            mergeData.put(key,(TemplateModel)additional.get(key));
-          }
-        }
-
-        if (i==0){
-          htmlFileName = producerDocRoot + "/" + fileDesc + ".shtml";
-          mergeData.put("filename",fileDesc + ".shtml");
-          mergeData.put("previousPage","");
-          if(numberOfPages<=1){
-            mergeData.put("nextPage","");
-          } else {
-            mergeData.put("nextPage",fileDesc + (numberOfPages-1) + ".shtml");
-          }
-        } else {
-          if (i==1 && numberOfPages > 2){
-            mergeData.put("previousPage",fileDesc + ".shtml");
-            mergeData.put("nextPage",fileDesc + (numberOfPages-2) + ".shtml");
-          } else {
-            if (i==(numberOfPages-1)){
-              mergeData.put("previousPage",fileDesc + (numberOfPages-i+1) + ".shtml");
-              mergeData.put("nextPage","");
-            } else {
-              mergeData.put("previousPage",fileDesc + (numberOfPages-(i-1)) + ".shtml");
-              mergeData.put("nextPage",fileDesc + (numberOfPages-(i+1)) + ".shtml");
-            }
-          }
-          htmlFileName = producerDocRoot + "/" + fileDesc + (numberOfPages-i) + ".shtml";
-          mergeData.put("filename",fileDesc + (numberOfPages-i) + ".shtml");
-        }
-
-        //producing the html-files
-        boolean retVal = produce(listTemplate, htmlFileName, mergeData, htmlout);
-      } //end if
-    }//end for
-
-    sessionConnectTime = new java.util.Date().getTime() - startTime;
-    logHTML(htmlout, "Producer.List finished: " + sessionConnectTime + " ms.");
-  } //end handle
-
-  public void setAdditional(String key, TemplateModel value) {
-    additional.put(key,value);
-  }
-
-}
diff --git a/source/mircoders/producer/ProducerNavigation.java b/source/mircoders/producer/ProducerNavigation.java
deleted file mode 100755 (executable)
index ef5a3fc..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-package mircoders.producer;
-
-import java.io.*;
-import java.lang.*;
-import java.util.*;
-
-import freemarker.template.*;
-
-import mir.misc.*;
-import mir.storage.*;
-import mir.module.*;
-import mir.entity.*;
-
-import mircoders.entity.*;
-
-/**
- * Title:        mir - another content management system
- * Description:
- * Copyright:    Copyright (c) 2001
- * Company:      indymedia
- * @author idefix
- * @version 1.0
- */
-
-public class ProducerNavigation extends Producer {
-
-  private static String naviPageTemplate = MirConfig.getProp("Producer.Navigation.Template");
-
-  public void handle(PrintWriter htmlout, EntityUsers user, boolean forced, boolean sync)
-    throws mir.module.ModuleException, mir.storage.StorageObjectException {
-
-        printHTML(htmlout, "Producer.Navigation: started");
-
-               long                sessionConnectTime = 0;
-               long                startTime = (new java.util.Date()).getTime();
-               String              nowWebdbDate = StringUtil.date2webdbDate(new GregorianCalendar());
-               String              whereClause;
-               String              orderBy;
-               FileWriter          outputFile;
-               String              htmlFileName;
-               EntityContent       currentContent;
-               EntityList          entityList;
-               SimpleHash          naviPageModel;
-
-        // get the imclinks
-        entityList = linksImcsModule.getByWhereClause("", "sortpriority, title", -1);
-        EntityList theParentList = linksImcsModule.getByWhereClause("to_parent_id=NULL", "sortpriority, title", -1);
-
-               // put the informations into the navipagemodel
-               naviPageModel = new SimpleHash();
-               naviPageModel.put("topics", topicsModule.getTopicsList());
-        naviPageModel.put("imclist", entityList);
-        naviPageModel.put("parentlist", theParentList);
-
-               htmlFileName = producerDocRoot + "/navigation.inc";
-
-               produce(naviPageTemplate, htmlFileName, naviPageModel, new LineFilterWriter(htmlout));
-
-               // Finish
-               sessionConnectTime = new java.util.Date().getTime() - startTime;
-               logHTML(htmlout, "Producer.Navigation finished: " + sessionConnectTime + " ms.");
-
-               if(sync==true){
-                       Helper.rsync();
-                       logHTML(htmlout, "Producer.Startseite: rsync done");
-               }
-       }
-
-}
diff --git a/source/mircoders/producer/ProducerOpenPosting.java b/source/mircoders/producer/ProducerOpenPosting.java
deleted file mode 100755 (executable)
index 1278d63..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-package mircoders.producer;
-
-import java.io.*;
-import java.lang.*;
-import java.util.*;
-import java.sql.*;
-
-import freemarker.template.*;
-
-import mir.misc.*;
-import mir.storage.*;
-import mir.module.*;
-import mir.entity.*;
-
-import mir.module.*;
-import mircoders.entity.*;
-import mir.storage.*;
-
-
-
-public class ProducerOpenPosting extends ProducerList {
-
-
-
-  public void handle(PrintWriter htmlout, EntityUsers user, boolean force, boolean sync)
-    throws StorageObjectException, ModuleException
-  {
-    listTemplate = MirConfig.getProp("Producer.OpenPosting.Template");
-    whereClause="is_published='1'";
-    orderBy="date desc, webdb_create desc";
-    fileDesc="open";
-
-    setAdditional("topicslist",topicsModule.getTopicsList());
-    setAdditional("title",new SimpleScalar("Open-Posting"));
-    handleIt(htmlout,user,force);
-  }
-
-
-  public static void main(String argv[]){
-    try {
-      new ProducerOpenPosting().handle(new PrintWriter(System.out), null,false, false);
-    } catch(Exception e) {
-      System.err.println(e.toString());
-    }
-  }
-
-}
diff --git a/source/mircoders/producer/ProducerStartPage.java b/source/mircoders/producer/ProducerStartPage.java
deleted file mode 100755 (executable)
index 865c100..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-package mircoders.producer;
-
-import java.io.*;
-import java.util.*;
-
-import freemarker.template.*;
-
-import mir.entity.*;
-import mir.misc.*;
-import mir.module.*;
-import mir.storage.*;
-import mircoders.module.*;
-import mircoders.storage.*;
-import mircoders.entity.*;
-
-
-public class ProducerStartPage extends Producer {
-
-  private static String startPageTemplate = MirConfig.getProp("Producer.StartPage.Template");
-  private static String featuresRSSTemplate = MirConfig.getProp("Producer.FeaturesRSS.Template");
-  private static int itemsPerPage = Integer.parseInt(MirConfig.getProp("Producer.StartPage.Items"));
-  private static int newsPerPage = Integer.parseInt(MirConfig.getProp("Producer.StartPage.Newswire"));
-
-  public static void main(String argv[]){
-    try {
-      // Why are we reloading the configuration here?
-      // is there something I'm missing?
-      // mh. <heckmann@hbe.ca>
-      // Configuration.initConfig(argv[0]);
-      new ProducerStartPage().handle(new PrintWriter(System.out), null);
-    } catch(Exception e) {
-      System.err.println(e.toString());
-    }
-  }
-
-  public void handle(PrintWriter htmlout, EntityUsers user, boolean force,boolean sync)
-    throws StorageObjectException, ModuleException
-  {
-    long    startTime = System.currentTimeMillis();
-    printHTML(htmlout, "Producer.StartPage: started");
-    SimpleHash startPageModel = new SimpleHash();
-
-    // breaking news
-    ModuleBreaking breakingModule = new ModuleBreaking(DatabaseBreaking.getInstance());
-    startPageModel.put("breakingnews", breakingModule.getBreakingNews());
-    startPageModel.put("topics", topicsModule.getTopicsList());
-    startPageModel.put("newswire", contentModule.getNewsWire(0,newsPerPage));
-    startPageModel.put("startspecial", contentModule.getStartArticle());
-    startPageModel.put("features", contentModule.getFeatures(0,itemsPerPage));
-    startPageModel.put("dc_now", new SimpleScalar(StringUtil.date2w3DateTime(new GregorianCalendar())));
-
-
-    /** @todo switch to compressed */
-    produce(startPageTemplate, producerDocRoot + "/index.shtml", startPageModel, htmlout);
-    
-    /** should be mandatory in light of new www.indy newswire */
-    produce(featuresRSSTemplate, producerDocRoot + "/features.1-0.rdf", startPageModel, htmlout);
-
-    // finished
-    logHTMLFinish(htmlout, "Startpage", 1, startTime, System.currentTimeMillis());
-
-    if(sync==true){
-      logHTML(htmlout, "Producer.Startpage: rsyncing...");
-      Helper.rsync();
-      printHTML(htmlout, "Producer.Startpage: rsync done");
-    }
-  }
-}
-
diff --git a/source/mircoders/producer/ProducerTopics.java b/source/mircoders/producer/ProducerTopics.java
deleted file mode 100755 (executable)
index f26ab69..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-package mircoders.producer;
-
-import java.io.*;
-import java.lang.*;
-import java.lang.reflect.*;
-import java.util.*;
-import java.sql.*;
-
-import freemarker.template.*;
-
-import mir.misc.*;
-import mir.media.*;
-import mir.storage.*;
-import mir.module.*;
-import mir.entity.*;
-
-import mircoders.entity.*;
-import mircoders.storage.*;
-
-
-
-public class ProducerTopics extends ProducerList {
-
-  public String where;
-  String              currentMediaId;
-  EntityList          upMediaEntityList;
-  EntityList          imageEntityList;
-  EntityList          currentMediaList;
-  Entity              mediaType;
-  EntityMedia         uploadedMedia;
-  Class               mediaHandlerClass=null;
-  MirMedia            mediaHandler=null;
-  String              mediaHandlerName=null;
-  Database            mediaStorage=null;
-  String              tinyIcon;
-  String              iconAlt;
-
-  public void handle(PrintWriter htmlout, EntityUsers user, boolean force, boolean sync, String id)
-    throws StorageObjectException, ModuleException {
-    where=id;
-    handle(htmlout,user,force,sync);
-  }
-
-  public void handle(PrintWriter htmlout, EntityUsers user, boolean force, boolean sync)
-    throws StorageObjectException, ModuleException
-  {
-    long startTime = System.currentTimeMillis();
-    int pageCount =0;
-    logHTML(htmlout, "Producer.Topics: started");
-
-    /** @todo should be done in static */
-    listTemplate = MirConfig.getProp("Producer.TopicList.Template");
-
-    orderBy="date desc, webdb_create desc";
-    EntityList topicsEntityList;
-    if(where==null){
-      topicsEntityList = topicsModule.getByWhereClause("","title", -1);
-    } else {
-      topicsEntityList = topicsModule.getByWhereClause(where,"title", -1);
-    }
-
-    for(int i=0; i < topicsEntityList.size(); i++){
-
-      EntityTopics currentTopic = (EntityTopics)topicsEntityList.elementAt(i);
-
-      try {
-      EntityList contentEntityList = DatabaseContentToTopics.getInstance().getContent(currentTopic);
-      String whereClauseSpecial=null;
-
-      if (contentEntityList!=null || force==true) {
-        if (contentEntityList!=null){
-          boolean first=true;
-          whereClause="is_published='1' AND to_article_type >= 1 AND to_article_type <=2 AND id IN (";
-          whereClauseSpecial="is_published='1' AND to_article_type=3 AND id IN (";
-          for(int j=0; j < contentEntityList.size(); j++){
-            if(first==false) {
-              whereClause += ",";
-              whereClauseSpecial += ",";
-            }
-            EntityContent currentContent = (EntityContent)contentEntityList.elementAt(j);
-            whereClause += currentContent.getId();
-            whereClauseSpecial += currentContent.getId();
-
-            setAdditional("topic",currentTopic);
-
-            first = false;
-          }
-          whereClause += ")";
-          whereClauseSpecial += ")";
-        }
-
-        if(contentEntityList==null && force==true){
-          //hihi, das ist eigentlich boese
-          whereClause="is_published='1' AND to_article_type>=1 AND id IN (0)";
-        }
-
-        fileDesc = currentTopic.getValue("filename");
-
-        // get the startarticle
-        EntityList entityList = contentModule.getContent(whereClauseSpecial,"date desc, webdb_create desc",0,1);
-        String currentMediaId = null;
-        SimpleHash imageHash = new SimpleHash();
-        EntityContent currentContent;
-        if(entityList != null && entityList.size()==1){
-          currentContent = (EntityContent)entityList.elementAt(0);
-          try {
-              setAdditional("special",currentContent);
-          } catch (Exception e) {
-            theLog.printError("ProducerTopics: problem with start special media: "+currentContent.getId()+" "+e.toString()+" <font color=\"red\">skipping</font>");
-            logHTML(htmlout,"ProducerTopics: problem with start special media: "+currentContent.getId()+" "+e.toString());
-          }
-        }
-
-        //set the list of topics
-        setAdditional("topicslist",topicsEntityList);
-
-        handleIt(htmlout,user,force);
-        pageCount++;
-      }
-      } catch (Exception e) {
-        theLog.printError("ProducerTopics: problem with start special media: "
-        +e.toString()+" <font color=\"red\">skipping</font>");
-        logHTML(htmlout,"ProducerTopics: problem with topic id: "
-        +currentTopic.getId()+ "<font color=\"red\">skipping</font>");
-      }
-    }
-    logHTMLFinish(htmlout, "Topics", pageCount, startTime, System.currentTimeMillis());
-  }
-
-  public static void main(String argv[]){
-    try {
-      new ProducerOpenPosting().handle(new PrintWriter(System.out), null,false, false);
-    } catch(Exception e) {
-      System.err.println(e.toString());
-    }
-  }
-}
diff --git a/source/mircoders/producer/ScriptCallProducer.java b/source/mircoders/producer/ScriptCallProducer.java
deleted file mode 100755 (executable)
index 8497f43..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-package mircoders.producer;
-
-import mir.producer.*;
-import java.io.*;
-
-// ML: needs to be tested!
-
-public class ScriptCallProducer implements mir.producer.Producer {
-  String script;
-
-  public ScriptCallProducer(String aScript) {
-    script = aScript;
-  }
-
-  public void produce( PrintWriter aLogger ) throws ProducerFailure {
-    Process process;
-    int returnValue;
-
-    aLogger.println("Executing " + script + ":");
-
-    try {
-      process = Runtime.getRuntime().exec(script);
-      returnValue = process.waitFor();
-      aLogger.println("Terminated successfully, return value = " + returnValue + ".");
-    }
-    catch (Throwable e) {
-      aLogger.println("Exception has occurred: " + e.getMessage() + ":");
-      e.printStackTrace(aLogger);
-      throw new ProducerFailure("Executing script failed",e);
-    }
-  }
-}
diff --git a/source/mircoders/producer/ScriptCallProducerFactory.java b/source/mircoders/producer/ScriptCallProducerFactory.java
deleted file mode 100755 (executable)
index 9f96b7a..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-package mircoders.producer;
-
-import java.util.*;
-import mir.entity.*;
-import mir.producer.*;
-import mircoders.storage.*;
-
-public class ScriptCallProducerFactory implements ProducerFactory {
-  private String script;
-
-
-  public ScriptCallProducerFactory(String aScript) {
-    script=aScript;
-  }
-
-  public mir.producer.Producer makeProducer(String aVerb) throws ProducerFailure {
-
-
-    return new ScriptCallProducer(script);
-  };
-
-  public Iterator verbs() {
-    Vector verbList = new Vector();
-
-    verbList.add("run");
-
-    return verbList.iterator();
-  };
-}
-
diff --git a/source/mircoders/producer/StartPageProducer.java b/source/mircoders/producer/StartPageProducer.java
deleted file mode 100755 (executable)
index 3af126f..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-package mircoders.producer;
-
-import java.io.*;
-import java.util.*;
-
-import mir.misc.*;
-import mir.entity.*;
-import mir.producer.*;
-import mir.generator.*;
-
-import mircoders.localizer.*;
-import mircoders.global.*;
-import mircoders.entity.*;
-
-import mircoders.module.*;
-
-import org.apache.struts.util.MessageResources;
-
-public class StartPageProducer implements mir.producer.Producer {
-
-  private String generatorIdentifier;
-  private String resourceBundle;
-  private String outputFile;
-  private EntityList newswireItems;
-  private EntityList features;
-  private EntityList topics;
-  private EntityList breakingNews;
-
-  EntityBrowser browser;
-
-  public StartPageProducer(
-    String aGeneratorIdentifier,
-    String aResourceBundle,
-    String anOutputFile,
-
-    EntityList aNewswireItems,
-    EntityList aFeatures,
-    EntityList aTopics,
-    EntityList aBreakingNews) {
-
-    generatorIdentifier=aGeneratorIdentifier;
-    resourceBundle=aResourceBundle;
-    outputFile=anOutputFile;
-    newswireItems = aNewswireItems;
-    features = aFeatures;
-    topics = aTopics;
-    breakingNews = aBreakingNews;
-  }
-
-  public void produce( PrintWriter aLogger ) throws ProducerFailure {
-    Map generationValues = new HashMap();
-    Map dataMap = new HashMap();
-
-    try {
-      MirGlobal.localizer().producerTool().initializeGenerationValueSet(generationValues);
-
-                 MessageResources messages = MessageResources.getMessageResources(resourceBundle);
-                 generationValues.put("lang", new MessageMethodModel(null, messages) );
-
-                 generationValues.put("data", dataMap);
-
-      dataMap.put("dc_now", StringUtil.date2w3DateTime(new GregorianCalendar()));
-      dataMap.put("newswire", newswireItems);
-      dataMap.put("features", features);
-                 dataMap.put("breakingnews", breakingNews);
-      dataMap.put("topics", topics);
-
-      aLogger.println("StartPageProducer.produce:");
-      aLogger.println("generating: " + outputFile);
-
-      Generator generator = MirGlobal.localizer().generators().makeGenerator(generatorIdentifier);
-      PrintWriter printWriter = MirGlobal.localizer().producerTool().openWriter(outputFile);
-      generator.generate(printWriter, generationValues, aLogger);
-      MirGlobal.localizer().producerTool().closeWriter(printWriter);
-
-      aLogger.println("done");
-    }
-    catch (Exception e) {
-      aLogger.println("exception while generating " + outputFile + ":");
-      aLogger.println(e.getMessage());
-      e.printStackTrace(aLogger);
-      aLogger.flush();
-    }
-  }
-}
diff --git a/source/mircoders/producer/StartPageProducerFactory.java b/source/mircoders/producer/StartPageProducerFactory.java
deleted file mode 100755 (executable)
index 6bea900..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-package mircoders.producer;
-
-import java.util.*;
-import mir.entity.*;
-import mir.producer.*;
-import mircoders.storage.*;
-import mircoders.module.*;
-
-public class StartPageProducerFactory implements ProducerFactory {
-  private String generatorIdentifier;
-  private String resourceBundle;
-  private String outputFile;
-  private int nrNewswireItems;
-  private int nrFeatures;
-
-  public StartPageProducerFactory(
-    String aGeneratorIdentifier,
-    String aResourceBundle,
-    String anOutputFile,
-    int aNrFeatures,
-    int aNrNewswireItems) {
-
-    generatorIdentifier = aGeneratorIdentifier;
-    resourceBundle = aResourceBundle;
-    outputFile = anOutputFile;
-    nrFeatures = aNrFeatures;
-    nrNewswireItems = aNrNewswireItems;
-  }
-
-
-  public mir.producer.Producer makeProducer(String aVerb) throws ProducerFailure {
-
-    try {
-      ModuleContent contentModule = new ModuleContent(DatabaseContent.getInstance());
-      ModuleTopics topicsModule = new ModuleTopics(DatabaseTopics.getInstance());
-      ModuleBreaking breakingModule = new ModuleBreaking(DatabaseBreaking.getInstance());
-
-      return new StartPageProducer(
-                    generatorIdentifier,
-                    resourceBundle,
-                    outputFile,
-                    contentModule.getNewsWire(0,nrNewswireItems),
-                    contentModule.getFeatures(0,nrFeatures),
-                    topicsModule .getTopicsList(),
-                    breakingModule.getBreakingNews());
-    }
-    catch (Throwable e) {
-      throw new ProducerFailure("Creating StartPageProducer failed",e);
-    }
-  };
-
-  public Iterator verbs() {
-    Vector verbList = new Vector();
-
-    verbList.add("all");
-
-    return verbList.iterator();
-  };
-}
-
diff --git a/source/mircoders/producer/StaticProducer.java b/source/mircoders/producer/StaticProducer.java
deleted file mode 100755 (executable)
index afdb836..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-package mircoders.producer;
-
-import java.io.*;
-import java.util.*;
-
-import mir.misc.*;
-//import mir.entity.*;
-import mir.producer.*;
-import mir.generator.*;
-
-import mircoders.localizer.*;
-import mircoders.global.*;
-//import mircoders.entity.*;
-
-//import mircoders.module.*;
-
-import org.apache.struts.util.MessageResources;
-
-public class StaticProducer implements mir.producer.Producer {
-
-  private String generatorIdentifier;
-  private String resourceBundle;
-  private String outputFile;
-
-  public StaticProducer(
-    String aGeneratorIdentifier,
-    String aResourceBundle,
-    String anOutputFile) {
-
-    generatorIdentifier=aGeneratorIdentifier;
-    resourceBundle=aResourceBundle;
-    outputFile=anOutputFile;
-  }
-
-  public void produce( PrintWriter aLogger ) throws ProducerFailure {
-    Map generationValues = new HashMap();
-    Map dataMap = new HashMap();
-
-    try {
-      MirGlobal.localizer().producerTool().initializeGenerationValueSet(generationValues);
-
-                 MessageResources messages = MessageResources.getMessageResources(resourceBundle);
-                 generationValues.put("lang", new MessageMethodModel(null, messages) );
-
-                 generationValues.put("data", dataMap);
-
-      dataMap.put("dc_now", StringUtil.date2w3DateTime(new GregorianCalendar()));
-
-      aLogger.println("StaticProducer.produce:");
-      aLogger.println("  generating: " + outputFile + " from " + generatorIdentifier);
-
-      Generator generator = MirGlobal.localizer().generators().makeGenerator(generatorIdentifier);
-      PrintWriter printWriter = MirGlobal.localizer().producerTool().openWriter(outputFile);
-      generator.generate(printWriter, generationValues, aLogger);
-      MirGlobal.localizer().producerTool().closeWriter(printWriter);
-
-      aLogger.println("done");
-    }
-    catch (Exception e) {
-      aLogger.println("exception while generating " + outputFile + ":");
-      aLogger.println(e.getMessage());
-      e.printStackTrace(aLogger);
-      aLogger.flush();
-    }
-  }
-}
diff --git a/source/mircoders/producer/StaticProducerFactory.java b/source/mircoders/producer/StaticProducerFactory.java
deleted file mode 100755 (executable)
index 4413ff4..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-package mircoders.producer;
-
-import java.util.*;
-import mir.producer.*;
-
-public class StaticProducerFactory implements ProducerFactory {
-  private String generatorIdentifier;
-  private String resourceBundle;
-  private String outputFile;
-
-  public StaticProducerFactory(
-    String aGeneratorIdentifier,
-    String aResourceBundle,
-    String anOutputFile) {
-
-    generatorIdentifier = aGeneratorIdentifier;
-    resourceBundle = aResourceBundle;
-    outputFile = anOutputFile;
-  }
-
-  public mir.producer.Producer makeProducer(String aVerb) throws ProducerFailure {
-    try {
-      return new StaticProducer( generatorIdentifier, resourceBundle, outputFile );
-    }
-    catch (Throwable e) {
-      throw new ProducerFailure("Creating StaticProducer failed",e);
-    }
-  };
-
-  public Iterator verbs() {
-    Vector verbList = new Vector();
-
-    verbList.add("all");
-
-    return verbList.iterator();
-  };
-}
-
diff --git a/source/mircoders/producer/TopicStartPageProducerFactory.java b/source/mircoders/producer/TopicStartPageProducerFactory.java
deleted file mode 100755 (executable)
index 5b3f29a..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-package mircoders.producer;
-
-import java.util.*;
-import mir.entity.*;
-import mir.producer.*;
-import mir.util.*;
-import mircoders.storage.*;
-import mircoders.module.*;
-import mircoders.entity.*;
-import mircoders.global.*;
-import mircoders.localizer.*;
-
-
-public class TopicStartPageProducerFactory implements ProducerFactory {
-  private String generatorIdentifier;
-  private String resourceBundle;
-  private String outputFileNameExpression;
-  private int nrNewswireItems;
-  private int nrFeatures;
-
-  public TopicStartPageProducerFactory(
-    String aGeneratorIdentifier,
-    String aResourceBundle,
-    String anOutputFileNameExpression,
-    int aNrFeatures,
-    int aNrNewswireItems) {
-
-    generatorIdentifier = aGeneratorIdentifier;
-    resourceBundle = aResourceBundle;
-    outputFileNameExpression = anOutputFileNameExpression;
-    nrFeatures = aNrFeatures;
-    nrNewswireItems = aNrNewswireItems;
-  }
-
-
-  public mir.producer.Producer makeProducer(String aVerb) throws ProducerFailure {
-    CompositeProducer result = new CompositeProducer();
-    Map values = new HashMap();
-
-
-    try {
-      MirGlobal.localizer().producerTool().initializeGenerationValueSet(values);
-
-      ModuleContent contentModule = new ModuleContent(DatabaseContent.getInstance());
-      ModuleTopics topicsModule = new ModuleTopics(DatabaseTopics.getInstance());
-      ModuleBreaking breakingModule = new ModuleBreaking(DatabaseBreaking.getInstance());
-
-      EntityBrowser topicBrowser = new EntityBrowser(
-          DatabaseTopics.getInstance(),
-          "",
-          "",
-          100);
-
-      while (topicBrowser.hasNext()) {
-        Entity topic = (Entity) topicBrowser.next();
-        values.put("title", topic.getValue("title"));
-        values.put("filename", topic.getValue("filename"));
-        values.put("main_url", topic.getValue("main_url"));
-        values.put("archiv_url", topic.getValue("archiv_url"));
-
-
-
-        // ML: ok, this is way too low-level for this place:
-        String orderBy = "webdb_create desc";
-        String topicSelection = "exists (select * from content_x_topic where content_id=content.id and topic_id='"+topic.getValue("id")+"')";
-        String featureWhereClause = "is_published='1' and to_article_type='2' and "+topicSelection;
-        String newsWireWhereClause = "is_published='1' and to_article_type='1' and "+topicSelection;
-
-        result.addProducer(
-
-            //  "exists (select * from content_x_topic where content_id=content.id and topic_id="+topic.getValue("id")
-            new StartPageProducer(
-                    generatorIdentifier,
-                    resourceBundle,
-                    ParameterExpander.expandExpression(values, outputFileNameExpression),
-                    contentModule.getContent(newsWireWhereClause, orderBy, 0,nrNewswireItems),
-                    contentModule.getContent(featureWhereClause, orderBy, 0,nrFeatures),
-                    topicsModule .getTopicsList(),
-                    breakingModule.getBreakingNews()));
-      }
-
-      return result;
-
-
-    }
-    catch (Throwable e) {
-      throw new ProducerFailure("Creating TopicStartPageProducer failed",e);
-    }
-  };
-
-  public Iterator verbs() {
-    Vector verbList = new Vector();
-
-    verbList.add("all");
-
-    return verbList.iterator();
-  };
-}
-
index 534d3d8..057d4f8 100755 (executable)
@@ -13,7 +13,7 @@ public class BoliviaProducerLocalizer extends MirBasicProducerLocalizer {
 
   protected void setupContentFactory(CompositeProducerFactory aContentFactory) {
 
-    EntityEnumeratingProducerNode contentNode = null;
+/*    EntityEnumeratingProducerNode contentNode = null;
 
     try {
       contentNode =
@@ -37,7 +37,7 @@ public class BoliviaProducerLocalizer extends MirBasicProducerLocalizer {
     contentNode.addVerb( "new", "is_published='1' and is_produced='f'", "" );
 
     aContentFactory.addFactory( new NodedProducerFactory( contentNode ) );
-
+*/
 
 //  public EntityEnumeratingProducerNode(String aKey, StorageObject aStorage, EntityAdapterDefinition aDefinition, ProducerNode aSubNode) {
 
@@ -121,7 +121,7 @@ public class BoliviaProducerLocalizer extends MirBasicProducerLocalizer {
   }
 
   protected void setupStaticFactory(CompositeProducerFactory aStaticFactory) {
-    aStaticFactory.addFactory(
+/*    aStaticFactory.addFactory(
       new StaticProducerFactory(
           "producer/nav.template",
           "bundles.admin",
@@ -156,6 +156,6 @@ public class BoliviaProducerLocalizer extends MirBasicProducerLocalizer {
           "producer/articlepost.template",
           "bundles.admin",
           MirGlobal.getConfigProperty("Producer.StorageRoot") + "/nl/articlepost.shtml"));
-  }
+*/  }
 
 }
index 0b513b0..3424e87 100755 (executable)
@@ -82,15 +82,15 @@ public class EHProducerLocalizer extends MirBasicProducerLocalizer {
   }
 
   protected void setupSynchronizationFactory(CompositeProducerFactory aSynchronizationFactory) {
-    if(MirGlobal.getConfigBooleanProperty("Rsync")){
+/*    if(MirGlobal.getConfigBooleanProperty("Rsync")){
       aSynchronizationFactory.addFactory(
         new ScriptCallProducerFactory(MirGlobal.getConfigProperty("Rsync.Script.Path")));
     }
     else {
-      NullProducerFactory nullFactory = new NullProducerFactory();
+*/      NullProducerFactory nullFactory = new NullProducerFactory();
       nullFactory.addVerb("run");
       aSynchronizationFactory.addFactory(nullFactory);
-    }
+/*    }*/
   }
 
   protected void setupStaticFactory(CompositeProducerFactory aStaticFactory) {
index 5ecb03f..1cfe809 100755 (executable)
@@ -131,15 +131,18 @@ public class IndyNLProducerLocalizer extends MirBasicProducerLocalizer {
   }
 
   protected void setupSynchronizationFactory(CompositeProducerFactory aSynchronizationFactory) {
-    if(MirGlobal.getConfigBooleanProperty("Rsync")){
+/*    if(MirGlobal.getConfigBooleanProperty("Rsync")){
       aSynchronizationFactory.addFactory(
         new ScriptCallProducerFactory(MirGlobal.getConfigProperty("Rsync.Script.Path")));
     }
     else {
+*/
       NullProducerFactory nullFactory = new NullProducerFactory();
       nullFactory.addVerb("run");
       aSynchronizationFactory.addFactory(nullFactory);
+/*
     }
+ */
   }
 
   protected void setupStaticFactory(CompositeProducerFactory aStaticFactory) {