first cut of merge of STABLE-pre1_0 into HEAD. I won't even guarantee that it
[mir.git] / source / mircoders / module / ModuleBreaking.java
1 package mircoders.module;
2
3 import java.io.*;
4 import java.lang.*;
5 import java.util.*;
6 import java.sql.*;
7 import javax.servlet.*;
8 import javax.servlet.http.*;
9
10 import freemarker.template.*;
11
12 import mir.servlet.*;
13 import mir.module.*;
14 import mir.entity.*;
15 import mir.misc.*;
16 import mir.storage.*;
17
18 import mir.entity.*;
19 import mir.storage.*;
20
21
22 /*
23  *  ContentObjekt -
24  *
25  *
26  * @author RK
27  */
28
29 public class ModuleBreaking extends AbstractModule
30 {
31         static Logfile theLog;
32
33         // Kontruktor
34
35         public ModuleBreaking (StorageObject theStorage)
36         {
37                 if (theLog == null) theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Module.Breaking.Logfile"));
38                 if (theStorage == null) theLog.printWarning("ModuleBreaking -- StorageObject was null!");
39                 this.theStorage = theStorage;
40         }
41
42         // Methoden
43   public EntityList getBreakingNews() {
44     EntityList returnList = null;
45     try {
46       returnList = getByWhereClause(null,"webdb_create desc",0,5);
47     }
48     catch (Exception ex) {
49       theLog.printWarning("--getBreakingNews(): could not fetch Breaking News" + ex.toString());
50     }
51     return returnList;
52   }
53 }