org.alfresco.util
Class AbstractTriggerBean
org.alfresco.util.AbstractTriggerBean All Implemented Interfaces:
-
org.springframework.beans.factory.InitializingBean, org.springframework.scheduling.quartz.JobDetailAwareTrigger, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.Aware, org.springframework.beans.factory.DisposableBean
Direct Known Subclasses:
-
@org.alfresco.api.AlfrescoPublicApi
public abstract class AbstractTriggerBean
implements org.springframework.beans.factory.InitializingBean, org.springframework.scheduling.quartz.JobDetailAwareTrigger, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean
A utility bean to wrap sceduling a job with a scheduler.
Author:
-
Andy Hind
Field Summary |
protected static org.apache.commons.logging.Log |
logger |
Fields inherited from interface org.springframework.scheduling.quartz.JobDetailAwareTrigger |
JOB_DETAIL_KEY |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static org.apache.commons.logging.Log logger
AbstractTriggerBean
public AbstractTriggerBean()
getJobDetail
public org.quartz.JobDetail getJobDetail()
-
Get the definition of the job to run.
Specified by:
-
getJobDetail in interface org.springframework.scheduling.quartz.JobDetailAwareTrigger
setJobDetail
public void setJobDetail(org.quartz.JobDetail jobDetail)
-
Set the definition of the job to run.
getScheduler
public org.quartz.Scheduler getScheduler()
-
Get the scheduler with which the job and trigger are scheduled.
Returns:
-
The scheduler
setScheduler
public void setScheduler(org.quartz.Scheduler scheduler)
-
Set the scheduler.
afterPropertiesSet
public void afterPropertiesSet() throws Exception -
Set the scheduler
Specified by:
-
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
-
Throws:
-
destroy
-
Ensures that the job is unscheduled with the context is shut down.
Specified by:
-
destroy in interface org.springframework.beans.factory.DisposableBean
-
Throws:
-
getTrigger
public abstract org.quartz.Trigger getTrigger() throws Exception -
Abstract method for implementations to build their trigger.
Returns:
-
The trigger
Throws:
-
setBeanName
public void setBeanName(String name) -
Get the bean name as this trigger is created
Specified by:
-
setBeanName in interface org.springframework.beans.factory.BeanNameAware
getBeanName
-
Get the bean/trigger name.
Returns:
-
The name of the bean
isEnabled
public boolean isEnabled()
setEnabled
public void setEnabled(boolean enabled)
setEnabledFromBean