org.alfresco.repo.action.scheduled
Class ScheduledPersistedActionImpl

java.lang.Object
  extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.alfresco.service.cmr.action.scheduled.SchedulableAction
SchedulableAction.IntervalPeriod
 
Constructor Summary
protected ScheduledPersistedActionImpl(Action action)
           
 
Method Summary
 org.quartz.Trigger asTrigger()
          Returns a Quartz trigger definition based on the current scheduling details.
 Action getAction()
          Get the action which the schedule applies to
 org.alfresco.service.cmr.repository.NodeRef getActionNodeRef()
          Get where the action lives
protected  org.alfresco.service.cmr.repository.NodeRef getPersistedAtNodeRef()
          Get the persisted nodeRef for this schedule
protected  java.util.Date getScheduleEnd()
          Not yet publicly available - get the date after which the action should no longer be run.
 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
 java.lang.Integer getScheduleIntervalCount()
          How many ScheduledPersistedActionImpl.getScheduleIntervalPeriod() periods should we wait between executions? Will be null if the action isn't scheduled to be repeated.
 SchedulableAction.IntervalPeriod getScheduleIntervalPeriod()
          How long are ScheduledPersistedActionImpl.getScheduleIntervalCount() counts measured in?
 java.util.Date getScheduleLastExecutedAt()
          When was this action last run, if ever?
 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.
protected  void setPersistedAtNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Record where this schedule is persisted
protected  void setScheduleEnd(java.util.Date endDate)
          Not yet publicly available - set the date after which the action should no longer be run.
 void setScheduleIntervalCount(java.lang.Integer count)
          Sets how many periods should be waited between each execution, or null if it shouldn't be repeated.
 void setScheduleIntervalPeriod(SchedulableAction.IntervalPeriod period)
          Sets the interval period
 void setScheduleLastExecutedAt(java.util.Date executedAt)
          Record when the scheduled action was last run
 void setScheduleStart(java.util.Date startDate)
          Sets the first date that the action should be run on or after.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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:
getAction in interface ScheduledPersistedAction

getActionNodeRef

public org.alfresco.service.cmr.repository.NodeRef getActionNodeRef()
Get where the action lives

Specified by:
getActionNodeRef in interface ScheduledPersistedAction

getScheduleLastExecutedAt

public java.util.Date getScheduleLastExecutedAt()
When was this action last run, if ever?

Specified by:
getScheduleLastExecutedAt in interface ScheduledPersistedAction

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:
getScheduleStart in interface SchedulableAction

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:
setScheduleStart in interface SchedulableAction

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 many ScheduledPersistedActionImpl.getScheduleIntervalPeriod() periods should we wait between executions? Will be null if the action isn't scheduled to be repeated.

Specified by:
getScheduleIntervalCount in interface SchedulableAction

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:
setScheduleIntervalCount in interface SchedulableAction

getScheduleIntervalPeriod

public SchedulableAction.IntervalPeriod getScheduleIntervalPeriod()
How long are ScheduledPersistedActionImpl.getScheduleIntervalCount() counts measured in?

Specified by:
getScheduleIntervalPeriod in interface SchedulableAction

setScheduleIntervalPeriod

public void setScheduleIntervalPeriod(SchedulableAction.IntervalPeriod period)
Sets the interval period

Specified by:
setScheduleIntervalPeriod in interface SchedulableAction

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:
getScheduleInterval in interface ScheduledPersistedAction

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



Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.