Class ScheduledPersistedActionImpl
- java.lang.Object
-
- org.alfresco.repo.action.scheduled.ScheduledPersistedActionImpl
-
- All Implemented Interfaces:
SchedulableAction,ScheduledPersistedAction
public class ScheduledPersistedActionImpl extends java.lang.Object implements ScheduledPersistedAction
The scheduling wrapper around a persisted action, which is to be executed on a scheduled basis.- Since:
- 3.4
- Author:
- Nick Burch
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.service.cmr.action.scheduled.SchedulableAction
SchedulableAction.IntervalPeriod
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedScheduledPersistedActionImpl(Action action)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.quartz.TriggerasTrigger()Returns a Quartz trigger definition based on the current scheduling details.ActiongetAction()Get the action which the schedule applies toorg.alfresco.service.cmr.repository.NodeRefgetActionNodeRef()Get where the action livesprotected org.alfresco.service.cmr.repository.NodeRefgetPersistedAtNodeRef()Get the persisted nodeRef for this scheduleprotected java.util.DategetScheduleEnd()Not yet publicly available - get the date after which the action should no longer be run.java.lang.StringgetScheduleInterval()Returns the interval in a form like 1Day (1 day) or 2Hour (2 hours), or null if a period+count hasn't been setjava.lang.IntegergetScheduleIntervalCount()How manygetScheduleIntervalPeriod()periods should we wait between executions? Will be null if the action isn't scheduled to be repeated.SchedulableAction.IntervalPeriodgetScheduleIntervalPeriod()How long aregetScheduleIntervalCount()counts measured in?java.util.DategetScheduleLastExecutedAt()When was this action last run, if ever?java.util.DategetScheduleStart()Get the first date that the action should be run on or after, or null if it should start shortly after each startup.protected voidsetPersistedAtNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)Record where this schedule is persistedprotected voidsetScheduleEnd(java.util.Date endDate)Not yet publicly available - set the date after which the action should no longer be run.voidsetScheduleIntervalCount(java.lang.Integer count)Sets how many periods should be waited between each execution, or null if it shouldn't be repeated.voidsetScheduleIntervalPeriod(SchedulableAction.IntervalPeriod period)Sets the interval periodvoidsetScheduleLastExecutedAt(java.util.Date executedAt)Record when the scheduled action was last runvoidsetScheduleStart(java.util.Date startDate)Sets the first date that the action should be run on or after.
-
-
-
Constructor Detail
-
ScheduledPersistedActionImpl
protected ScheduledPersistedActionImpl(Action action)
-
-
Method Detail
-
getPersistedAtNodeRef
protected org.alfresco.service.cmr.repository.NodeRef getPersistedAtNodeRef()
Get the persisted nodeRef for this schedule
-
setPersistedAtNodeRef
protected void setPersistedAtNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Record where this schedule is persisted
-
getAction
public Action getAction()
Get the action which the schedule applies to- Specified by:
getActionin interfaceScheduledPersistedAction
-
getActionNodeRef
public org.alfresco.service.cmr.repository.NodeRef getActionNodeRef()
Get where the action lives- Specified by:
getActionNodeRefin interfaceScheduledPersistedAction
-
getScheduleLastExecutedAt
public java.util.Date getScheduleLastExecutedAt()
When was this action last run, if ever?- Specified by:
getScheduleLastExecutedAtin interfaceScheduledPersistedAction
-
setScheduleLastExecutedAt
public void setScheduleLastExecutedAt(java.util.Date executedAt)
Record when the scheduled action was last run
-
getScheduleStart
public java.util.Date getScheduleStart()
Get the first date that the action should be run on or after, or null if it should start shortly after each startup.- Specified by:
getScheduleStartin interfaceSchedulableAction
-
setScheduleStart
public void setScheduleStart(java.util.Date startDate)
Sets the first date that the action should be run on or after. Set to null if the action should be run shortly after each startup.- Specified by:
setScheduleStartin interfaceSchedulableAction
-
getScheduleEnd
protected java.util.Date getScheduleEnd()
Not yet publicly available - get the date after which the action should no longer be run.
-
setScheduleEnd
protected void setScheduleEnd(java.util.Date endDate)
Not yet publicly available - set the date after which the action should no longer be run.
-
getScheduleIntervalCount
public java.lang.Integer getScheduleIntervalCount()
How manygetScheduleIntervalPeriod()periods should we wait between executions? Will be null if the action isn't scheduled to be repeated.- Specified by:
getScheduleIntervalCountin interfaceSchedulableAction
-
setScheduleIntervalCount
public void setScheduleIntervalCount(java.lang.Integer count)
Sets how many periods should be waited between each execution, or null if it shouldn't be repeated.- Specified by:
setScheduleIntervalCountin interfaceSchedulableAction
-
getScheduleIntervalPeriod
public SchedulableAction.IntervalPeriod getScheduleIntervalPeriod()
How long aregetScheduleIntervalCount()counts measured in?- Specified by:
getScheduleIntervalPeriodin interfaceSchedulableAction
-
setScheduleIntervalPeriod
public void setScheduleIntervalPeriod(SchedulableAction.IntervalPeriod period)
Sets the interval period- Specified by:
setScheduleIntervalPeriodin interfaceSchedulableAction
-
getScheduleInterval
public java.lang.String getScheduleInterval()
Returns the interval in a form like 1Day (1 day) or 2Hour (2 hours), or null if a period+count hasn't been set- Specified by:
getScheduleIntervalin interfaceScheduledPersistedAction
-
asTrigger
public org.quartz.Trigger asTrigger()
Returns a Quartz trigger definition based on the current scheduling details. May only be called once this object has been persisted
-
-