07-30-2013 10:23 AM
CronScheduledQueryBasedTemplateActionDefinition
. I have overridden its queryTemplate
setters and getters to be able to load my query from the java code, and added a isEnabled
boolean flag. This is switched to true or false from config.isEnabled
is false. To that end, I wrote the following method:
@Override
public void afterPropertiesSet() throws Exception {
if(isEnabled) {
logger.warn("Scheduling "+NAME);
super.afterPropertiesSet();
} else {
logger.warn("Didn't schedule "+NAME+" because it was disabled.");
}
}
@Override
public List<NodeRef> getNodes() {
if(isEnabled) {
logger.warn("getNodes: "+NAME);
return super.getNodes();
} else {
logger.warn("Didn't get nodes for "+NAME+" because it was disabled.");
return new ArrayList<NodeRef>();
}
}
07-31-2013 05:07 AM
07-31-2013 06:43 AM
init-method=init
. This points to the following piece of code in my bean:
2013-07-31 12:37:30,446 WARN [app.actions.CronScheduledQueryBasedAppIntakeActionDefinition] [Thread-2] Scheduling CronScheduledQueryBasedAppIntakeActionDefinition
2013-07-31 12:37:30,448 WARN [app.actions.CronScheduledQueryBasedAppIntakeActionDefinition] [Thread-2] Disabled CronScheduledQueryBasedAppIntakeActionDefinition
2013-07-31 12:47:38,026 WARN [app.actions.CronScheduledQueryBasedAppIntakeActionDefinition] [Thread-2] Disabled CronScheduledQueryBasedAppIntakeActionDefinition
2013-07-31 12:47:38,026 DEBUG [app.actions.CronScheduledQueryBasedAppIntakeActionDefinition] [Thread-2] Query='PATH:"/app:company_home/st:sites/cm:app/cm:documentLibrary/cm:AppIntake/*" -ASPECT:"{http://www.mark.nl/model/app/1.0}customAspect"'
2013-07-31 12:47:38,032 WARN [app.actions.CronScheduledQueryBasedAppIntakeActionDefinition] [Thread-2] Didn't schedule CronScheduledQueryBasedAppIntakeActionDefinition because it was disabled.
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.