public class TaskQuartzImpl extends Object implements Task
Target state (not quite reached as for now): Functionality present in Task is related to the
data structure describing the task itself, i.e. to the embedded TaskType prism and accompanying data.
Everything related to the management of tasks is put into TaskManagerQuartzImpl and its helper classes.
Modifier and Type | Field and Description |
---|---|
static String |
DOT_INTERFACE |
INDENT_STRING
Modifier and Type | Method and Description |
---|---|
void |
addDependent(String value)
Add a task as this task's dependent, i.e.
|
void |
addDependentTransient(String name) |
void |
addExtensionProperty(PrismProperty<?> property)
Adds value(s) to a given extension property.
|
void |
addExtensionReference(PrismReference reference)
Adds value(s) to a given extension reference.
|
void |
addModification(ItemDelta<?,?> delta)
Changes in-memory representation immediately and schedules a corresponding batched modification.
|
void |
addModificationImmediate(ItemDelta<?,?> delta,
OperationResult parentResult)
Changes in-memory and in-repo representations immediately.
|
void |
addModifications(Collection<ItemDelta<?,?>> deltas) |
void |
addPendingModification(ItemDelta<?,?> delta) |
boolean |
canRun()
Returns true if the task can run (was not interrupted).
|
void |
checkDependencies(OperationResult result) |
ItemDelta<?,?> |
createExtensionDelta(PrismPropertyDefinition definition,
Object realValue) |
Task |
createSubtask()
Creates a transient subtask.
|
Task |
createSubtask(LightweightTaskHandler handler)
Creates a transient subtask, ready to execute a given LightweightTaskHandler.
|
String |
debugDump()
Show the content of the object intended for diagnostics by system administrator.
|
String |
debugDump(int indent) |
void |
deleteDependent(String value)
Deletes a task from the list of dependents of this task.
|
void |
deleteDependentTransient(String name) |
void |
deleteExtensionProperty(PrismProperty<?> property)
Removes specified VALUES of this extension property (not all of its values).
|
boolean |
equals(Object obj) |
void |
finishHandler(OperationResult parentResult)
Removes current handler from the handlers stack.
|
ActionsExecutedInformation |
getActionsExecutedInformation() |
com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType |
getAggregatedLiveOperationStats()
Gets information from the current task and its transient subtasks (aka worker threads).
|
TaskBinding |
getBinding()
Returns task binding.
|
String |
getCategory()
Task category is a user-oriented term, hinting on what 'kind' of task is the one being considered
(system task, workflow, live sync, ...).
|
String |
getCategoryFromHandler() |
String |
getChannel()
Returns change channel URI.
|
Long |
getCompletionTimestamp()
Returns the completion timestamp - time when the task was closed (or null if it is not closed).
|
List<String> |
getDependents()
Lists all explicit dependents' identifiers.
|
String |
getDescription()
Returns task description.
|
TaskExecutionStatus |
getExecutionStatus()
Returns execution status.
|
Long |
getExpectedTotal()
Returns expected total progress.
|
PrismContainer<?> |
getExtension()
Returns task extension.
|
Item<?,?> |
getExtensionItem(QName propertyName)
Returns specified item (property, reference or container) from the extension.
|
<T> PrismProperty<T> |
getExtensionProperty(QName propertyName)
Returns specified property from the extension
|
<T> T |
getExtensionPropertyRealValue(QName propertyName)
Returns specified single-valued property real value from the extension
|
PrismReference |
getExtensionReference(QName propertyName)
Returns specified reference from the extension.
|
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).
|
Set<? extends Task> |
getLightweightAsynchronousSubtasks() |
Future |
getLightweightHandlerFuture() |
LightweightTaskHandler |
getLightweightTaskHandler() |
com.evolveum.midpoint.xml.ns._public.common.common_3.LensContextType |
getModelOperationContext() |
PolyStringType |
getName()
Returns human-readable name of the task.
|
Long |
getNextRunStartTime(OperationResult parentResult)
Returns the time when the task should start again.
|
String |
getNode()
Returns the node the task is currently executing at, based on repository information.
|
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
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.
|
com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType |
getObjectRef()
Returns reference to the object that the task is associated with.
|
String |
getOid()
Returns task OID.
|
com.evolveum.midpoint.xml.ns._public.common.common_3.UriStack |
getOtherHandlersUriStack()
Returns the stack of other handlers URIs.
|
PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.UserType> |
getOwner()
Returns user that owns this task.
|
String |
getParent()
Returns the identifier of the task's parent (or null of there is no parent task).
|
Task |
getParentTask(OperationResult result)
Returns the parent task, if any.
|
Collection<ItemDelta<?,?>> |
getPendingModifications()
Returns a list of pending modifications for this task.
|
TaskPersistenceStatus |
getPersistenceStatus()
Returns task persistence status.
|
long |
getProgress()
Returns task progress, as reported by task handler.
|
TaskRecurrence |
getRecurrenceStatus()
Returns task recurrence status.
|
PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.UserType> |
getRequestee()
Gets the requestee OID - typically an identification of account owner (for notifications).
|
OperationResult |
getResult()
Returns a top-level OperationResult stored in the task.
|
com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultStatusType |
getResultStatus()
Returns the status of top-level OperationResult stored in the task.
|
Set<? extends Task> |
getRunningLightweightAsynchronousSubtasks() |
com.evolveum.midpoint.xml.ns._public.common.common_3.ScheduleType |
getSchedule()
Returns the schedule.
|
com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType |
getStoredOperationStats() |
String |
getTaskIdentifier()
Returns task (lightweight) identifier.
|
PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType> |
getTaskPrismObject()
Returns backing task prism object.
|
com.evolveum.midpoint.xml.ns._public.common.common_3.ThreadStopActionType |
getThreadStopAction()
Returns thread stop action (what happens when the task thread is stopped e.g.
|
TaskWaitingReason |
getWaitingReason()
Returns the task waiting reason for a WAITING task.
|
com.evolveum.midpoint.xml.ns._public.common.common_3.WfContextType |
getWorkflowContext() |
int |
hashCode() |
void |
initializeWorkflowContextImmediate(String processInstanceId,
OperationResult result) |
boolean |
isAsynchronous()
Returns true if the task is asynchronous.
|
boolean |
isClosed()
Returns true if the task is closed.
|
boolean |
isCycle()
Checks whether the task is a cyclic (recurrent) one.
|
boolean |
isLightweightAsynchronousTask() |
boolean |
isLightweightHandlerExecuting() |
boolean |
isLooselyBound()
Returns true if the task is loosely bound.
|
boolean |
isPersistent()
Returns true if task is persistent (i.e.
|
boolean |
isRecreateQuartzTrigger() |
boolean |
isResilient()
Resilient tasks are those that survive node shutdown.
|
boolean |
isSingle()
Checks whether the task is single-run.
|
boolean |
isTightlyBound()
Returns true if the task is tightly bound.
|
boolean |
isTransient()
Returns true if task is transient (i.e.
|
boolean |
lightweightHandlerStartRequested() |
List<Task> |
listDependents(OperationResult parentResult)
Lists all explicit dependents, i.e.
|
List<Task> |
listPrerequisiteTasks(OperationResult parentResult)
List all prerequisite tasks for the current tasks, i.e.
|
List<PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType>> |
listPrerequisiteTasksRaw(OperationResult parentResult) |
List<Task> |
listSubtasks(OperationResult parentResult)
Lists the (direct) subtasks of a given task.
|
List<Task> |
listSubtasksDeeply(OperationResult parentResult)
List all the subtasks of a given task, i.e.
|
List<PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType>> |
listSubtasksRaw(OperationResult parentResult) |
void |
makeRecurring(com.evolveum.midpoint.xml.ns._public.common.common_3.ScheduleType schedule)
Makes a task recurring, with a given schedule.
|
void |
makeRecurringCron(String cronLikeSpecification)
Makes a task recurring, running according to a cron-like schedule.
|
void |
makeRecurringSimple(int interval)
Makes a task recurring, running in a fixed time intervals.
|
void |
makeRunnable()
Status-changing method.
|
void |
makeSingle()
Makes a task single-run, with no particular schedule.
|
void |
makeSingle(com.evolveum.midpoint.xml.ns._public.common.common_3.ScheduleType schedule)
Makes a task single-run, with a given schedule.
|
void |
makeWaiting()
Status-changing method.
|
void |
makeWaiting(TaskWaitingReason reason)
Changes exec status to WAITING, with a given waiting reason.
|
void |
markObjectActionExecutedBoundary() |
void |
modifyExtension(ItemDelta itemDelta)
Modifies task extension using given delta.
|
void |
pushHandlerUri(String uri,
com.evolveum.midpoint.xml.ns._public.common.common_3.ScheduleType schedule,
TaskBinding binding)
Same as above, with no extension deltas.
|
void |
pushHandlerUri(String uri,
com.evolveum.midpoint.xml.ns._public.common.common_3.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,
com.evolveum.midpoint.xml.ns._public.common.common_3.ScheduleType schedule,
TaskBinding binding,
ItemDelta<?,?> delta)
Same as above, with one extension delta (not a collection of them).
|
void |
pushWaitForTasksHandlerUri()
There is a special "marker" task handler (@see WaitForTasksTaskHandler) that, when executed, causes
current task to wait for its prerequisities.
|
void |
recordIterativeOperationEnd(com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType shadow,
long started,
Throwable exception) |
void |
recordIterativeOperationEnd(String objectName,
String objectDisplayName,
QName objectType,
String objectOid,
long started,
Throwable exception) |
void |
recordIterativeOperationStart(com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType shadow) |
void |
recordIterativeOperationStart(String objectName,
String objectDisplayName,
QName objectType,
String objectOid)
Records information about iterative processing of objects.
|
void |
recordMappingOperation(String objectOid,
String objectName,
String objectTypeName,
String mappingName,
long duration) |
void |
recordNotificationOperation(String transportName,
boolean success,
long duration) |
void |
recordObjectActionExecuted(PrismObject<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> object,
ChangeType changeType,
Throwable exception) |
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
recordObjectActionExecuted(PrismObject<T> object,
Class<T> objectTypeClass,
String defaultOid,
ChangeType changeType,
String channel,
Throwable exception) |
void |
recordObjectActionExecuted(String objectName,
String objectDisplayName,
QName objectType,
String objectOid,
ChangeType changeType,
String channel,
Throwable exception)
Records information about repository (focal) events.
|
void |
recordProvisioningOperation(String resourceOid,
String resourceName,
QName objectClassName,
ProvisioningOperation operation,
boolean success,
int count,
long duration) |
void |
recordState(String message)
Records various kinds of operational information.
|
void |
recordSynchronizationOperationEnd(String objectName,
String objectDisplayName,
QName objectType,
String objectOid,
long started,
Throwable exception,
SynchronizationInformation.Record originalStateIncrement,
SynchronizationInformation.Record newStateIncrement) |
void |
recordSynchronizationOperationStart(String objectName,
String objectDisplayName,
QName objectType,
String objectOid)
Records information about synchronization events.
|
void |
refresh(OperationResult parentResult)
Re-reads the task state from the persistent storage.
|
void |
resetActionsExecutedInformation(com.evolveum.midpoint.xml.ns._public.common.common_3.ActionsExecutedInformationType value) |
void |
resetEnvironmentalPerformanceInformation(com.evolveum.midpoint.xml.ns._public.common.common_3.EnvironmentalPerformanceInformationType value)
Sets initial values for statistics.
|
void |
resetIterativeTaskInformation(com.evolveum.midpoint.xml.ns._public.common.common_3.IterativeTaskInformationType value) |
void |
resetSynchronizationInformation(com.evolveum.midpoint.xml.ns._public.common.common_3.SynchronizationInformationType value) |
void |
savePendingModifications(OperationResult parentResult)
Saves modifications done against the in-memory version of the task into the repository.
|
void |
setBinding(TaskBinding value)
Sets the binding for this task.
|
void |
setBindingImmediate(TaskBinding value,
OperationResult parentResult)
Sets the binding (immediately through to the repo).
|
void |
setBindingTransient(TaskBinding value) |
void |
setCategory(String value)
Sets the task category.
|
void |
setCategoryImmediate(String value,
OperationResult parentResult) |
void |
setCategoryTransient(String value) |
void |
setChannel(String value)
Sets change channel URI.
|
void |
setChannelImmediate(String value,
OperationResult parentResult)
Sets change channel URI.
|
void |
setChannelTransient(String name) |
void |
setCompletionTimestamp(Long value) |
void |
setCompletionTimestampImmediate(Long value,
OperationResult parentResult) |
void |
setCompletionTimestampTransient(Long value) |
void |
setDescription(String value)
Sets task description.
|
void |
setDescriptionImmediate(String value,
OperationResult parentResult)
Sets task description, immediately storing it into the repo.
|
void |
setDescriptionTransient(String name) |
void |
setExecutionStatus(TaskExecutionStatus value) |
void |
setExecutionStatusImmediate(TaskExecutionStatus value,
OperationResult parentResult) |
void |
setExecutionStatusTransient(TaskExecutionStatus executionStatus) |
void |
setExpectedTotal(Long value)
Stores expected total progress of the task, storing it persistently if needed.
|
void |
setExpectedTotalImmediate(Long value,
OperationResult parentResult)
"Immediate" version of the above method.
|
void |
setExpectedTotalTransient(Long value) |
<C extends Containerable> |
setExtensionContainer(PrismContainer<C> container)
Sets a container in the extension - replaces existing value(s), if any, by the one(s) provided.
|
<T extends Containerable> |
setExtensionContainerValue(QName containerName,
T value)
Sets a container value in the extension - replaces existing value(s), if any, by the one provided.
|
void |
setExtensionItem(Item item)
Puts generic item into extension.
|
void |
setExtensionProperty(PrismProperty<?> property)
Sets a property in the extension - replaces existing value(s), if any, by the one(s) provided.
|
void |
setExtensionPropertyImmediate(PrismProperty<?> property,
OperationResult parentResult)
"Immediate" version of the above method.
|
<T> void |
setExtensionPropertyValue(QName propertyName,
T value)
Sets (i.e., replaces) the value of the given property in task extension.
|
<T> void |
setExtensionPropertyValueTransient(QName propertyName,
T value)
Sets (i.e., replaces) the value of the given property in task extension - without writing to repo.
|
void |
setExtensionReference(PrismReference reference)
Sets a reference in the extension - replaces existing value(s), if any, by the one(s) provided.
|
void |
setHandlerUri(String value)
Sets handler URI.
|
void |
setHandlerUriImmediate(String value,
OperationResult parentResult)
Sets handler URI, also immediately in the repository.
|
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 |
setLightweightHandlerExecuting(boolean lightweightHandlerExecuting) |
void |
setLightweightTaskHandler(LightweightTaskHandler lightweightTaskHandler) |
void |
setModelOperationContext(com.evolveum.midpoint.xml.ns._public.common.common_3.LensContextType value) |
void |
setModelOperationContextImmediate(com.evolveum.midpoint.xml.ns._public.common.common_3.LensContextType value,
OperationResult parentResult) |
void |
setModelOperationContextTransient(com.evolveum.midpoint.xml.ns._public.common.common_3.LensContextType value) |
void |
setName(PolyStringType value)
Sets the human-readable name of the task.
|
void |
setName(String value)
Sets the human-readable name of the task.
|
void |
setNameImmediate(PolyStringType value,
OperationResult parentResult)
Sets the human-readable name of the task, immediately into repository.
|
void |
setNameTransient(PolyStringType name) |
void |
setNode(String value) |
void |
setNodeImmediate(String value,
OperationResult parentResult) |
void |
setNodeTransient(String value) |
void |
setObjectRef(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType value)
Sets the object reference.
|
void |
setObjectRef(String oid,
QName type)
Sets the object reference.
|
void |
setObjectRefImmediate(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType value,
OperationResult parentResult)
"Immediate" version of the previous method.
|
void |
setObjectRefTransient(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType objectRefType) |
void |
setObjectTransient(PrismObject object)
Sets the "task object" in the in-memory task representation (i.e.
|
void |
setOid(String oid) |
void |
setOperationStats(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType value) |
void |
setOperationStatsTransient(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType value) |
void |
setOtherHandlersUriStack(com.evolveum.midpoint.xml.ns._public.common.common_3.UriStack value) |
void |
setOtherHandlersUriStackImmediate(com.evolveum.midpoint.xml.ns._public.common.common_3.UriStack value,
OperationResult parentResult) |
void |
setOtherHandlersUriStackTransient(com.evolveum.midpoint.xml.ns._public.common.common_3.UriStack value) |
void |
setOwner(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.UserType> owner)
Sets the task 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)
"Immediate" version of the above method.
|
void |
setProgressTransient(long value) |
void |
setRecreateQuartzTrigger(boolean recreateQuartzTrigger) |
void |
setRecurrenceStatus(TaskRecurrence value) |
void |
setRecurrenceStatusImmediate(TaskRecurrence value,
OperationResult parentResult) |
void |
setRecurrenceStatusTransient(TaskRecurrence value) |
void |
setRequesteeTransient(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.UserType> user)
Sets the requestee OID.
|
void |
setResult(OperationResult result)
Sets the top-level OperationResult stored in the task.
|
void |
setResultImmediate(OperationResult result,
OperationResult parentResult)
"Immediate" version of above method.
|
void |
setResultStatusType(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultStatusType value) |
void |
setResultStatusTypeImmediate(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultStatusType value,
OperationResult parentResult) |
void |
setResultStatusTypeTransient(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultStatusType value) |
void |
setResultTransient(OperationResult result) |
void |
setSchedule(com.evolveum.midpoint.xml.ns._public.common.common_3.ScheduleType value) |
void |
setScheduleImmediate(com.evolveum.midpoint.xml.ns._public.common.common_3.ScheduleType value,
OperationResult parentResult) |
void |
setThreadStopAction(com.evolveum.midpoint.xml.ns._public.common.common_3.ThreadStopActionType value)
Sets the thread stop action for this task.
|
void |
setThreadStopActionImmediate(com.evolveum.midpoint.xml.ns._public.common.common_3.ThreadStopActionType value,
OperationResult parentResult) |
void |
setWaitingReason(TaskWaitingReason value) |
void |
setWaitingReasonImmediate(TaskWaitingReason value,
OperationResult parentResult) |
void |
setWaitingReasonTransient(TaskWaitingReason value) |
void |
setWorkflowContext(com.evolveum.midpoint.xml.ns._public.common.common_3.WfContextType value) |
void |
setWorkflowContextImmediate(com.evolveum.midpoint.xml.ns._public.common.common_3.WfContextType value,
OperationResult parentResult) |
void |
setWorkflowContextTransient(com.evolveum.midpoint.xml.ns._public.common.common_3.WfContextType value) |
void |
startCollectingOperationStatsFromStoredValues(boolean enableIterationStatistics,
boolean enableSynchronizationStatistics,
boolean enableActionsExecutedStatistics) |
void |
startCollectingOperationStatsFromZero(boolean enableIterationStatistics,
boolean enableSynchronizationStatistics,
boolean enableActionsExecutedStatistics) |
void |
startLightweightHandler()
Starts execution of a transient task carrying a LightweightTaskHandler.
|
void |
startWaitingForTasksImmediate(OperationResult result)
Starts "passive" waiting for other tasks.
|
boolean |
stillCanStart() |
void |
storeOperationStats() |
void |
synchronizeWithQuartz(OperationResult parentResult) |
String |
toString() |
void |
unsetCanRun()
Signal the task to shut down.
|
void |
updateStoredTaskResult() |
TaskRunResult |
waitForSubtasks(Integer interval,
Collection<ItemDelta<?,?>> extensionDeltas,
OperationResult parentResult)
Deprecated.
|
TaskRunResult |
waitForSubtasks(Integer interval,
OperationResult parentResult)
Deprecated.
|
public static final String DOT_INTERFACE
public PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType> getTaskPrismObject()
Task
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 addModification(ItemDelta<?,?> delta) throws SchemaException
Task
addModification
in interface Task
SchemaException
public void addModifications(Collection<ItemDelta<?,?>> deltas) throws SchemaException
addModifications
in interface Task
SchemaException
public void addModificationImmediate(ItemDelta<?,?> delta, OperationResult parentResult) throws SchemaException, ObjectAlreadyExistsException, ObjectNotFoundException
Task
addModificationImmediate
in interface Task
SchemaException
ObjectAlreadyExistsException
ObjectNotFoundException
public void savePendingModifications(OperationResult parentResult) throws ObjectNotFoundException, SchemaException, ObjectAlreadyExistsException
Task
savePendingModifications
in interface Task
ObjectNotFoundException
SchemaException
ObjectAlreadyExistsException
public Collection<ItemDelta<?,?>> getPendingModifications()
Task
getPendingModifications
in interface Task
public void synchronizeWithQuartz(OperationResult parentResult)
public long getProgress()
Task
getProgress
in interface Task
public void setProgress(long value)
Task
setProgress
in interface Task
public void setProgressImmediate(long value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
Task
setProgressImmediate
in interface Task
ObjectNotFoundException
SchemaException
public void setProgressTransient(long value)
setProgressTransient
in interface Task
public com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType getStoredOperationStats()
getStoredOperationStats
in interface Task
public void setOperationStatsTransient(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType value)
public void setOperationStats(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType value)
public Long getExpectedTotal()
Task
getExpectedTotal
in interface Task
public void setExpectedTotal(Long value)
Task
setExpectedTotal
in interface Task
public void setExpectedTotalImmediate(Long value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
Task
setExpectedTotalImmediate
in interface Task
ObjectNotFoundException
SchemaException
public void setExpectedTotalTransient(Long value)
public OperationResult getResult()
Task
public void setResult(OperationResult result)
Task
public void setResultImmediate(OperationResult result, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
Task
setResultImmediate
in interface Task
ObjectNotFoundException
SchemaException
public void updateStoredTaskResult() throws SchemaException, ObjectNotFoundException
public void setResultTransient(OperationResult result)
public com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultStatusType getResultStatus()
Task
getResultStatus
in interface Task
public void setResultStatusType(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultStatusType value)
public void setResultStatusTypeImmediate(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultStatusType value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, ObjectAlreadyExistsException
public void setResultStatusTypeTransient(com.evolveum.midpoint.xml.ns._public.common.common_3.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
Task
setHandlerUriImmediate
in interface Task
ObjectNotFoundException
SchemaException
public void setHandlerUri(String value)
Task
setHandlerUri
in interface Task
value
- new handler URIpublic com.evolveum.midpoint.xml.ns._public.common.common_3.UriStack getOtherHandlersUriStack()
Task
getOtherHandlersUriStack
in interface Task
public void setOtherHandlersUriStackTransient(com.evolveum.midpoint.xml.ns._public.common.common_3.UriStack value)
public void setOtherHandlersUriStackImmediate(com.evolveum.midpoint.xml.ns._public.common.common_3.UriStack value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
public void setOtherHandlersUriStack(com.evolveum.midpoint.xml.ns._public.common.common_3.UriStack value)
public void pushHandlerUri(String uri, com.evolveum.midpoint.xml.ns._public.common.common_3.ScheduleType schedule, TaskBinding binding)
Task
pushHandlerUri
in interface Task
public void pushHandlerUri(String uri, com.evolveum.midpoint.xml.ns._public.common.common_3.ScheduleType schedule, TaskBinding binding, ItemDelta<?,?> delta)
Task
pushHandlerUri
in interface Task
delta
- EXPERIMENTAL, do not use if not absolutely necessary.public void pushHandlerUri(String uri, com.evolveum.midpoint.xml.ns._public.common.common_3.ScheduleType schedule, TaskBinding binding, Collection<ItemDelta<?,?>> extensionDeltas)
pushHandlerUri
in interface Task
uri
- New Handler URIschedule
- New schedulebinding
- New bindingextensionDeltas
- The feature is EXPERIMENTAL, do not use if not absolutely necessary.public ItemDelta<?,?> createExtensionDelta(PrismPropertyDefinition definition, Object realValue)
public void finishHandler(OperationResult parentResult) throws ObjectNotFoundException, SchemaException
Task
finishHandler
in interface Task
ObjectNotFoundException
SchemaException
public void checkDependencies(OperationResult result) throws SchemaException, ObjectNotFoundException
public int getHandlersCount()
public TaskPersistenceStatus getPersistenceStatus()
Task
getPersistenceStatus
in interface Task
TaskPersistenceStatus
public boolean isPersistent()
Task
isPersistent
in interface Task
public boolean isTransient()
Task
isTransient
in interface Task
public String getOid()
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
public void setExecutionStatus(TaskExecutionStatus value)
public void makeRunnable()
Task
makeRunnable
in interface Task
public void makeWaiting()
Task
makeWaiting
in interface Task
public void makeWaiting(TaskWaitingReason reason)
Task
makeWaiting
in interface Task
public boolean isClosed()
Task
public TaskWaitingReason getWaitingReason()
Task
getWaitingReason
in interface Task
public void setWaitingReasonTransient(TaskWaitingReason value)
public void setWaitingReason(TaskWaitingReason value)
public void setWaitingReasonImmediate(TaskWaitingReason value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
public void startWaitingForTasksImmediate(OperationResult result) throws SchemaException, ObjectNotFoundException
Task
startWaitingForTasksImmediate
in interface Task
SchemaException
ObjectNotFoundException
public TaskRecurrence getRecurrenceStatus()
Task
getRecurrenceStatus
in interface Task
public boolean isSingle()
Task
public boolean isCycle()
Task
public void setRecurrenceStatus(TaskRecurrence value)
public void setRecurrenceStatusImmediate(TaskRecurrence value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
public void setRecurrenceStatusTransient(TaskRecurrence value)
public void makeSingle()
Task
makeSingle
in interface Task
public void makeSingle(com.evolveum.midpoint.xml.ns._public.common.common_3.ScheduleType schedule)
Task
makeSingle
in interface Task
public void makeRecurring(com.evolveum.midpoint.xml.ns._public.common.common_3.ScheduleType schedule)
Task
makeRecurring
in interface Task
public void makeRecurringSimple(int interval)
Task
makeRecurringSimple
in interface Task
interval
- interval to run the task (in seconds)public void makeRecurringCron(String cronLikeSpecification)
Task
makeRecurringCron
in interface Task
cronLikeSpecification
- schedule specificationpublic com.evolveum.midpoint.xml.ns._public.common.common_3.ScheduleType getSchedule()
Task
getSchedule
in interface Task
public void setSchedule(com.evolveum.midpoint.xml.ns._public.common.common_3.ScheduleType value)
public void setScheduleImmediate(com.evolveum.midpoint.xml.ns._public.common.common_3.ScheduleType value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
public com.evolveum.midpoint.xml.ns._public.common.common_3.ThreadStopActionType getThreadStopAction()
Task
getThreadStopAction
in interface Task
public void setThreadStopAction(com.evolveum.midpoint.xml.ns._public.common.common_3.ThreadStopActionType value)
Task
setThreadStopAction
in interface Task
public void setThreadStopActionImmediate(com.evolveum.midpoint.xml.ns._public.common.common_3.ThreadStopActionType value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
public boolean isResilient()
Task
isResilient
in interface Task
public TaskBinding getBinding()
Task
getBinding
in interface Task
public boolean isTightlyBound()
Task
isTightlyBound
in interface Task
public boolean isLooselyBound()
Task
isLooselyBound
in interface Task
public void setBinding(TaskBinding value)
Task
setBinding
in interface Task
public void setBindingImmediate(TaskBinding value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
Task
setBindingImmediate
in interface Task
ObjectNotFoundException
SchemaException
public void setBindingTransient(TaskBinding value)
public PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.UserType> getOwner()
Task
public void setOwner(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.UserType> owner)
Task
public String getChannel()
Task
getChannel
in interface Task
public void setChannel(String value)
Task
setChannel
in interface Task
public void setChannelImmediate(String value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
Task
setChannelImmediate
in interface Task
ObjectNotFoundException
SchemaException
public void setChannelTransient(String name)
public com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType getObjectRef()
Task
getObjectRef
in interface Task
public void setObjectRef(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType value)
Task
setObjectRef
in interface Task
public void setObjectRef(String oid, QName type)
Task
setObjectRef
in interface Task
public void setObjectRefImmediate(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, ObjectAlreadyExistsException
Task
setObjectRefImmediate
in interface Task
ObjectNotFoundException
SchemaException
ObjectAlreadyExistsException
public void setObjectRefTransient(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType objectRefType)
public String getObjectOid()
Task
getObjectOid
in interface Task
public <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> PrismObject<T> getObject(Class<T> type, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
Task
getObject
in interface Task
ObjectNotFoundException
SchemaException
public void setObjectTransient(PrismObject object)
Task
setObjectTransient
in interface Task
public PolyStringType getName()
Task
public void setName(PolyStringType value)
Task
public void setName(String value)
Task
public void setNameImmediate(PolyStringType value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, ObjectAlreadyExistsException
Task
setNameImmediate
in interface Task
ObjectNotFoundException
SchemaException
ObjectAlreadyExistsException
public void setNameTransient(PolyStringType name)
public String getDescription()
Task
getDescription
in interface Task
public void setDescription(String value)
Task
setDescription
in interface Task
public void setDescriptionImmediate(String value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
Task
setDescriptionImmediate
in interface Task
ObjectNotFoundException
SchemaException
public void setDescriptionTransient(String name)
public String getParent()
Task
public Task getParentTask(OperationResult result) throws SchemaException, ObjectNotFoundException
Task
getParentTask
in interface Task
SchemaException
ObjectNotFoundException
public void setParent(String value)
public void setParentImmediate(String value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
public void setParentTransient(String name)
public List<String> getDependents()
Task
getDependents
in interface Task
public List<Task> listDependents(OperationResult parentResult) throws SchemaException, ObjectNotFoundException
Task
listDependents
in interface Task
SchemaException
ObjectNotFoundException
public void addDependent(String value)
Task
addDependent
in interface Task
public void addDependentTransient(String name)
public void deleteDependent(String value)
Task
deleteDependent
in interface Task
public void deleteDependentTransient(String name)
public PrismContainer<?> getExtension()
Task
getExtension
in interface Task
public <T> PrismProperty<T> getExtensionProperty(QName propertyName)
Task
getExtensionProperty
in interface Task
public <T> T getExtensionPropertyRealValue(QName propertyName)
Task
getExtensionPropertyRealValue
in interface Task
public Item<?,?> getExtensionItem(QName propertyName)
Task
getExtensionItem
in interface Task
public PrismReference getExtensionReference(QName propertyName)
Task
getExtensionReference
in interface Task
public void setExtensionItem(Item item) throws SchemaException
Task
setExtensionItem
in interface Task
SchemaException
public void setExtensionProperty(PrismProperty<?> property) throws SchemaException
Task
setExtensionProperty
in interface Task
SchemaException
public void setExtensionReference(PrismReference reference) throws SchemaException
Task
setExtensionReference
in interface Task
SchemaException
public void addExtensionReference(PrismReference reference) throws SchemaException
Task
addExtensionReference
in interface Task
reference
- holder of the value(s) to be added into task extension referenceSchemaException
public <C extends Containerable> void setExtensionContainer(PrismContainer<C> container) throws SchemaException
Task
setExtensionContainer
in interface Task
container
- Container with value(s) to be put into task extension.SchemaException
public <T> void setExtensionPropertyValue(QName propertyName, T value) throws SchemaException
Task
setExtensionPropertyValue
in interface Task
propertyName
- name of the propertyvalue
- value of the propertySchemaException
public <T> void setExtensionPropertyValueTransient(QName propertyName, T value) throws SchemaException
Task
setExtensionPropertyValueTransient
in interface Task
propertyName
- name of the propertyvalue
- value of the propertySchemaException
public <T extends Containerable> void setExtensionContainerValue(QName containerName, T value) throws SchemaException
Task
setExtensionContainerValue
in interface Task
containerName
- name of the containervalue
- value to be put into extensionSchemaException
public void addExtensionProperty(PrismProperty<?> property) throws SchemaException
Task
addExtensionProperty
in interface Task
property
- holder of the value(s) to be added into task extension propertySchemaException
public void deleteExtensionProperty(PrismProperty<?> property) throws SchemaException
Task
deleteExtensionProperty
in interface Task
SchemaException
public void modifyExtension(ItemDelta itemDelta) throws SchemaException
Task
modifyExtension
in interface Task
SchemaException
public void setExtensionPropertyImmediate(PrismProperty<?> property, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
Task
setExtensionPropertyImmediate
in interface Task
ObjectNotFoundException
SchemaException
public PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.UserType> getRequestee()
Task
getRequestee
in interface Task
public void setRequesteeTransient(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.UserType> user)
Task
setRequesteeTransient
in interface Task
public com.evolveum.midpoint.xml.ns._public.common.common_3.LensContextType getModelOperationContext()
getModelOperationContext
in interface Task
public void setModelOperationContext(com.evolveum.midpoint.xml.ns._public.common.common_3.LensContextType value) throws SchemaException
setModelOperationContext
in interface Task
SchemaException
public void setModelOperationContextImmediate(com.evolveum.midpoint.xml.ns._public.common.common_3.LensContextType value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
public void setModelOperationContextTransient(com.evolveum.midpoint.xml.ns._public.common.common_3.LensContextType value)
public void setWorkflowContext(com.evolveum.midpoint.xml.ns._public.common.common_3.WfContextType value) throws SchemaException
setWorkflowContext
in interface Task
SchemaException
public void setWorkflowContextImmediate(com.evolveum.midpoint.xml.ns._public.common.common_3.WfContextType value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
public void setWorkflowContextTransient(com.evolveum.midpoint.xml.ns._public.common.common_3.WfContextType value)
public com.evolveum.midpoint.xml.ns._public.common.common_3.WfContextType getWorkflowContext()
getWorkflowContext
in interface Task
public void initializeWorkflowContextImmediate(String processInstanceId, OperationResult result) throws SchemaException, ObjectNotFoundException
initializeWorkflowContextImmediate
in interface Task
SchemaException
ObjectNotFoundException
public String getNode()
Task
public void setNode(String value)
public void setNodeImmediate(String value, OperationResult parentResult) throws 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
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
public void setLastRunFinishTimestampTransient(Long value)
public Long getCompletionTimestamp()
Task
getCompletionTimestamp
in interface Task
public void setCompletionTimestamp(Long value)
public void setCompletionTimestampImmediate(Long value, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
public void setCompletionTimestampTransient(Long value)
public Long getNextRunStartTime(OperationResult parentResult)
Task
getNextRunStartTime
in interface Task
public String debugDump()
DebugDumpable
debugDump
in interface DebugDumpable
public String debugDump(int indent)
debugDump
in interface DebugDumpable
public TaskHandler getHandler()
public void setCategory(String value)
Task
setCategory
in interface Task
public void setCategoryImmediate(String value, OperationResult parentResult) throws 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 unsetCanRun()
public boolean canRun()
Task
public boolean stillCanStart()
public Task createSubtask()
Task
createSubtask
in interface Task
public Task createSubtask(LightweightTaskHandler handler)
Task
createSubtask
in interface Task
@Deprecated public TaskRunResult waitForSubtasks(Integer interval, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, ObjectAlreadyExistsException
@Deprecated public TaskRunResult waitForSubtasks(Integer interval, Collection<ItemDelta<?,?>> extensionDeltas, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, ObjectAlreadyExistsException
public List<PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType>> listSubtasksRaw(OperationResult parentResult) throws SchemaException
SchemaException
public List<PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType>> listPrerequisiteTasksRaw(OperationResult parentResult) throws SchemaException
SchemaException
public List<Task> listSubtasks(OperationResult parentResult) throws SchemaException
Task
listSubtasks
in interface Task
SchemaException
public List<Task> listSubtasksDeeply(OperationResult parentResult) throws SchemaException
Task
listSubtasksDeeply
in interface Task
SchemaException
public List<Task> listPrerequisiteTasks(OperationResult parentResult) throws SchemaException
Task
listPrerequisiteTasks
in interface Task
SchemaException
public void pushWaitForTasksHandlerUri()
Task
pushWaitForTasksHandlerUri
in interface Task
public void setLightweightTaskHandler(LightweightTaskHandler lightweightTaskHandler)
public LightweightTaskHandler getLightweightTaskHandler()
getLightweightTaskHandler
in interface Task
public boolean isLightweightAsynchronousTask()
isLightweightAsynchronousTask
in interface Task
public Future getLightweightHandlerFuture()
public Set<? extends Task> getLightweightAsynchronousSubtasks()
getLightweightAsynchronousSubtasks
in interface Task
public Set<? extends Task> getRunningLightweightAsynchronousSubtasks()
getRunningLightweightAsynchronousSubtasks
in interface Task
public boolean lightweightHandlerStartRequested()
lightweightHandlerStartRequested
in interface Task
public void startLightweightHandler()
Task
startLightweightHandler
in interface Task
public void setLightweightHandlerExecuting(boolean lightweightHandlerExecuting)
public boolean isLightweightHandlerExecuting()
public ActionsExecutedInformation getActionsExecutedInformation()
public com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType getAggregatedLiveOperationStats()
StatisticsCollector
getAggregatedLiveOperationStats
in interface StatisticsCollector
public void recordState(String message)
StatisticsCollector
recordState
in interface StatisticsCollector
public void recordProvisioningOperation(String resourceOid, String resourceName, QName objectClassName, ProvisioningOperation operation, boolean success, int count, long duration)
recordProvisioningOperation
in interface StatisticsCollector
public void recordNotificationOperation(String transportName, boolean success, long duration)
recordNotificationOperation
in interface StatisticsCollector
public void recordMappingOperation(String objectOid, String objectName, String objectTypeName, String mappingName, long duration)
recordMappingOperation
in interface StatisticsCollector
public void recordSynchronizationOperationEnd(String objectName, String objectDisplayName, QName objectType, String objectOid, long started, Throwable exception, SynchronizationInformation.Record originalStateIncrement, SynchronizationInformation.Record newStateIncrement)
recordSynchronizationOperationEnd
in interface StatisticsCollector
public void recordSynchronizationOperationStart(String objectName, String objectDisplayName, QName objectType, String objectOid)
StatisticsCollector
recordSynchronizationOperationStart
in interface StatisticsCollector
public void recordIterativeOperationEnd(String objectName, String objectDisplayName, QName objectType, String objectOid, long started, Throwable exception)
recordIterativeOperationEnd
in interface StatisticsCollector
public void recordIterativeOperationEnd(com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType shadow, long started, Throwable exception)
recordIterativeOperationEnd
in interface StatisticsCollector
public void recordIterativeOperationStart(com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType shadow)
recordIterativeOperationStart
in interface StatisticsCollector
public void recordIterativeOperationStart(String objectName, String objectDisplayName, QName objectType, String objectOid)
StatisticsCollector
recordIterativeOperationStart
in interface StatisticsCollector
public void recordObjectActionExecuted(String objectName, String objectDisplayName, QName objectType, String objectOid, ChangeType changeType, String channel, Throwable exception)
StatisticsCollector
recordObjectActionExecuted
in interface StatisticsCollector
public void recordObjectActionExecuted(PrismObject<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> object, ChangeType changeType, Throwable exception)
recordObjectActionExecuted
in interface StatisticsCollector
public <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> void recordObjectActionExecuted(PrismObject<T> object, Class<T> objectTypeClass, String defaultOid, ChangeType changeType, String channel, Throwable exception)
recordObjectActionExecuted
in interface StatisticsCollector
public void markObjectActionExecutedBoundary()
markObjectActionExecutedBoundary
in interface StatisticsCollector
public void resetEnvironmentalPerformanceInformation(com.evolveum.midpoint.xml.ns._public.common.common_3.EnvironmentalPerformanceInformationType value)
StatisticsCollector
resetEnvironmentalPerformanceInformation
in interface StatisticsCollector
public void resetSynchronizationInformation(com.evolveum.midpoint.xml.ns._public.common.common_3.SynchronizationInformationType value)
resetSynchronizationInformation
in interface StatisticsCollector
public void resetIterativeTaskInformation(com.evolveum.midpoint.xml.ns._public.common.common_3.IterativeTaskInformationType value)
resetIterativeTaskInformation
in interface StatisticsCollector
public void resetActionsExecutedInformation(com.evolveum.midpoint.xml.ns._public.common.common_3.ActionsExecutedInformationType value)
resetActionsExecutedInformation
in interface StatisticsCollector
public void startCollectingOperationStatsFromZero(boolean enableIterationStatistics, boolean enableSynchronizationStatistics, boolean enableActionsExecutedStatistics)
startCollectingOperationStatsFromZero
in interface Task
public void startCollectingOperationStatsFromStoredValues(boolean enableIterationStatistics, boolean enableSynchronizationStatistics, boolean enableActionsExecutedStatistics)
startCollectingOperationStatsFromStoredValues
in interface Task
public void storeOperationStats()
storeOperationStats
in interface Task
Copyright © 2016 evolveum. All rights reserved.