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);
29 whereClause="is_published!=true AND to_article_type=0 AND id IN (";
30 for(int i=0; i < featureEntityList.size(); i++){
33 EntityTopics currentTopic = (EntityTopics)featureEntityList.elementAt(i);
34 EntityList contentEntityList = DatabaseContentToTopics.getInstance().getContent(currentTopic);
38 whereClause += currentTopic.getId();
39 fileDesc = currentTopic.getValue("filename").trim();
40 setAdditional("topic",currentTopic);
41 } catch (Exception e) {
42 logHTML(htmlout, "problem with feature skipping");
48 handleIt(htmlout,user,force);
51 public static void main(String argv[]){
53 new ProducerOpenPosting().handle(new PrintWriter(System.out), null,false, false);
54 } catch(Exception e) {
55 System.err.println(e.toString());