|
||||||||||
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,
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). |
|
String |
dump()
Return human-readable representation of the task content. |
|
boolean |
equals(Object obj)
|
|
void |
finishHandler(OperationResult parentResult)
|
|
TaskBinding |
getBinding()
|
|
String |
getCategory()
Categories are treated in a special way. |
|
String |
getCategoryFromHandler()
|
|
String |
getChannel()
Returns change channel URI. |
|
String |
getDescription()
|
|
TaskExecutionStatus |
getExecutionStatus()
Returns execution status. |
|
PrismContainer<?> |
getExtension()
Returns task extension. |
|
PrismProperty<?> |
getExtension(QName propertyName)
|
|
Item<?> |
getExtensionItem(QName propertyName)
|
|
TaskHandler |
getHandler()
|
|
int |
getHandlersCount()
|
|
String |
getHandlerUri()
Returns handler URI. |
|
Long |
getLastRunFinishTimestamp()
Returns the time when the task last run was finished (or null if the task was not finished yet). |
|
Long |
getLastRunStartTimestamp()
Returns the time when the task last run was started (or null if the task was never started). |
|
PolyStringType |
getName()
Returns human-readable name of the task. |
|
Long |
getNextRunStartTime(OperationResult parentResult)
Returns the time when the task should start again. |
|
String |
getNode()
|
|
|
getObject(Class<T> type,
OperationResult parentResult)
Returns object that the task is associated with. |
|
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. |
|
String |
getOid()
Returns task OID. |
|
UriStack |
getOtherHandlersUriStack()
Returns the stack of other handlers URIs. |
|
PrismObject<UserType> |
getOwner()
Returns user that owns this task. |
|
String |
getParent()
|
|
TaskPersistenceStatus |
getPersistenceStatus()
Returns task persistence status. |
|
long |
getProgress()
|
|
TaskRecurrence |
getRecurrenceStatus()
Returns task recurrence status. |
|
String |
getRequesteeOid()
|
|
PrismReference |
getRequesteeRef()
Works with the 'requestee', i.e. |
|
OperationResult |
getResult()
Returns a top-level OperationResult stored in the task. |
|
OperationResultStatusType |
getResultStatus()
|
|
ScheduleType |
getSchedule()
Returns the schedule. |
|
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(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(String uri,
ScheduleType schedule,
TaskBinding binding)
|
|
void |
pushHandlerUri(String uri,
ScheduleType schedule,
TaskBinding binding,
Collection<ItemDelta<?>> extensionDeltas)
Makes (uri, schedule, binding) the current task properties, and pushes current (uri, schedule, binding, extensionChange) onto the stack. |
|
void |
pushHandlerUri(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(String value)
|
|
void |
setCategoryImmediate(String value,
OperationResult parentResult)
|
|
void |
setCategoryTransient(String value)
|
|
void |
setChannel(String value)
Sets change channel URI. |
|
void |
setChannelTransient(String name)
|
|
void |
setDescription(String value)
|
|
void |
setDescriptionImmediate(String value,
OperationResult parentResult)
|
|
void |
setDescriptionTransient(String name)
|
|
void |
setExecutionStatus(TaskExecutionStatus value)
|
|
void |
setExecutionStatusImmediate(TaskExecutionStatus value,
OperationResult parentResult)
|
|
void |
setExecutionStatusTransient(TaskExecutionStatus executionStatus)
|
|
|
setExtensionContainer(PrismContainer<C> item)
|
|
void |
setExtensionProperty(PrismProperty<?> property)
|
|
void |
setExtensionPropertyImmediate(PrismProperty<?> property,
OperationResult parentResult)
|
|
void |
setExtensionPropertyTransient(PrismProperty<?> property)
|
|
void |
setExtensionReference(PrismReference reference)
|
|
void |
setHandlerUri(String value)
Sets handler URI. |
|
void |
setHandlerUriImmediate(String value,
OperationResult parentResult)
|
|
void |
setHandlerUriTransient(String handlerUri)
|
|
void |
setInitialExecutionStatus(TaskExecutionStatus value)
Sets task execution status. |
|
void |
setLastRunFinishTimestamp(Long value)
|
|
void |
setLastRunFinishTimestampImmediate(Long value,
OperationResult parentResult)
|
|
void |
setLastRunFinishTimestampTransient(Long value)
|
|
void |
setLastRunStartTimestamp(Long value)
|
|
void |
setLastRunStartTimestampImmediate(Long value,
OperationResult parentResult)
|
|
void |
setLastRunStartTimestampTransient(Long 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(String value)
|
|
void |
setNodeImmediate(String value,
OperationResult parentResult)
|
|
void |
setNodeTransient(String value)
|
|
void |
setObjectRef(ObjectReferenceType objectRefType)
|
|
void |
setOid(String oid)
|
|
void |
setOtherHandlersUriStack(UriStack value)
|
|
void |
setOtherHandlersUriStackImmediate(UriStack value,
OperationResult parentResult)
|
|
void |
setOtherHandlersUriStackTransient(UriStack value)
|
|
void |
setOwner(PrismObject<UserType> owner)
|
|
void |
setParent(String value)
|
|
void |
setParentImmediate(String value,
OperationResult parentResult)
|
|
void |
setParentTransient(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 |
setRequesteeOid(String oid)
|
|
void |
setRequesteeOidImmediate(String oid,
OperationResult result)
|
|
void |
setRequesteeRef(PrismObject<UserType> requestee)
|
|
void |
setRequesteeRef(PrismReferenceValue requesteeRef)
|
|
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)
|
|
String |
toString()
|
|
TaskRunResult |
waitForSubtasks(Integer interval,
Collection<ItemDelta<?>> extensionDeltas,
OperationResult parentResult)
|
|
TaskRunResult |
waitForSubtasks(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 Task
public boolean isAsynchronous()
Task
isAsynchronous
in interface Task
public 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 Task
ObjectNotFoundException
SchemaException
ObjectAlreadyExistsException
public void synchronizeWithQuartz(OperationResult parentResult)
public long getProgress()
getProgress
in interface Task
public void setProgress(long value)
Task
setProgress
in interface Task
public void setProgressImmediate(long value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
setProgressImmediate
in interface Task
ObjectNotFoundException
SchemaException
public void setProgressTransient(long value)
public OperationResult getResult()
Task
getResult
in interface Task
public void setResult(OperationResult result)
setResult
in interface Task
public void setResultImmediate(OperationResult result, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
setResultImmediate
in interface Task
ObjectNotFoundException
SchemaException
public void setResultTransient(OperationResult result)
public OperationResultStatusType getResultStatus()
getResultStatus
in interface Task
public void setResultStatusType(OperationResultStatusType value)
public void setResultStatusTypeImmediate(OperationResultStatusType value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, ObjectAlreadyExistsException
ObjectNotFoundException
SchemaException
ObjectAlreadyExistsException
public void setResultStatusTypeTransient(OperationResultStatusType value)
public String getHandlerUri()
Task
getHandlerUri
in interface Task
public void setHandlerUriTransient(String handlerUri)
public void setHandlerUriImmediate(String value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
setHandlerUriImmediate
in interface Task
ObjectNotFoundException
SchemaException
public void setHandlerUri(String value)
Task
setHandlerUri
in interface Task
value
- new handler URIpublic UriStack getOtherHandlersUriStack()
Task
getOtherHandlersUriStack
in interface Task
public void setOtherHandlersUriStackTransient(UriStack value)
public void setOtherHandlersUriStackImmediate(UriStack value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
ObjectNotFoundException
SchemaException
public void setOtherHandlersUriStack(UriStack value)
public void pushHandlerUri(String uri, ScheduleType schedule, TaskBinding binding)
pushHandlerUri
in interface Task
public void pushHandlerUri(String uri, ScheduleType schedule, TaskBinding binding, ItemDelta<?> delta)
pushHandlerUri
in interface Task
public void pushHandlerUri(String uri, ScheduleType schedule, TaskBinding binding, Collection<ItemDelta<?>> extensionDeltas)
pushHandlerUri
in interface Task
uri
- New Handler URIschedule
- New schedulebinding
- New bindingpublic ItemDelta<?> createExtensionDelta(PrismPropertyDefinition definition, Object realValue)
createExtensionDelta
in interface Task
public void finishHandler(OperationResult parentResult) throws ObjectNotFoundException, SchemaException
finishHandler
in interface Task
ObjectNotFoundException
SchemaException
public int getHandlersCount()
public TaskPersistenceStatus getPersistenceStatus()
Task
getPersistenceStatus
in interface Task
TaskPersistenceStatus
public boolean isPersistent()
isPersistent
in interface Task
public boolean isTransient()
isTransient
in interface Task
public String getOid()
Task
getOid
in interface Task
public void setOid(String oid)
public String getTaskIdentifier()
Task
getTaskIdentifier
in interface Task
public TaskExecutionStatus getExecutionStatus()
Task
getExecutionStatus
in interface Task
TaskExecutionStatus
public void setExecutionStatusTransient(TaskExecutionStatus executionStatus)
public void setInitialExecutionStatus(TaskExecutionStatus value)
Task
setInitialExecutionStatus
in interface Task
value
- new task execution status.TaskExecutionStatus
public void setExecutionStatusImmediate(TaskExecutionStatus value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
ObjectNotFoundException
SchemaException
public void setExecutionStatus(TaskExecutionStatus value)
public void makeRunnable()
Task
makeRunnable
in interface Task
public void makeWaiting()
Task
makeWaiting
in interface Task
public TaskRecurrence getRecurrenceStatus()
Task
getRecurrenceStatus
in interface Task
public boolean isSingle()
Task
isSingle
in interface Task
public boolean isCycle()
Task
isCycle
in interface Task
public void setRecurrenceStatus(TaskRecurrence value)
public void setRecurrenceStatusImmediate(TaskRecurrence value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
ObjectNotFoundException
SchemaException
public void setRecurrenceStatusTransient(TaskRecurrence value)
public void makeSingle()
makeSingle
in interface Task
public void makeSingle(ScheduleType schedule)
makeSingle
in interface Task
public void makeRecurrent(ScheduleType schedule)
makeRecurrent
in interface Task
public void makeRecurrentSimple(int interval)
makeRecurrentSimple
in interface Task
public void makeRecurrentCron(String cronLikeSpecification)
makeRecurrentCron
in interface Task
public ScheduleType getSchedule()
Task
getSchedule
in interface Task
public void setSchedule(ScheduleType value)
public void setScheduleImmediate(ScheduleType value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
ObjectNotFoundException
SchemaException
public ThreadStopActionType getThreadStopAction()
getThreadStopAction
in interface Task
public void setThreadStopAction(ThreadStopActionType value)
setThreadStopAction
in interface Task
public void setThreadStopActionImmediate(ThreadStopActionType value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
ObjectNotFoundException
SchemaException
public boolean isResilient()
Task
isResilient
in interface Task
public TaskBinding getBinding()
getBinding
in interface Task
public boolean isTightlyBound()
isTightlyBound
in interface Task
public boolean isLooselyBound()
isLooselyBound
in interface Task
public void setBinding(TaskBinding value)
setBinding
in interface Task
public void setBindingImmediate(TaskBinding value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
setBindingImmediate
in interface Task
ObjectNotFoundException
SchemaException
public void setBindingTransient(TaskBinding value)
public PrismObject<UserType> getOwner()
Task
getOwner
in interface Task
public void setOwner(PrismObject<UserType> owner)
setOwner
in interface Task
public String getChannel()
Task
getChannel
in interface Task
public void setChannel(String value)
Task
setChannel
in interface Task
public void setChannelTransient(String name)
public ObjectReferenceType getObjectRef()
Task
getObjectRef
in interface Task
public void setObjectRef(ObjectReferenceType objectRefType)
setObjectRef
in interface Task
public String getObjectOid()
Task
getObjectOid
in interface Task
public <T extends ObjectType> PrismObject<T> getObject(Class<T> type, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
Task
getObject
in interface Task
ObjectNotFoundException
SchemaException
public PolyStringType getName()
Task
getName
in interface Task
public void setName(PolyStringType value)
Task
setName
in interface Task
value
- new human-readable name of the task.public void setNameImmediate(PolyStringType value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, ObjectAlreadyExistsException
setNameImmediate
in interface Task
ObjectNotFoundException
SchemaException
ObjectAlreadyExistsException
public void setNameTransient(PolyStringType name)
public String getDescription()
getDescription
in interface Task
public void setDescription(String value)
setDescription
in interface Task
public void setDescriptionImmediate(String value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
setDescriptionImmediate
in interface Task
ObjectNotFoundException
SchemaException
public void setDescriptionTransient(String name)
public String getParent()
getParent
in interface Task
public void setParent(String value)
public void setParentImmediate(String value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
ObjectNotFoundException
SchemaException
public void setParentTransient(String name)
public PrismContainer<?> getExtension()
Task
getExtension
in interface Task
public PrismProperty<?> getExtension(QName propertyName)
getExtension
in interface Task
public Item<?> getExtensionItem(QName propertyName)
getExtensionItem
in interface Task
public void setExtensionProperty(PrismProperty<?> property) throws SchemaException
setExtensionProperty
in interface Task
SchemaException
public <C extends Containerable> void setExtensionContainer(PrismContainer<C> item) throws SchemaException
setExtensionContainer
in interface Task
SchemaException
public void setExtensionReference(PrismReference reference) throws SchemaException
setExtensionReference
in interface Task
SchemaException
public void addExtensionProperty(PrismProperty<?> property) throws SchemaException
addExtensionProperty
in interface Task
SchemaException
public void deleteExtensionProperty(PrismProperty<?> property) throws SchemaException
Task
deleteExtensionProperty
in interface Task
SchemaException
public void modifyExtension(ItemDelta itemDelta) throws SchemaException
modifyExtension
in interface Task
SchemaException
public void setExtensionPropertyImmediate(PrismProperty<?> property, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
setExtensionPropertyImmediate
in interface Task
ObjectNotFoundException
SchemaException
public void setExtensionPropertyTransient(PrismProperty<?> property) throws SchemaException
SchemaException
public PrismReference getRequesteeRef()
Task
getRequesteeRef
in interface Task
public String getRequesteeOid()
getRequesteeOid
in interface Task
public void setRequesteeRef(PrismReferenceValue requesteeRef) throws SchemaException
setRequesteeRef
in interface Task
SchemaException
public void setRequesteeRef(PrismObject<UserType> requestee) throws SchemaException
setRequesteeRef
in interface Task
SchemaException
public void setRequesteeOid(String oid) throws SchemaException
setRequesteeOid
in interface Task
SchemaException
public void setRequesteeOidImmediate(String oid, OperationResult result) throws SchemaException, ObjectNotFoundException
setRequesteeOidImmediate
in interface Task
SchemaException
ObjectNotFoundException
public String getNode()
getNode
in interface Task
public void setNode(String value)
public void setNodeImmediate(String value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
ObjectNotFoundException
SchemaException
public void setNodeTransient(String value)
public Long getLastRunStartTimestamp()
Task
getLastRunStartTimestamp
in interface Task
public void setLastRunStartTimestamp(Long value)
public void setLastRunStartTimestampImmediate(Long value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
ObjectNotFoundException
SchemaException
public void setLastRunStartTimestampTransient(Long value)
public Long getLastRunFinishTimestamp()
Task
getLastRunFinishTimestamp
in interface Task
public void setLastRunFinishTimestamp(Long value)
public void setLastRunFinishTimestampImmediate(Long value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
ObjectNotFoundException
SchemaException
public void setLastRunFinishTimestampTransient(Long value)
public Long getNextRunStartTime(OperationResult parentResult)
Task
getNextRunStartTime
in interface Task
public String dump()
Task
dump
in interface Task
dump
in interface Dumpable
public TaskHandler getHandler()
public void setCategory(String value)
setCategory
in interface Task
public void setCategoryImmediate(String value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
ObjectNotFoundException
SchemaException
public void setCategoryTransient(String value)
public String getCategory()
Task
getCategory
in interface Task
public String getCategoryFromHandler()
public void refresh(OperationResult parentResult) throws ObjectNotFoundException, SchemaException
Task
refresh
in interface Task
ObjectNotFoundException
SchemaException
public void signalShutdown()
public boolean canRun()
Task
canRun
in interface Task
public boolean stillCanStart()
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public Node currentlyExecutesAt()
Task
currentlyExecutesAt
in interface Task
public Task createSubtask()
Task
createSubtask
in interface Task
public TaskRunResult waitForSubtasks(Integer interval, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, ObjectAlreadyExistsException
Task
waitForSubtasks
in interface Task
ObjectNotFoundException
SchemaException
ObjectAlreadyExistsException
public TaskRunResult waitForSubtasks(Integer interval, Collection<ItemDelta<?>> extensionDeltas, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, ObjectAlreadyExistsException
waitForSubtasks
in interface Task
ObjectNotFoundException
SchemaException
ObjectAlreadyExistsException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |