|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.evolveum.midpoint.task.quartzimpl.TaskQuartzImpl
public class TaskQuartzImpl
Implementation of a Task. This is very simplistic now. It does not even serialize itself.
TaskManagerQuartzImpl| Method Summary | ||
|---|---|---|
void |
addExtensionProperty(PrismProperty<?> property)
|
|
void |
addPendingModification(ItemDelta<?> delta)
|
|
boolean |
canRun()
Returns true if the task can run (was not interrupted). |
|
ItemDelta<?> |
createExtensionDelta(PrismPropertyDefinition definition,
java.lang.Object realValue)
|
|
Task |
createSubtask()
Creates a subtask |
|
Node |
currentlyExecutesAt()
Returns the node the task is currently executing at, based on real run-time information. |
|
void |
deleteExtensionProperty(PrismProperty<?> property)
Removes specified VALUES of this extension property (not all of its values). |
|
java.lang.String |
dump()
Return human-readable representation of the task content. |
|
boolean |
equals(java.lang.Object obj)
|
|
void |
finishHandler(OperationResult parentResult)
|
|
TaskBinding |
getBinding()
|
|
java.lang.String |
getCategory()
Categories are treated in a special way. |
|
java.lang.String |
getCategoryFromHandler()
|
|
java.lang.String |
getChannel()
Returns change channel URI. |
|
java.lang.String |
getDescription()
|
|
TaskExecutionStatus |
getExecutionStatus()
Returns execution status. |
|
PrismContainer<?> |
getExtension()
Returns task extension. |
|
PrismProperty<?> |
getExtension(javax.xml.namespace.QName propertyName)
|
|
TaskHandler |
getHandler()
|
|
int |
getHandlersCount()
|
|
java.lang.String |
getHandlerUri()
Returns handler URI. |
|
java.lang.Long |
getLastRunFinishTimestamp()
Returns the time when the task last run was finished (or null if the task was not finished yet). |
|
java.lang.Long |
getLastRunStartTimestamp()
Returns the time when the task last run was started (or null if the task was never started). |
|
ModelOperationStateType |
getModelOperationState()
|
|
PolyStringType |
getName()
Returns human-readable name of the task. |
|
java.lang.Long |
getNextRunStartTime(OperationResult parentResult)
Returns the time when the task should start again. |
|
java.lang.String |
getNode()
|
|
|
getObject(java.lang.Class<T> type,
OperationResult parentResult)
Returns object that the task is associated with. |
|
java.lang.String |
getObjectOid()
Returns OID of the object that the task is associated with. |
|
ObjectReferenceType |
getObjectRef()
Returns reference to the object that the task is associated with. |
|
java.lang.String |
getOid()
Returns task OID. |
|
UriStack |
getOtherHandlersUriStack()
Returns the stack of other handlers URIs. |
|
PrismObject<UserType> |
getOwner()
Returns user that owns this task. |
|
java.lang.String |
getParent()
|
|
TaskPersistenceStatus |
getPersistenceStatus()
Returns task persistence status. |
|
long |
getProgress()
|
|
TaskRecurrence |
getRecurrenceStatus()
Returns task recurrence status. |
|
OperationResult |
getResult()
Returns a top-level OperationResult stored in the task. |
|
OperationResultStatusType |
getResultStatus()
|
|
ScheduleType |
getSchedule()
Returns the schedule. |
|
java.lang.String |
getTaskIdentifier()
Returns task (lightweight) identifier. |
|
PrismObject<TaskType> |
getTaskPrismObject()
|
|
ThreadStopActionType |
getThreadStopAction()
|
|
int |
hashCode()
|
|
boolean |
isAsynchronous()
Returns true if the task is asynchronous. |
|
boolean |
isCycle()
Checks whether the task is a cyclic (recurrent) one. |
|
boolean |
isLooselyBound()
|
|
boolean |
isPersistent()
|
|
boolean |
isRecreateQuartzTrigger()
|
|
boolean |
isResilient()
Resilient tasks are those that survive node shutdown. |
|
boolean |
isSingle()
Checks whether the task is single-run. |
|
boolean |
isTightlyBound()
|
|
boolean |
isTransient()
|
|
void |
makeRecurrent(ScheduleType schedule)
|
|
void |
makeRecurrentCron(java.lang.String cronLikeSpecification)
|
|
void |
makeRecurrentSimple(int interval)
|
|
void |
makeRunnable()
Status-changing method. |
|
void |
makeSingle()
|
|
void |
makeSingle(ScheduleType schedule)
|
|
void |
makeWaiting()
Status-changing method. |
|
void |
modifyExtension(ItemDelta itemDelta)
|
|
void |
pushHandlerUri(java.lang.String uri,
ScheduleType schedule,
TaskBinding binding)
|
|
void |
pushHandlerUri(java.lang.String uri,
ScheduleType schedule,
TaskBinding binding,
java.util.Collection<ItemDelta<?>> extensionDeltas)
Makes (uri, schedule, binding) the current task properties, and pushes current (uri, schedule, binding, extensionChange) onto the stack. |
|
void |
pushHandlerUri(java.lang.String uri,
ScheduleType schedule,
TaskBinding binding,
ItemDelta<?> delta)
|
|
void |
refresh(OperationResult parentResult)
Re-reads the task state from the persistent storage. |
|
void |
savePendingModifications(OperationResult parentResult)
Marks current handler as finished, and removes it from the handler stack. |
|
void |
setBinding(TaskBinding value)
|
|
void |
setBindingImmediate(TaskBinding value,
OperationResult parentResult)
|
|
void |
setBindingTransient(TaskBinding value)
|
|
void |
setCategory(java.lang.String value)
|
|
void |
setCategoryImmediate(java.lang.String value,
OperationResult parentResult)
|
|
void |
setCategoryTransient(java.lang.String value)
|
|
void |
setChannel(java.lang.String value)
Sets change channel URI. |
|
void |
setChannelTransient(java.lang.String name)
|
|
void |
setDescription(java.lang.String value)
|
|
void |
setDescriptionImmediate(java.lang.String value,
OperationResult parentResult)
|
|
void |
setDescriptionTransient(java.lang.String name)
|
|
void |
setExecutionStatus(TaskExecutionStatus value)
|
|
void |
setExecutionStatusImmediate(TaskExecutionStatus value,
OperationResult parentResult)
|
|
void |
setExecutionStatusTransient(TaskExecutionStatus executionStatus)
|
|
void |
setExtensionProperty(PrismProperty<?> property)
|
|
void |
setExtensionPropertyImmediate(PrismProperty<?> property,
OperationResult parentResult)
|
|
void |
setExtensionPropertyTransient(PrismProperty<?> property)
|
|
void |
setHandlerUri(java.lang.String value)
Sets handler URI. |
|
void |
setHandlerUriImmediate(java.lang.String value,
OperationResult parentResult)
|
|
void |
setHandlerUriTransient(java.lang.String handlerUri)
|
|
void |
setInitialExecutionStatus(TaskExecutionStatus value)
Sets task execution status. |
|
void |
setLastRunFinishTimestamp(java.lang.Long value)
|
|
void |
setLastRunFinishTimestampImmediate(java.lang.Long value,
OperationResult parentResult)
|
|
void |
setLastRunFinishTimestampTransient(java.lang.Long value)
|
|
void |
setLastRunStartTimestamp(java.lang.Long value)
|
|
void |
setLastRunStartTimestampImmediate(java.lang.Long value,
OperationResult parentResult)
|
|
void |
setLastRunStartTimestampTransient(java.lang.Long value)
|
|
void |
setModelOperationState(ModelOperationStateType value)
|
|
void |
setModelOperationStateImmediate(ModelOperationStateType value,
OperationResult parentResult)
|
|
void |
setModelOperationStateTransient(ModelOperationStateType value)
|
|
void |
setName(PolyStringType value)
Sets the human-readable name of the task. |
|
void |
setNameImmediate(PolyStringType value,
OperationResult parentResult)
|
|
void |
setNameTransient(PolyStringType name)
|
|
void |
setNode(java.lang.String value)
|
|
void |
setNodeImmediate(java.lang.String value,
OperationResult parentResult)
|
|
void |
setNodeTransient(java.lang.String value)
|
|
void |
setObjectRef(ObjectReferenceType objectRefType)
|
|
void |
setOid(java.lang.String oid)
|
|
void |
setOtherHandlersUriStack(UriStack value)
|
|
void |
setOtherHandlersUriStackImmediate(UriStack value,
OperationResult parentResult)
|
|
void |
setOtherHandlersUriStackTransient(UriStack value)
|
|
void |
setOwner(PrismObject<UserType> owner)
|
|
void |
setParent(java.lang.String value)
|
|
void |
setParentImmediate(java.lang.String value,
OperationResult parentResult)
|
|
void |
setParentTransient(java.lang.String name)
|
|
void |
setProgress(long value)
Record progress of the task, storing it persistently if needed. |
|
void |
setProgressImmediate(long value,
OperationResult parentResult)
|
|
void |
setProgressTransient(long value)
|
|
void |
setRecreateQuartzTrigger(boolean recreateQuartzTrigger)
|
|
void |
setRecurrenceStatus(TaskRecurrence value)
|
|
void |
setRecurrenceStatusImmediate(TaskRecurrence value,
OperationResult parentResult)
|
|
void |
setRecurrenceStatusTransient(TaskRecurrence value)
|
|
void |
setResult(OperationResult result)
|
|
void |
setResultImmediate(OperationResult result,
OperationResult parentResult)
|
|
void |
setResultStatusType(OperationResultStatusType value)
|
|
void |
setResultStatusTypeImmediate(OperationResultStatusType value,
OperationResult parentResult)
|
|
void |
setResultStatusTypeTransient(OperationResultStatusType value)
|
|
void |
setResultTransient(OperationResult result)
|
|
void |
setSchedule(ScheduleType value)
|
|
void |
setScheduleImmediate(ScheduleType value,
OperationResult parentResult)
|
|
void |
setThreadStopAction(ThreadStopActionType value)
|
|
void |
setThreadStopActionImmediate(ThreadStopActionType value,
OperationResult parentResult)
|
|
void |
signalShutdown()
Signal the task to shut down. |
|
boolean |
stillCanStart()
|
|
void |
synchronizeWithQuartz(OperationResult parentResult)
|
|
java.lang.String |
toString()
|
|
TaskRunResult |
waitForSubtasks(java.lang.Integer interval,
java.util.Collection<ItemDelta<?>> extensionDeltas,
OperationResult parentResult)
|
|
TaskRunResult |
waitForSubtasks(java.lang.Integer interval,
OperationResult parentResult)
Waits for subtasks to finish. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public PrismObject<TaskType> getTaskPrismObject()
getTaskPrismObject in interface Taskpublic boolean isAsynchronous()
Task
isAsynchronous in interface Taskpublic boolean isRecreateQuartzTrigger()
public void setRecreateQuartzTrigger(boolean recreateQuartzTrigger)
public void addPendingModification(ItemDelta<?> delta)
public void savePendingModifications(OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException,
ObjectAlreadyExistsException
Task
savePendingModifications in interface TaskObjectNotFoundException
SchemaException
ObjectAlreadyExistsExceptionpublic void synchronizeWithQuartz(OperationResult parentResult)
public long getProgress()
getProgress in interface Taskpublic void setProgress(long value)
Task
setProgress in interface Task
public void setProgressImmediate(long value,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
setProgressImmediate in interface TaskObjectNotFoundException
SchemaExceptionpublic void setProgressTransient(long value)
public OperationResult getResult()
Task
getResult in interface Taskpublic void setResult(OperationResult result)
setResult in interface Task
public void setResultImmediate(OperationResult result,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
setResultImmediate in interface TaskObjectNotFoundException
SchemaExceptionpublic void setResultTransient(OperationResult result)
public OperationResultStatusType getResultStatus()
getResultStatus in interface Taskpublic void setResultStatusType(OperationResultStatusType value)
public void setResultStatusTypeImmediate(OperationResultStatusType value,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException,
ObjectAlreadyExistsException
ObjectNotFoundException
SchemaException
ObjectAlreadyExistsExceptionpublic void setResultStatusTypeTransient(OperationResultStatusType value)
public java.lang.String getHandlerUri()
Task
getHandlerUri in interface Taskpublic void setHandlerUriTransient(java.lang.String handlerUri)
public void setHandlerUriImmediate(java.lang.String value,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
setHandlerUriImmediate in interface TaskObjectNotFoundException
SchemaExceptionpublic void setHandlerUri(java.lang.String value)
Task
setHandlerUri in interface Taskvalue - new handler URIpublic UriStack getOtherHandlersUriStack()
Task
getOtherHandlersUriStack in interface Taskpublic void setOtherHandlersUriStackTransient(UriStack value)
public void setOtherHandlersUriStackImmediate(UriStack value,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
ObjectNotFoundException
SchemaExceptionpublic void setOtherHandlersUriStack(UriStack value)
public void pushHandlerUri(java.lang.String uri,
ScheduleType schedule,
TaskBinding binding)
pushHandlerUri in interface Task
public void pushHandlerUri(java.lang.String uri,
ScheduleType schedule,
TaskBinding binding,
ItemDelta<?> delta)
pushHandlerUri in interface Task
public void pushHandlerUri(java.lang.String uri,
ScheduleType schedule,
TaskBinding binding,
java.util.Collection<ItemDelta<?>> extensionDeltas)
pushHandlerUri in interface Taskuri - New Handler URIschedule - New schedulebinding - New binding
public ItemDelta<?> createExtensionDelta(PrismPropertyDefinition definition,
java.lang.Object realValue)
createExtensionDelta in interface Task
public void finishHandler(OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
finishHandler in interface TaskObjectNotFoundException
SchemaExceptionpublic int getHandlersCount()
public TaskPersistenceStatus getPersistenceStatus()
Task
getPersistenceStatus in interface TaskTaskPersistenceStatuspublic boolean isPersistent()
isPersistent in interface Taskpublic boolean isTransient()
isTransient in interface Taskpublic java.lang.String getOid()
Task
getOid in interface Taskpublic void setOid(java.lang.String oid)
public java.lang.String getTaskIdentifier()
Task
getTaskIdentifier in interface Taskpublic TaskExecutionStatus getExecutionStatus()
Task
getExecutionStatus in interface TaskTaskExecutionStatuspublic void setExecutionStatusTransient(TaskExecutionStatus executionStatus)
public void setInitialExecutionStatus(TaskExecutionStatus value)
Task
setInitialExecutionStatus in interface Taskvalue - new task execution status.TaskExecutionStatus
public void setExecutionStatusImmediate(TaskExecutionStatus value,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
ObjectNotFoundException
SchemaExceptionpublic void setExecutionStatus(TaskExecutionStatus value)
public void makeRunnable()
Task
makeRunnable in interface Taskpublic void makeWaiting()
Task
makeWaiting in interface Taskpublic TaskRecurrence getRecurrenceStatus()
Task
getRecurrenceStatus in interface Taskpublic boolean isSingle()
Task
isSingle in interface Taskpublic boolean isCycle()
Task
isCycle in interface Taskpublic void setRecurrenceStatus(TaskRecurrence value)
public void setRecurrenceStatusImmediate(TaskRecurrence value,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
ObjectNotFoundException
SchemaExceptionpublic void setRecurrenceStatusTransient(TaskRecurrence value)
public void makeSingle()
makeSingle in interface Taskpublic void makeSingle(ScheduleType schedule)
makeSingle in interface Taskpublic void makeRecurrent(ScheduleType schedule)
makeRecurrent in interface Taskpublic void makeRecurrentSimple(int interval)
makeRecurrentSimple in interface Taskpublic void makeRecurrentCron(java.lang.String cronLikeSpecification)
makeRecurrentCron in interface Taskpublic ScheduleType getSchedule()
Task
getSchedule in interface Taskpublic void setSchedule(ScheduleType value)
public void setScheduleImmediate(ScheduleType value,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
ObjectNotFoundException
SchemaExceptionpublic ThreadStopActionType getThreadStopAction()
getThreadStopAction in interface Taskpublic void setThreadStopAction(ThreadStopActionType value)
setThreadStopAction in interface Task
public void setThreadStopActionImmediate(ThreadStopActionType value,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
ObjectNotFoundException
SchemaExceptionpublic boolean isResilient()
Task
isResilient in interface Taskpublic TaskBinding getBinding()
getBinding in interface Taskpublic boolean isTightlyBound()
isTightlyBound in interface Taskpublic boolean isLooselyBound()
isLooselyBound in interface Taskpublic void setBinding(TaskBinding value)
setBinding in interface Task
public void setBindingImmediate(TaskBinding value,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
setBindingImmediate in interface TaskObjectNotFoundException
SchemaExceptionpublic void setBindingTransient(TaskBinding value)
public PrismObject<UserType> getOwner()
Task
getOwner in interface Taskpublic void setOwner(PrismObject<UserType> owner)
setOwner in interface Taskpublic java.lang.String getChannel()
Task
getChannel in interface Taskpublic void setChannel(java.lang.String value)
Task
setChannel in interface Taskpublic void setChannelTransient(java.lang.String name)
public ObjectReferenceType getObjectRef()
Task
getObjectRef in interface Taskpublic void setObjectRef(ObjectReferenceType objectRefType)
setObjectRef in interface Taskpublic java.lang.String getObjectOid()
Task
getObjectOid in interface Task
public <T extends ObjectType> PrismObject<T> getObject(java.lang.Class<T> type,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
Task
getObject in interface TaskObjectNotFoundException
SchemaExceptionpublic PolyStringType getName()
Task
getName in interface Taskpublic void setName(PolyStringType value)
Task
setName in interface Taskvalue - new human-readable name of the task.
public void setNameImmediate(PolyStringType value,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException,
ObjectAlreadyExistsException
setNameImmediate in interface TaskObjectNotFoundException
SchemaException
ObjectAlreadyExistsExceptionpublic void setNameTransient(PolyStringType name)
public java.lang.String getDescription()
getDescription in interface Taskpublic void setDescription(java.lang.String value)
setDescription in interface Task
public void setDescriptionImmediate(java.lang.String value,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
setDescriptionImmediate in interface TaskObjectNotFoundException
SchemaExceptionpublic void setDescriptionTransient(java.lang.String name)
public java.lang.String getParent()
getParent in interface Taskpublic void setParent(java.lang.String value)
public void setParentImmediate(java.lang.String value,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
ObjectNotFoundException
SchemaExceptionpublic void setParentTransient(java.lang.String name)
public PrismContainer<?> getExtension()
Task
getExtension in interface Taskpublic PrismProperty<?> getExtension(javax.xml.namespace.QName propertyName)
getExtension in interface Task
public void setExtensionProperty(PrismProperty<?> property)
throws SchemaException
setExtensionProperty in interface TaskSchemaException
public void addExtensionProperty(PrismProperty<?> property)
throws SchemaException
addExtensionProperty in interface TaskSchemaException
public void deleteExtensionProperty(PrismProperty<?> property)
throws SchemaException
Task
deleteExtensionProperty in interface TaskSchemaException
public void modifyExtension(ItemDelta itemDelta)
throws SchemaException
modifyExtension in interface TaskSchemaException
public void setExtensionPropertyImmediate(PrismProperty<?> property,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
setExtensionPropertyImmediate in interface TaskObjectNotFoundException
SchemaException
public void setExtensionPropertyTransient(PrismProperty<?> property)
throws SchemaException
SchemaExceptionpublic java.lang.String getNode()
getNode in interface Taskpublic void setNode(java.lang.String value)
public void setNodeImmediate(java.lang.String value,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
ObjectNotFoundException
SchemaExceptionpublic void setNodeTransient(java.lang.String value)
public java.lang.Long getLastRunStartTimestamp()
Task
getLastRunStartTimestamp in interface Taskpublic void setLastRunStartTimestamp(java.lang.Long value)
public void setLastRunStartTimestampImmediate(java.lang.Long value,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
ObjectNotFoundException
SchemaExceptionpublic void setLastRunStartTimestampTransient(java.lang.Long value)
public java.lang.Long getLastRunFinishTimestamp()
Task
getLastRunFinishTimestamp in interface Taskpublic void setLastRunFinishTimestamp(java.lang.Long value)
public void setLastRunFinishTimestampImmediate(java.lang.Long value,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
ObjectNotFoundException
SchemaExceptionpublic void setLastRunFinishTimestampTransient(java.lang.Long value)
public java.lang.Long getNextRunStartTime(OperationResult parentResult)
Task
getNextRunStartTime in interface Taskpublic java.lang.String dump()
Task
dump in interface Taskdump in interface Dumpablepublic TaskHandler getHandler()
public void setCategory(java.lang.String value)
setCategory in interface Task
public void setCategoryImmediate(java.lang.String value,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
ObjectNotFoundException
SchemaExceptionpublic void setCategoryTransient(java.lang.String value)
public java.lang.String getCategory()
Task
getCategory in interface Taskpublic java.lang.String getCategoryFromHandler()
public ModelOperationStateType getModelOperationState()
getModelOperationState in interface Taskpublic void setModelOperationState(ModelOperationStateType value)
setModelOperationState in interface Task
public void setModelOperationStateImmediate(ModelOperationStateType value,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
ObjectNotFoundException
SchemaExceptionpublic void setModelOperationStateTransient(ModelOperationStateType value)
public void refresh(OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
Task
refresh in interface TaskObjectNotFoundException
SchemaExceptionpublic void signalShutdown()
public boolean canRun()
Task
canRun in interface Taskpublic boolean stillCanStart()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic Node currentlyExecutesAt()
Task
currentlyExecutesAt in interface Taskpublic Task createSubtask()
Task
createSubtask in interface Task
public TaskRunResult waitForSubtasks(java.lang.Integer interval,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException,
ObjectAlreadyExistsException
Task
waitForSubtasks in interface TaskObjectNotFoundException
SchemaException
ObjectAlreadyExistsException
public TaskRunResult waitForSubtasks(java.lang.Integer interval,
java.util.Collection<ItemDelta<?>> extensionDeltas,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException,
ObjectAlreadyExistsException
waitForSubtasks in interface TaskObjectNotFoundException
SchemaException
ObjectAlreadyExistsException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||