1 package mircoders.producer;
8 import freemarker.template.*;
15 import mircoders.module.*;
16 import mircoders.entity.*;
17 import mircoders.storage.*;
21 public class ProducerFeature extends ProducerList {
23 public void handle(PrintWriter htmlout, EntityUsers user, boolean force, boolean sync)
24 throws StorageObjectException, ModuleException {
26 listTemplate = MirConfig.getProp("Producer.FeatureList.Template");
27 EntityList featureEntityList = featureModule.getByWhereClause("","title", -1);
28 SimpleList featureList = HTMLTemplateProcessor.makeSimpleList(featureEntityList);
30 whereClause="is_published!=true AND to_article_type=0 AND id IN (";
31 for(int i=0; i < featureEntityList.size(); i++){
34 EntityTopics currentTopic = (EntityTopics)featureEntityList.elementAt(i);
35 EntityList contentEntityList = DatabaseContentToTopics.getInstance().getContent(currentTopic);
39 whereClause += currentTopic.getId();
40 fileDesc = currentTopic.getValue("filename").trim();
41 setAdditional("topic",currentTopic);
42 } catch (Exception e) {
43 logHTML(htmlout, "problem with feature skipping");
49 handleIt(htmlout,user,force);
52 public static void main(String argv[]){
54 new ProducerOpenPosting().handle(new PrintWriter(System.out), null,false, false);
55 } catch(Exception e) {
56 System.err.println(e.toString());