Class ScheduledPersistedActionServiceImpl

  • All Implemented Interfaces:
    ScheduledPersistedActionService

    public class ScheduledPersistedActionServiceImpl
    extends java.lang.Object
    implements ScheduledPersistedActionService
    A service which handles the scheduling of the execution of persisted actions. It handles registering them with the Quartz scheduler on repository start, and handles the edit, creation and deletion of them.
    Since:
    3.4
    Author:
    Nick Burch
    • Field Detail

      • JOB_SCHEDULE_NODEREF

        protected static final java.lang.String JOB_SCHEDULE_NODEREF
        See Also:
        Constant Field Values
      • JOB_ACTION_NODEREF

        protected static final java.lang.String JOB_ACTION_NODEREF
        See Also:
        Constant Field Values
      • SCHEDULED_ACTION_ROOT_NODE_REF

        protected org.alfresco.service.cmr.repository.NodeRef SCHEDULED_ACTION_ROOT_NODE_REF
      • ACTION_TYPES

        protected static final java.util.Set<org.alfresco.service.namespace.QName> ACTION_TYPES
      • SCHEDULER_GROUP

        protected static final java.lang.String SCHEDULER_GROUP
        See Also:
        Constant Field Values
    • Constructor Detail

      • ScheduledPersistedActionServiceImpl

        public ScheduledPersistedActionServiceImpl()
    • Method Detail

      • setBehaviourFilter

        public void setBehaviourFilter​(BehaviourFilter behaviourFilter)
      • setScheduler

        public void setScheduler​(org.quartz.Scheduler scheduler)
      • setNodeService

        public void setNodeService​(org.alfresco.service.cmr.repository.NodeService nodeService)
      • setStartupNodeService

        public void setStartupNodeService​(org.alfresco.service.cmr.repository.NodeService startupNodeService)
        Sets the node service to use during startup, which won't do permissions check etc
      • setRepositoryHelper

        public void setRepositoryHelper​(Repository repositoryHelper)
      • setRuntimeActionService

        public void setRuntimeActionService​(RuntimeActionService runtimeActionService)
      • locatePersistanceFolder

        protected void locatePersistanceFolder()
      • schedulePreviouslyPersisted

        public void schedulePreviouslyPersisted()
        Find all our previously persisted scheduled actions, and tell the scheduler to start handling them. Called by spring when startup is complete.
      • loadPersistentSchedule

        protected ScheduledPersistedActionImpl loadPersistentSchedule​(org.alfresco.service.cmr.repository.NodeRef schedule)
      • removeFromScheduler

        protected void removeFromScheduler​(ScheduledPersistedActionImpl schedule)
        Takes an entry out of the scheduler, if it's currently there.
      • addToScheduler

        protected void addToScheduler​(ScheduledPersistedActionImpl schedule)
        Builds up the Quartz details, and adds it to the Quartz scheduler when the transaction completes. We have to wait for the transaction to finish, otherwise Quartz may end up trying and failing to load the details of a job that hasn't been committed to the repo yet!