first cut of merge of STABLE-pre1_0 into HEAD. I won't even guarantee that it
[mir.git] / source / mircoders / module / ModuleImages.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 mircoders.storage.*;
19
20 public class ModuleImages extends AbstractModule {
21         static Logfile theLog;
22
23         // Kontruktor
24
25         public ModuleImages(StorageObject theStorage) {
26
27                 if (theLog == null) theLog = Logfile.getInstance(MirConfig.getProp("Home")+MirConfig.getProp("Module.Bilder.Logfile"));
28                 if (theStorage == null) theLog.printWarning("StorageObject was null!");
29                 this.theStorage = theStorage;
30
31         }
32
33         // Methoden
34
35                 public SimpleList getBilderAsSimpleList()
36       throws ModuleException {
37
38                 //  String sql = "select id, name from Bilder order by name";
39       try {
40                           return ((DatabaseImages)theStorage).getPopupData();
41       } catch  (StorageObjectException e) {
42         throw new ModuleException(e.toString());
43       }
44                 }
45
46 }