yet another rewrite of the producers...
[mir.git] / source / mircoders / producer / TopicStartPageProducerFactory.java
index af9e4eb..5b3f29a 100755 (executable)
@@ -7,6 +7,8 @@ import mir.util.*;
 import mircoders.storage.*;
 import mircoders.module.*;
 import mircoders.entity.*;
+import mircoders.global.*;
+import mircoders.localizer.*;
 
 
 public class TopicStartPageProducerFactory implements ProducerFactory {
@@ -31,11 +33,14 @@ public class TopicStartPageProducerFactory implements ProducerFactory {
   }
 
 
-  public mir.producer.Producer makeProducer(String aVerb) throws ProducerException {
+  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());
@@ -54,7 +59,8 @@ public class TopicStartPageProducerFactory implements ProducerFactory {
         values.put("archiv_url", topic.getValue("archiv_url"));
 
 
-        // ML: ok, this is way to low-level for this place:
+
+        // 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;
@@ -78,7 +84,7 @@ public class TopicStartPageProducerFactory implements ProducerFactory {
 
     }
     catch (Throwable e) {
-      throw new ProducerException(e);
+      throw new ProducerFailure("Creating TopicStartPageProducer failed",e);
     }
   };