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.
This commit is contained in:
parent
878b7ee06d
commit
42989de65e
1 changed files with 22 additions and 11 deletions
|
@ -22,10 +22,7 @@ import helma.util.SystemMap;
|
||||||
import helma.util.WrappedMap;
|
import helma.util.WrappedMap;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -295,33 +292,47 @@ public class ApplicationBean implements Serializable {
|
||||||
app.customCronJobs.remove(functionName);
|
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() {
|
public int getCacheusage() {
|
||||||
return app.getCacheUsage();
|
return app.getCacheUsage();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Returns the app's data node used to share data between the app's evaluators
|
||||||
*
|
*
|
||||||
*
|
* @return
|
||||||
* @return ...
|
|
||||||
*/
|
*/
|
||||||
public INode getData() {
|
public INode getData() {
|
||||||
return app.getCacheNode();
|
return app.getCacheNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Returns the app's modules map used to register application modules
|
||||||
*
|
*
|
||||||
*
|
* @return
|
||||||
* @return ...
|
|
||||||
*/
|
*/
|
||||||
public Map getModules() {
|
public Map getModules() {
|
||||||
return app.modules;
|
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() {
|
public String getDir() {
|
||||||
return app.getAppDir().getAbsolutePath();
|
return app.getAppDir().getAbsolutePath();
|
||||||
|
|
Loading…
Add table
Reference in a new issue