public class ScheduledPersistedActionServiceImpl extends Object implements ScheduledPersistedActionService
Modifier and Type | Class and Description |
---|---|
static class |
ScheduledPersistedActionServiceImpl.ScheduledJobWrapper
The thing that Quartz runs when the schedule fires.
|
static class |
ScheduledPersistedActionServiceImpl.ScheduledPersistedActionServiceBootstrap
This is used to trigger the loading of previously persisted schedules on
an application startup.
|
Modifier and Type | Field and Description |
---|---|
protected static Set<org.alfresco.service.namespace.QName> |
ACTION_TYPES |
protected static String |
JOB_ACTION_NODEREF |
protected static String |
JOB_SCHEDULE_NODEREF |
protected org.alfresco.service.cmr.repository.NodeRef |
SCHEDULED_ACTION_ROOT_NODE_REF |
protected static String |
SCHEDULER_GROUP |
Constructor and Description |
---|
ScheduledPersistedActionServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
addToScheduler(ScheduledPersistedActionImpl schedule)
Builds up the Quartz details, and adds it to the Quartz
scheduler when the transaction completes.
|
protected org.quartz.JobDetail |
buildJobDetail(ScheduledPersistedActionImpl schedule) |
ScheduledPersistedAction |
createSchedule(Action persistedAction)
Creates a new schedule, for the specified Action.
|
void |
deleteSchedule(ScheduledPersistedAction schedule)
Removes the schedule for the action, and cancels future executions of it.
|
ScheduledPersistedAction |
getSchedule(Action persistedAction)
Returns the schedule for the specified action, or
null if it isn't currently scheduled.
|
ScheduledPersistedAction |
getSchedule(org.alfresco.service.cmr.repository.NodeRef persistedActionNodeRef)
Returns the schedule for the specified action nodeRef, or
null if it isn't currently scheduled.
|
List<ScheduledPersistedAction> |
listSchedules()
Returns all currently scheduled actions.
|
protected ScheduledPersistedActionImpl |
loadPersistentSchedule(org.alfresco.service.cmr.repository.NodeRef schedule) |
protected void |
locatePersistanceFolder() |
protected void |
removeFromScheduler(ScheduledPersistedActionImpl schedule)
Takes an entry out of the scheduler, if it's currently there.
|
void |
saveSchedule(ScheduledPersistedAction schedule)
Saves the changes to the schedule to the repository, and updates the
Scheduler with any changed details.
|
void |
schedulePreviouslyPersisted()
Find all our previously persisted scheduled actions, and tell the
scheduler to start handling them.
|
void |
setBehaviourFilter(BehaviourFilter behaviourFilter) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setRepositoryHelper(Repository repositoryHelper) |
void |
setRuntimeActionService(RuntimeActionService runtimeActionService) |
void |
setScheduler(org.quartz.Scheduler scheduler) |
void |
setStartupNodeService(org.alfresco.service.cmr.repository.NodeService startupNodeService)
Sets the node service to use during startup, which won't do permissions
check etc
|
protected static final String JOB_SCHEDULE_NODEREF
protected static final String JOB_ACTION_NODEREF
protected org.alfresco.service.cmr.repository.NodeRef SCHEDULED_ACTION_ROOT_NODE_REF
protected static final Set<org.alfresco.service.namespace.QName> ACTION_TYPES
protected static final String SCHEDULER_GROUP
public void setBehaviourFilter(BehaviourFilter behaviourFilter)
public void setScheduler(org.quartz.Scheduler scheduler)
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setStartupNodeService(org.alfresco.service.cmr.repository.NodeService startupNodeService)
public void setRepositoryHelper(Repository repositoryHelper)
public void setRuntimeActionService(RuntimeActionService runtimeActionService)
protected void locatePersistanceFolder()
public void schedulePreviouslyPersisted()
public ScheduledPersistedAction createSchedule(Action persistedAction)
createSchedule
in interface ScheduledPersistedActionService
public void saveSchedule(ScheduledPersistedAction schedule)
saveSchedule
in interface ScheduledPersistedActionService
public void deleteSchedule(ScheduledPersistedAction schedule)
deleteSchedule
in interface ScheduledPersistedActionService
public ScheduledPersistedAction getSchedule(Action persistedAction)
ScheduledPersistedActionService
getSchedule
in interface ScheduledPersistedActionService
public ScheduledPersistedAction getSchedule(org.alfresco.service.cmr.repository.NodeRef persistedActionNodeRef)
ScheduledPersistedActionService
getSchedule
in interface ScheduledPersistedActionService
public List<ScheduledPersistedAction> listSchedules()
listSchedules
in interface ScheduledPersistedActionService
protected ScheduledPersistedActionImpl loadPersistentSchedule(org.alfresco.service.cmr.repository.NodeRef schedule)
protected void removeFromScheduler(ScheduledPersistedActionImpl schedule)
protected void addToScheduler(ScheduledPersistedActionImpl schedule)
protected org.quartz.JobDetail buildJobDetail(ScheduledPersistedActionImpl schedule)
Copyright © 2005–2017 Alfresco Software. All rights reserved.