public ModuleContent() {
super();
- if (theLog == null) theLog = Logfile.getInstance(this.getClass().getName());
+ if (theLog == null) theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Module.Content.Logfile"));
}
public ModuleContent(StorageObject theStorage) {
this.theStorage = theStorage;
- if (theLog == null) theLog = Logfile.getInstance(this.getClass().getName());
+ if (theLog == null) theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Module.Content.Logfile"));
}
//
// methoden, um an ContentEntities zu kommen
+ public EntityList getFeatures(int offset, int limit) throws ModuleException
+ {
+ return getContent("is_published=true AND to_article_type=2", "date desc, webdb_create desc",
+ offset, limit);
+ }
+
+ public EntityList getNewsWire(int offset, int limit) throws ModuleException
+ {
+ return getContent("is_published=true AND to_article_type = 1",
+ "date desc, webdb_create desc",offset,limit);
+ }
+
+ public EntityList getStartArticle() throws ModuleException
+ {
+ EntityList returnList = getContent("is_published=true AND to_article_type=4",
+ "date desc, webdb_create desc",0,1);
+ //if no startspecial exists
+ if (returnList==null || returnList.size()==0)
+ returnList = getContent("is_published=true AND to_article_type=3",
+ "date desc, webdb_create desc",0,1);
+
+ return returnList;
+ }
public EntityList getContent(HashMap searchValues, boolean concat, int offset, EntityUsers user)
throws ModuleException {