From 42989de65e8e74ac9786909d77b2c2b870e033f1 Mon Sep 17 00:00:00 2001 From: hns Date: Fri, 29 Jul 2005 13:24:31 +0000 Subject: [PATCH] Add app.getCronJobs() function that allows to retrieve the currently registered custom cron jobs. This returns a JavaScript object with the function name as property names and the helma.util.CronJob instance as property values. --- src/helma/framework/core/ApplicationBean.java | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/src/helma/framework/core/ApplicationBean.java b/src/helma/framework/core/ApplicationBean.java index 7c79a979..30d1f1c3 100644 --- a/src/helma/framework/core/ApplicationBean.java +++ b/src/helma/framework/core/ApplicationBean.java @@ -22,10 +22,7 @@ import helma.util.SystemMap; import helma.util.WrappedMap; import java.io.File; import java.io.Serializable; -import java.util.Date; -import java.util.Iterator; -import java.util.List; -import java.util.Map; +import java.util.*; /** * @@ -295,33 +292,47 @@ public class ApplicationBean implements Serializable { app.customCronJobs.remove(functionName); } - // getter methods for readonly properties of this application + /** + * Returns an read-only map of the custom cron jobs registered with the app + * + * @return + */ + public Map getCronJobs() { + WrappedMap jobs = new WrappedMap(app.customCronJobs); + jobs.setReadonly(true); + return jobs; + } + + /** + * Returns the number of elements in the NodeManager's cache + */ public int getCacheusage() { return app.getCacheUsage(); } /** + * Returns the app's data node used to share data between the app's evaluators * - * - * @return ... + * @return */ public INode getData() { return app.getCacheNode(); } /** + * Returns the app's modules map used to register application modules * - * - * @return ... + * @return */ public Map getModules() { return app.modules; } /** + * Returns the absolute path of the app dir. When using repositories this + * equals the first file based repository. * - * - * @return ... + * @return */ public String getDir() { return app.getAppDir().getAbsolutePath();