Update of 
/var/cvs/applications/crontab/src/org/mmbase/applications/crontab/modules
In directory 
james.mmbase.org:/tmp/cvs-serv3953/applications/crontab/src/org/mmbase/applications/crontab/modules

Modified Files:
        CrontabModule.java 
Log Message:
generics, made also 'maps' of properties available


See also: 
http://cvs.mmbase.org/viewcvs/applications/crontab/src/org/mmbase/applications/crontab/modules


Index: CrontabModule.java
===================================================================
RCS file: 
/var/cvs/applications/crontab/src/org/mmbase/applications/crontab/modules/CrontabModule.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- CrontabModule.java  9 Dec 2008 13:38:49 -0000       1.20
+++ CrontabModule.java  30 Apr 2009 09:25:36 -0000      1.21
@@ -21,7 +21,7 @@
  * Starts a crontab for MMBase as a Module.
  *
  * @author Michiel Meeuwissen
- * @version $Id: CrontabModule.java,v 1.20 2008/12/09 13:38:49 michiel Exp $
+ * @version $Id: CrontabModule.java,v 1.21 2009/04/30 09:25:36 michiel Exp $
  */
 public class CrontabModule extends WatchedReloadableModule {
 
@@ -85,7 +85,7 @@
         cronDaemon.stop();
     }
 
-    protected void addJob(Map.Entry<String,String> entry) {
+    protected void addJob(Map.Entry<String, String> entry) {
         String value = entry.getValue();
         String[] tokens = value.trim().split("[\n|]");
         String times;
@@ -156,15 +156,12 @@
         init();
     }
 
-    /**
-     * @since MMBase-1.8
-     */
-    private Map<String,String> utilProperties = new UtilReader("crontab.xml", 
new Runnable() { public void run() { reload();}}).getProperties();
+    private UtilReader reader = new UtilReader("crontab.xml", new Runnable() { 
public void run() { reload();}});
+    private Map<String, String> utilProperties = reader.getProperties();
+    private Map<String, Collection<Map.Entry<String, String>>> utilMaps = 
reader.getMaps();
 
     public void readMoreJobs() {
-        Iterator<Map.Entry<String,String>> i = 
utilProperties.entrySet().iterator();
-        while (i.hasNext()) {
-            Map.Entry<String,String> entry = i.next();
+        for (Map.Entry<String, String> entry : utilProperties.entrySet()) {
             addJob(entry);
         }
 
_______________________________________________
Cvs mailing list
Cvs@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to