Package org.alfresco.util
Class CronTriggerBean
- java.lang.Object
-
- org.alfresco.util.AbstractTriggerBean
-
- org.alfresco.util.CronTriggerBean
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
,org.springframework.scheduling.quartz.JobDetailAwareTrigger
@AlfrescoPublicApi public class CronTriggerBean extends AbstractTriggerBean
A utility bean to wrap scheduling a cron job with a given scheduler.- Author:
- Andy Hind
-
-
Field Summary
-
Fields inherited from class org.alfresco.util.AbstractTriggerBean
logger
-
-
Constructor Summary
Constructors Constructor Description CronTriggerBean()
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
Set the schedulerString
getCronExpression()
Get the cron expression that determines when this job is run.long
getStartDelay()
org.quartz.Trigger
getTrigger()
Build the cron triggervoid
setCronExpression(String cronExpression)
Set the cron expression that determines when this job is run.void
setStartDelay(long startDelay)
void
setStartDelayMinutes(long startDelayMinutes)
-
Methods inherited from class org.alfresco.util.AbstractTriggerBean
destroy, getBeanName, getJobDetail, getScheduler, isEnabled, setBeanName, setEnabled, setEnabledFromBean, setJobDetail, setScheduler
-
-
-
-
Method Detail
-
getCronExpression
public String getCronExpression()
Get the cron expression that determines when this job is run.- Returns:
- The cron expression
-
setCronExpression
public void setCronExpression(String cronExpression)
Set the cron expression that determines when this job is run.- Parameters:
cronExpression
-
-
getTrigger
public org.quartz.Trigger getTrigger() throws Exception
Build the cron trigger- Specified by:
getTrigger
in classAbstractTriggerBean
- Returns:
- The trigger
- Throws:
Exception
-
getStartDelay
public long getStartDelay()
-
setStartDelay
public void setStartDelay(long startDelay)
-
setStartDelayMinutes
public void setStartDelayMinutes(long startDelayMinutes)
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception
Description copied from class:AbstractTriggerBean
Set the scheduler- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in classAbstractTriggerBean
- Throws:
Exception
-
-