Coding Style cleanup
authormh <mh>
Thu, 7 Feb 2002 10:09:19 +0000 (10:09 +0000)
committermh <mh>
Thu, 7 Feb 2002 10:09:19 +0000 (10:09 +0000)
source/mircoders/producer/Producer.java
source/mircoders/producer/ProducerContent.java

index de45e4b..cb2ead1 100755 (executable)
@@ -14,22 +14,22 @@ import mircoders.storage.*;
 
 abstract public class Producer {
 
-       protected static String producerDocRoot = MirConfig.getProp("Producer.DocRoot");
+  protected static String producerDocRoot = MirConfig.getProp("Producer.DocRoot");
   protected static String producerStorageRoot = MirConfig.getProp("Producer.StorageRoot");
-       protected static String producerProductionHost = MirConfig.getProp("Producer.ProductionHost");
-       protected static String producerOpenAction = MirConfig.getProp("Producer.OpenAction");;
-       protected static Logfile theLog = Logfile.getInstance(MirConfig.getProp("Home") + "/" + MirConfig.getProp("Producer.Logfile"));
-       protected static ModuleTopics         topicsModule;
+  protected static String producerProductionHost = MirConfig.getProp("Producer.ProductionHost");
+  protected static String producerOpenAction = MirConfig.getProp("Producer.OpenAction");;
+  protected static Logfile theLog = Logfile.getInstance(MirConfig.getProp("Home") + "/" + MirConfig.getProp("Producer.Logfile"));
+  protected static ModuleTopics         topicsModule;
   protected static ModuleLinksImcs      linksImcsModule;
-       protected static ModuleSchwerpunkt    schwerpunktModule;
-       protected static ModuleFeature        featureModule;
-       protected static ModuleContent        contentModule;
-       protected static ModuleImages         imageModule;
-       protected static ModuleUploadedMedia  uploadedMediaModule;
+  protected static ModuleSchwerpunkt    schwerpunktModule;
+  protected static ModuleFeature        featureModule;
+  protected static ModuleContent        contentModule;
+  protected static ModuleImages         imageModule;
+  protected static ModuleUploadedMedia  uploadedMediaModule;
 
   static {
                // init
-    try {
+   try {
                        contentModule = new ModuleContent(DatabaseContent.getInstance());
                        topicsModule = new ModuleTopics(DatabaseTopics.getInstance());
             linksImcsModule = new ModuleLinksImcs(DatabaseLinksImcs.getInstance());
index c430f21..b489a9b 100755 (executable)
@@ -28,7 +28,8 @@ public class ProducerContent extends Producer {
     System.out.println(MirConfig.getProp("Producer.DocRoot"));
 
     try {
-      new ProducerContent().handle(new PrintWriter(System.out), null, false,false);
+      new ProducerContent().handle(new PrintWriter(System.out), null, 
+                                    false,false);
     } catch(Exception e) {
       System.err.println(e.toString());
     }
@@ -36,18 +37,20 @@ public class ProducerContent extends Producer {
 
 
 
-  public void handle(PrintWriter htmlout, EntityUsers user, boolean force, boolean sync)
+  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)
+  public void handle(PrintWriter htmlout, EntityUsers user, boolean force,
+                    boolean sync, String id)
     throws StorageObjectException, ModuleException {
 
     String contentTemplate = MirConfig.getProp("Producer.Content.Template");
-    int contentBatchsize = Integer.parseInt(MirConfig.getProp("Producer.Content.Batchsize"));
+    int contentBatchsize =
+        Integer.parseInt(MirConfig.getProp("Producer.Content.Batchsize"));
 
     long                sessionConnectTime = 0;
     long                startTime = (new java.util.Date()).getTime();
@@ -67,14 +70,16 @@ public class ProducerContent extends Producer {
       if(id !=null){
         whereClause += " AND id="+id;
       }
-      batchEntityList = contentModule.getContent(whereClause, orderBy, 0, contentBatchsize, userEntity);
+      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);
+      batchEntityList = contentModule.getContent(whereClause, orderBy, 0,
+                                                contentBatchsize, userEntity);
     }
 
     while (batchEntityList != null) {
@@ -85,21 +90,30 @@ public class ProducerContent extends Producer {
             String year = date.substring(0,4);
             String month = date.substring(4,6);
             htmlFileName =  producerDocRoot
-              + "/" + year + "/" + month + "/" +  currentContent.getValue("id") + ".shtml";
+              + "/" + year + "/" + month + "/" +
+              currentContent.getValue("id") + ".shtml";
             //produce html
-            boolean retVal = produce(contentTemplate, htmlFileName, currentContent, htmlout);
+            boolean retVal = produce(contentTemplate, htmlFileName,
+                                    currentContent, htmlout);
             sessionConnectTime = new java.util.Date().getTime() - startTime;
-            if (retVal == true && !"1".equals(currentContent.getValue("is_produced")))
+            if (retVal == true &&
+                !"1".equals(currentContent.getValue("is_produced")))
                 currentContent.setProduced(true);
         } catch(Exception e) {
-          logHTML(htmlout, "Producer.Content ERROR while producing content ID: " + currentContent.getId()+",skipping it :: "+e.toString());
-          theLog.printError("Producer.Content ERROR while producing content ID: " + currentContent.getId() +",skipping it :: "+e.toString());
+          logHTML(htmlout, "Producer.Content ERROR while producing content ID:"
+                    + currentContent.getId()+",skipping it :: "+e.toString());
+          theLog.printError("Producer.Content ERR while producing content ID: "
+                            + currentContent.getId() +",skipping it :: "
+                            +e.toString());
         }
 
       }//for
 
       if (batchEntityList.hasNextBatch()){
-        batchEntityList = contentModule.getContent(whereClause, orderBy, batchEntityList.getNextBatch(),contentBatchsize, userEntity);
+        batchEntityList =
+            contentModule.getContent(whereClause, orderBy,
+                                    batchEntityList.getNextBatch(),
+                                    contentBatchsize, userEntity);
       } else {
         batchEntityList=null;
       }
@@ -107,7 +121,8 @@ public class ProducerContent extends Producer {
 
     // timing and message to browser
     sessionConnectTime = new java.util.Date().getTime() - startTime;
-    logHTML(htmlout, "Producer.Content finished: " + sessionConnectTime + " ms.");
+    logHTML(htmlout, "Producer.Content finished: " + sessionConnectTime +
+            " ms.");
   }
 
 }