Class ScheduledPersistedActionImpl

java.lang.Object
org.alfresco.repo.action.scheduled.ScheduledPersistedActionImpl
All Implemented Interfaces:
SchedulableAction, ScheduledPersistedAction

public class ScheduledPersistedActionImpl extends 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
  • Constructor Details

    • ScheduledPersistedActionImpl

      protected ScheduledPersistedActionImpl(Action action)
  • Method Details

    • getPersistedAtNodeRef

      protected NodeRef getPersistedAtNodeRef()
      Get the persisted nodeRef for this schedule
    • setPersistedAtNodeRef

      protected void setPersistedAtNodeRef(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 NodeRef getActionNodeRef()
      Get where the action lives
      Specified by:
      getActionNodeRef in interface ScheduledPersistedAction
    • getScheduleLastExecutedAt

      public Date getScheduleLastExecutedAt()
      When was this action last run, if ever?
      Specified by:
      getScheduleLastExecutedAt in interface ScheduledPersistedAction
    • setScheduleLastExecutedAt

      public void setScheduleLastExecutedAt(Date executedAt)
      Record when the scheduled action was last run
    • getScheduleStart

      public 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(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 Date getScheduleEnd()
      Not yet publicly available - get the date after which the action should no longer be run.
    • setScheduleEnd

      protected void setScheduleEnd(Date endDate)
      Not yet publicly available - set the date after which the action should no longer be run.
    • getScheduleIntervalCount

      public Integer getScheduleIntervalCount()
      How many 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(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 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 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