|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.action.scheduled.ScheduledPersistedActionServiceImpl
public class ScheduledPersistedActionServiceImpl
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.
Nested Class Summary | |
---|---|
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. |
Field Summary | |
---|---|
protected static java.util.Set |
ACTION_TYPES
|
protected static java.lang.String |
JOB_ACTION_NODEREF
|
protected static java.lang.String |
JOB_SCHEDULE_NODEREF
|
protected static org.alfresco.service.cmr.repository.NodeRef |
SCHEDULED_ACTION_ROOT_NODE_REF
|
protected static java.lang.String |
SCHEDULER_GROUP
|
Constructor Summary | |
---|---|
ScheduledPersistedActionServiceImpl()
|
Method Summary | |
---|---|
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. |
java.util.List |
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 |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String JOB_SCHEDULE_NODEREF
protected static final java.lang.String JOB_ACTION_NODEREF
protected static org.alfresco.service.cmr.repository.NodeRef SCHEDULED_ACTION_ROOT_NODE_REF
protected static final java.util.Set ACTION_TYPES
protected static final java.lang.String SCHEDULER_GROUP
Constructor Detail |
---|
public ScheduledPersistedActionServiceImpl()
Method Detail |
---|
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)
getSchedule
in interface ScheduledPersistedActionService
public java.util.List 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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |