Class NullTaskImpl
- java.lang.Object
-
- com.evolveum.midpoint.task.api.test.NullTaskImpl
-
- All Implemented Interfaces:
MappingStatisticsCollector
,NotificationStatisticsCollector
,StatisticsCollector
,TaskActionsExecutedCollector
,TaskIterativeOperationCollector
,TaskSynchronizationStatisticsCollector
,ConnIdOperationsListener
,Task
,DebugDumpable
public class NullTaskImpl extends Object implements Task
DO NOT USE in production code. This is only for testing purposes: provides a no-op implementation of Task interface to be used when task-quartz-impl is not available. TODO move to src/main/test tree.- Author:
- lazyman
-
-
Field Summary
Fields Modifier and Type Field Description static Task
INSTANCE
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Fields inherited from interface com.evolveum.midpoint.task.api.Task
DOT_INTERFACE
-
-
Constructor Summary
Constructors Constructor Description NullTaskImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addArchetypeInformation(String archetypeOid)
Adds an archetype for the task.void
addArchetypeInformationIfMissing(String archetypeOid)
AsTask.addArchetypeInformation(String)
but executed only if there's no archetype currently set.void
addDependent(String taskIdentifier)
Add a task as this task's dependent, i.e.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
addTracingRequest(TracingRootType point)
Requests (future) tracing for given tracing point - for this task.void
applyDeltasImmediate(Collection<ItemDelta<?,?>> itemDeltas, OperationResult result)
void
applyModificationsTransient(Collection<ItemDelta<?,?>> modifications)
Task
createSubtask()
Creates a transient subtask.String
debugDump()
Show the content of the object intended for diagnostics by system administrator.String
debugDump(int indent)
void
deleteExtensionProperty(PrismProperty<?> property)
Removes specified VALUES of this extension property (not all of its values).boolean
doesItemExist(ItemPath path)
TODOvoid
flushPendingModifications(OperationResult parentResult)
Saves modifications done against the in-memory version of the task into the repository.TaskActivityStateType
getActivitiesStateOrClone()
Gets task work state or its clone (for running tasks).ActivityStateType
getActivityStateOrClone(ItemPath path)
TODOOperationStatsType
getAggregatedLiveOperationStats()
Gets information from the current task and - for running task - its transient subtasks (aka worker threads).TaskBindingType
getBinding()
Returns task binding.@NotNull Collection<String>
getCachingProfiles()
Returns an immutable collection of caching profiles.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
getChannel()
Returns channel URI associated with this task.Long
getCompletionTimestamp()
Returns the completion timestamp - time when the task was closed (or null if it is not closed).<C extends Containerable>
CgetContainerableOrClone(ItemPath path, Class<C> type)
TODOList<String>
getDependents()
Lists all explicit dependents' identifiers.String
getDescription()
Returns task description.ActivityErrorHandlingStrategyType
getErrorHandlingStrategy()
Gets error handling strategy.TaskExecutionConstraintsType
getExecutionConstraints()
Returns task execution constraintsTaskExecutionEnvironmentType
getExecutionEnvironment()
Gets the execution environment configuration.TaskExecutionStateType
getExecutionState()
Returns high-level execution state.Long
getExpectedTotal()
Returns expected total progress.PrismContainer<? extends ExtensionType>
getExtensionClone()
Gets extension clone, or null if there is no extension.<T extends Containerable>
TgetExtensionContainerRealValueOrClone(ItemName containerName)
Returns specified single-valued container real value from the extension To ensure thread safety, in the case of running tasks the returned value is a clone of the live one.<IV extends PrismValue,ID extends ItemDefinition<?>>
Item<IV,ID>getExtensionItemOrClone(ItemName propertyName)
Returns specified item (property, reference or container) from the extension.PrismContainer<? extends ExtensionType>
getExtensionOrClone()
Returns task extension.<T> PrismProperty<T>
getExtensionPropertyOrClone(ItemName propertyName)
Returns specified property from the extension; or null if extension or property does not exist.PrismReference
getExtensionReferenceOrClone(ItemName name)
Returns specified reference from the extension.String
getGroup()
Gets the execution group name (i.e.@NotNull Collection<String>
getGroups()
Returns names of all groups (primary plus all secondary ones).@NotNull Map<String,Integer>
getGroupsWithLimits()
Returns all groups (primary plus all secondary ones) along with task count limits.String
getHandlerUri()
Returns handler URI.<T> T
getItemRealValueOrClone(ItemPath path, Class<T> expectedType)
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).long
getLegacyProgress()
Returns task progress, as reported by task handler.LensContextType
getModelOperationContext()
Gets model operation context stored in task.PolyStringType
getName()
Returns human-readable name of the task.Long
getNextRunStartTime(OperationResult result)
Returns the time when the task should start again.String
getNode()
Returns the node the task is currently executing at, based on repository information.String
getNodeAsObserved()
Returns the node as really observed.<T extends ObjectType>
PrismObject<T>getObject(Class<T> type, OperationResult result)
Returns object that the task is associated with.String
getObjectOid()
Returns OID of the object that the task is associated with.ObjectReferenceType
getObjectRefOrClone()
Returns reference to the object that the task is associated with.String
getOid()
Returns task OID.@NotNull PrismContainer<? extends ExtensionType>
getOrCreateExtension()
Gets or creates an extension.PrismObject<? extends FocusType>
getOwner(OperationResult result)
Returns object that owns this task.ObjectReferenceType
getOwnerRef()
Returns a reference to the task owner.String
getParent()
Returns the identifier of the task's parent (or null of there is no parent task).@NotNull ParentAndRoot
getParentAndRoot(OperationResult result)
Looks for OID of the parent and the root of the task tree for this task.Task
getParentTask(OperationResult result)
Returns the parent task, if any.List<Task>
getPathToRootTask(OperationResult result)
Returns the path from this task to the task tree root.@NotNull TaskPersistenceStatus
getPersistenceStatus()
Returns task persistence status.PolicyRuleType
getPolicyRule()
Gets the policy rule defined for the task (for running task the returned value is a clone).<T> T
getPropertyRealValue(ItemPath path, Class<T> expectedType)
<T> T
getPropertyRealValueOrClone(ItemPath path, Class<T> expectedType)
@NotNull PrismObject<TaskType>
getRawTaskObjectClone()
Returns CLONE of backing task prism object without updating with current operation result.@NotNull PrismObject<TaskType>
getRawTaskObjectClonedIfNecessary()
Returns backing task prism object without updating with current operation result.@NotNull TaskRecurrenceType
getRecurrence()
Returns task recurrence status.ObjectReferenceType
getReferenceRealValue(ItemPath path)
Collection<ObjectReferenceType>
getReferenceRealValues(ItemPath path)
PrismObject<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.OperationResultStatusType
getResultStatus()
Returns the status of top-level OperationResult stored in the task.ScheduleType
getSchedule()
Returns the schedule.Integer
getScheduleInterval()
Returns the schedule interval.TaskSchedulingStateType
getSchedulingState()
Returns low-level scheduling state.@NotNull ObjectReferenceType
getSelfReference()
Returns a reference to the task prism.@NotNull ObjectReferenceType
getSelfReferenceFull()
Returns a full (object-bearing) reference to the task prism.OperationStatsType
getStoredOperationStatsOrClone()
Returns operation statistics from the task prism object (i.e.String
getTaskIdentifier()
Returns task (lightweight) identifier.ThreadStopActionType
getThreadStopAction()
Returns thread stop action (what happens when the task thread is stopped e.g.TracingProfileType
getTracingProfile()
Returns (reference to tracing profile) that was defined for the tracing started by this task.@NotNull Collection<TracingRootType>
getTracingRequestedFor()
Get points for which the tracing is requested (within this task).@NotNull PrismObject<TaskType>
getUpdatedTaskObject()
Returns backing task prism object UPDATED with current operation result.String
getVersion()
Returns the version of underlying prism object.TaskWaitingReasonType
getWaitingReason()
Returns the task waiting reason for a WAITING task.TaskActivityStateType
getWorkState()
Gets task work state.boolean
hasAssignments()
Returns true if the task has any assignments.boolean
hasScheduleInterval()
Returns true if the schedule interval is set.void
incrementLegacyProgressTransient()
Increments legacy progress without creating a pending modification.boolean
isAsynchronous()
Returns true if the task is asynchronous.boolean
isPersistent()
Returns true if task is persistent (i.e.boolean
isTransient()
Returns true if task is transient (i.e.List<Task>
listDependents(OperationResult result)
Lists all explicit dependents, i.e.List<Task>
listPrerequisiteTasks(OperationResult parentResult)
List all prerequisite tasks for the current tasks, i.e.@NotNull List<Task>
listSubtasks(boolean persistentOnly, OperationResult parentResult)
List<Task>
listSubtasksDeeply(boolean persistentOnly, OperationResult result)
Lists all tasks in subtasks tree.List<? extends Task>
listSubtasksDeeply(OperationResult result)
List all the subtasks of a given task, i.e.void
modify(@NotNull ItemDelta<?,?> delta)
Changes in-memory representation immediately and schedules a corresponding batched modification.void
modifyAndFlush(ItemDelta<?,?> delta, OperationResult result)
void
onSynchronizationExclusion(@Nullable String processingIdentifier, @NotNull SynchronizationExclusionReasonType exclusionReason)
Informs the task that no synchronization will take place.void
onSynchronizationSituationChange(@Nullable String processingIdentifier, String shadowOid, @Nullable SynchronizationSituationType situation)
Informs the task that sync situation has changed for given shadow OID.void
onSynchronizationStart(@Nullable String processingIdentifier, @Nullable String shadowOid, @Nullable SynchronizationSituationType situation)
Called when a situation was determined right before a synchronization takes place.@NotNull Operation
recordIterativeOperationStart(@NotNull IterativeOperationStartInfo info)
Records the start of iterative operation.void
recordMappingOperation(String objectOid, String objectName, String objectTypeName, String mappingName, long duration)
void
recordNotificationOperation(String transportName, boolean success, long duration)
void
recordObjectActionExecuted(PrismObject<? extends ObjectType> object, ChangeType changeType, Throwable exception)
Logs under default channel known to the current task.<T extends ObjectType>
voidrecordObjectActionExecuted(PrismObject<T> objectOld, Class<T> objectTypeClass, String oid, ChangeType delete, String channel, Throwable o)
void
recordObjectActionExecuted(String objectName, String objectDisplayName, QName objectType, String objectOid, ChangeType changeType, String channel, Throwable exception)
void
recordStateMessage(String message)
Records a state message.void
refresh(OperationResult result)
Re-reads the task state from the persistent storage.void
registerConnIdOperationsListener(@NotNull ConnIdOperationsListener listener)
Registers aConnIdOperationsListener
.void
removeTracingRequests()
Removes all tracing requests for this task.void
setCategory(String category)
Sets the task category.void
setChannel(String channelUri)
Sets channel URI.void
setDescription(String value)
Sets task description.void
setDescriptionImmediate(String value, OperationResult result)
Sets task description, immediately storing it into the repo.void
setExecutionConstraints(TaskExecutionConstraintsType value)
Sets task execution constraints.void
setExecutionEnvironment(TaskExecutionEnvironmentType value)
Sets the execution environment configuration.void
setExpectedTotal(Long value)
Stores expected total progress of the task, storing it persistently if needed.<C extends Containerable>
voidsetExtensionContainer(PrismContainer<C> item)
Sets a container in the extension - replaces existing value(s), if any, by the one(s) provided.<T extends Containerable>
voidsetExtensionContainerValue(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 result)
"Immediate" version of the above method.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
setInitialExecutionAndScheduledState(TaskExecutionStateType executionState, TaskSchedulingStateType schedulingState)
Sets initial task execution and scheduled state.void
setInitiallyWaitingForPrerequisites()
Sets the initial task execution and scheduling state to make task waiting (for prerequisite tasks).void
setLegacyProgress(Long value)
Records _legacy_ progress of the task, storing it persistently if needed.void
setLegacyProgressImmediate(Long progress, OperationResult parentResult)
"Immediate" version ofTask.setLegacyProgress(Long)
.void
setModelOperationContext(LensContextType modelOperationContext)
Sets model operation context.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
setObjectRef(ObjectReferenceType objectRef)
Sets the object reference.void
setObjectRef(String oid, QName type)
Sets the object reference.void
setOwner(PrismObject<? extends FocusType> owner)
Sets the task owner.void
setOwnerRef(ObjectReferenceType ownerRef)
Sets the task owner reference.<T> void
setPropertyRealValue(ItemPath path, T value)
void
setRequesteeTransient(PrismObject<UserType> user)
void
setResult(OperationResult result)
Sets the top-level OperationResult stored in the task.void
setSchedule(ScheduleType schedule)
Sets the schedule for the task.void
setThreadStopAction(ThreadStopActionType value)
Sets the thread stop action for this task.void
setTracingProfile(TracingProfileType tracingProfile)
Sets the profile to be used for future tracing within this task.void
startCollectingActionsExecuted(ActionsExecutedCollector collector)
void
startCollectingSynchronizationStatistics(SynchronizationStatisticsCollector collector)
Starts collecting synchronization statistics within the task.void
stopCollectingActionsExecuted()
void
stopCollectingSynchronizationStatistics(@NotNull QualifiedItemProcessingOutcomeType outcome)
void
unregisterConnIdOperationsListener(@NotNull ConnIdOperationsListener listener)
Unregisters aConnIdOperationsListener
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.task.api.ConnIdOperationsListener
onConnIdOperationEnd, onConnIdOperationResume, onConnIdOperationStart, onConnIdOperationSuspend
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.task.api.Task
getActivityStateOrClone, getActivityTreeStateOverviewOrClone, getExecutionSupport, getExtensionPropertyRealValue, getRoot, getRootActivityCompletionTimestamp, getRootActivityDefinitionOrClone, isClosed, isIndestructible, isLooselyBound, isReady, isRecurring, isRoot, isRunnable, isRunning, isSingle, isSuspended, isTightlyBound, isWaiting, listSubtasks, makeSingle, modify, setExtensionPropertyValue, setInitiallyRunnable, setInitiallySuspended, setItemRealValues, setItemRealValuesCollection, setRootActivityDefinition
-
Methods inherited from interface com.evolveum.midpoint.schema.statistics.TaskIterativeOperationCollector
recordIterativeOperationStart, recordIterativeOperationStart
-
-
-
-
Field Detail
-
INSTANCE
public static final Task INSTANCE
-
-
Method Detail
-
addDependent
public void addDependent(String taskIdentifier)
Description copied from interface:Task
Add a task as this task's dependent, i.e. the task denoted by taskIdentifier DEPENDS ON (waits for completion of) this task.- Specified by:
addDependent
in interfaceTask
-
isAsynchronous
public boolean isAsynchronous()
Description copied from interface:Task
Returns true if the task is asynchronous. The asynchronous task is not executing in foreground. Therefore any thread that is not explicitly allocated for the task can be discarded. E.g. if a GUI thread detects that the task is asynchronous it knows that there is no point in waiting for the task result. It can just display appropriate message to the user (e.g. "please come back later") and return control back to the web container. Usually, asynchronous means the same as persistent. However, there can are lightweight tasks that are asynchronous but not stored in repository.- Specified by:
isAsynchronous
in interfaceTask
- Returns:
- true if the task is asynchronous.
-
getExecutionState
public TaskExecutionStateType getExecutionState()
Description copied from interface:Task
Returns high-level execution state.- Specified by:
getExecutionState
in interfaceTask
-
getSchedulingState
public TaskSchedulingStateType getSchedulingState()
Description copied from interface:Task
Returns low-level scheduling state.- Specified by:
getSchedulingState
in interfaceTask
-
setInitialExecutionAndScheduledState
public void setInitialExecutionAndScheduledState(TaskExecutionStateType executionState, TaskSchedulingStateType schedulingState)
Description copied from interface:Task
Sets initial task execution and scheduled state. It will be used when the task is made persistent. Precondition: Task is transient.- Specified by:
setInitialExecutionAndScheduledState
in interfaceTask
-
setInitiallyWaitingForPrerequisites
public void setInitiallyWaitingForPrerequisites()
Description copied from interface:Task
Sets the initial task execution and scheduling state to make task waiting (for prerequisite tasks).- Specified by:
setInitiallyWaitingForPrerequisites
in interfaceTask
-
getPersistenceStatus
@NotNull public @NotNull TaskPersistenceStatus getPersistenceStatus()
Description copied from interface:Task
Returns task persistence status.- Specified by:
getPersistenceStatus
in interfaceTask
-
isTransient
public boolean isTransient()
Description copied from interface:Task
Returns true if task is transient (i.e. not stored in repository).- Specified by:
isTransient
in interfaceTask
-
isPersistent
public boolean isPersistent()
Description copied from interface:Task
Returns true if task is persistent (i.e. stored in repository).- Specified by:
isPersistent
in interfaceTask
-
getRecurrence
@NotNull public @NotNull TaskRecurrenceType getRecurrence()
Description copied from interface:Task
Returns task recurrence status.- Specified by:
getRecurrence
in interfaceTask
-
setSchedule
public void setSchedule(ScheduleType schedule)
Description copied from interface:Task
Sets the schedule for the task. Removes also the legacy recurrence flag.- Specified by:
setSchedule
in interfaceTask
-
getSchedule
public ScheduleType getSchedule()
Description copied from interface:Task
Returns the schedule.- Specified by:
getSchedule
in interfaceTask
-
getScheduleInterval
public Integer getScheduleInterval()
Description copied from interface:Task
Returns the schedule interval.- Specified by:
getScheduleInterval
in interfaceTask
-
hasScheduleInterval
public boolean hasScheduleInterval()
Description copied from interface:Task
Returns true if the schedule interval is set.- Specified by:
hasScheduleInterval
in interfaceTask
-
getBinding
public TaskBindingType getBinding()
Description copied from interface:Task
Returns task binding.- Specified by:
getBinding
in interfaceTask
-
getHandlerUri
public String getHandlerUri()
Description copied from interface:Task
Returns handler URI. It indirectly specifies which class is responsible to handle the task. The handler will execute reaction to a task lifecycle events such as executing the task, task heartbeat, etc.- Specified by:
getHandlerUri
in interfaceTask
-
setHandlerUri
public void setHandlerUri(String value)
Description copied from interface:Task
Sets handler URI.- Specified by:
setHandlerUri
in interfaceTask
-
getTaskIdentifier
public String getTaskIdentifier()
Description copied from interface:Task
Returns task (lightweight) identifier. This is an unique identification of any task, regardless whether it is persistent or transient (cf. OID). Therefore this can be used to identify all tasks, e.g. for the purposes of auditing and logging. Task identifier is assigned automatically when the task is created. It is immutable.- Specified by:
getTaskIdentifier
in interfaceTask
-
getOwner
public PrismObject<? extends FocusType> getOwner(OperationResult result)
Description copied from interface:Task
Returns object that owns this task. It usually means the user that started the task or a system used that is used to execute the task. The owner will be used to determine access rights of the task, will be used for auditing, etc. The object is lazily fetched from repository.
-
setOwner
public void setOwner(PrismObject<? extends FocusType> owner)
Description copied from interface:Task
Sets the task owner. Precondition: Task is transient.
-
setOwnerRef
public void setOwnerRef(ObjectReferenceType ownerRef)
Description copied from interface:Task
Sets the task owner reference. Precondition: Task is transient.- Specified by:
setOwnerRef
in interfaceTask
-
getChannel
public String getChannel()
Description copied from interface:Task
Returns channel URI associated with this task.- Specified by:
getChannel
in interfaceTask
-
setChannel
public void setChannel(String channelUri)
Description copied from interface:Task
Sets channel URI.- Specified by:
setChannel
in interfaceTask
-
getRequestee
public PrismObject<UserType> getRequestee()
Description copied from interface:Task
Gets the requestee OID - typically an identification of account owner (for notifications). Serves for communication between model and provisioning. It is a temporary feature - will be removed in midPoint 2.3.- Specified by:
getRequestee
in interfaceTask
-
setRequesteeTransient
public void setRequesteeTransient(PrismObject<UserType> user)
- Specified by:
setRequesteeTransient
in interfaceTask
-
getModelOperationContext
public LensContextType getModelOperationContext()
Description copied from interface:Task
Gets model operation context stored in task. NOT THREAD SAFE!- Specified by:
getModelOperationContext
in interfaceTask
-
setModelOperationContext
public void setModelOperationContext(LensContextType modelOperationContext)
Description copied from interface:Task
Sets model operation context.- Specified by:
setModelOperationContext
in interfaceTask
-
getErrorHandlingStrategy
public ActivityErrorHandlingStrategyType getErrorHandlingStrategy()
Description copied from interface:Task
Gets error handling strategy. NOT THREAD SAFE! Use only for reading.- Specified by:
getErrorHandlingStrategy
in interfaceTask
-
getOid
public String getOid()
Description copied from interface:Task
Returns task OID. Only persistent tasks have OID. So this method returns null if the task is not persistent.
-
getObject
public <T extends ObjectType> PrismObject<T> getObject(Class<T> type, OperationResult result)
Description copied from interface:Task
Returns object that the task is associated with. Tasks may be associated with a particular objects. For example a "import from resource" task is associated with the resource definition object that it imports from. Similarly for synchronization and reconciliation tasks (cycles). User approval and modification task may be associated with that user. If the task contains a reference without full object, the object is fetched from the repository. (Authorizations are *not* checked.)
-
getObjectRefOrClone
public ObjectReferenceType getObjectRefOrClone()
Description copied from interface:Task
Returns reference to the object that the task is associated with. Tasks may be associated with a particular objects. For example a "import from resource" task is associated with the resource definition object that it imports from. Similarly for synchronization and reconciliation tasks (cycles). This is an optional property.- Specified by:
getObjectRefOrClone
in interfaceTask
-
setObjectRef
public void setObjectRef(ObjectReferenceType objectRef)
Description copied from interface:Task
Sets the object reference.- Specified by:
setObjectRef
in interfaceTask
-
setObjectRef
public void setObjectRef(String oid, QName type)
Description copied from interface:Task
Sets the object reference.- Specified by:
setObjectRef
in interfaceTask
-
getObjectOid
public String getObjectOid()
Description copied from interface:Task
Returns OID of the object that the task is associated with. Convenience method. This will get the OID from the objectRef.- Specified by:
getObjectOid
in interfaceTask
-
getResult
public OperationResult getResult()
Description copied from interface:Task
Returns a top-level OperationResult stored in the task. Beware of thread safety. This is a live object!
-
setResult
public void setResult(OperationResult result)
Description copied from interface:Task
Sets the top-level OperationResult stored in the task. Use with care!
-
getLastRunStartTimestamp
public Long getLastRunStartTimestamp()
Description copied from interface:Task
Returns the time when the task last run was started (or null if the task was never started). This is set only for asynchronously executing tasks. And it is set also for the current execution.- Specified by:
getLastRunStartTimestamp
in interfaceTask
-
getLastRunFinishTimestamp
public Long getLastRunFinishTimestamp()
Description copied from interface:Task
Returns the time when the task last run was finished (or null if the task was not finished yet). This is set only for asynchronously executing tasks.- Specified by:
getLastRunFinishTimestamp
in interfaceTask
-
getNextRunStartTime
public Long getNextRunStartTime(OperationResult result)
Description copied from interface:Task
Returns the time when the task should start again. This is transient property, present only if explicitly requested.- Specified by:
getNextRunStartTime
in interfaceTask
-
getName
public PolyStringType getName()
Description copied from interface:Task
Returns human-readable name of the task.
-
setName
public void setName(PolyStringType value)
Description copied from interface:Task
Sets the human-readable name of the task.
-
setName
public void setName(String value)
Description copied from interface:Task
Sets the human-readable name of the task.
-
setNameImmediate
public void setNameImmediate(PolyStringType value, OperationResult parentResult)
Description copied from interface:Task
Sets the human-readable name of the task, immediately into repository.- Specified by:
setNameImmediate
in interfaceTask
-
getExtensionItemOrClone
public <IV extends PrismValue,ID extends ItemDefinition<?>> Item<IV,ID> getExtensionItemOrClone(ItemName propertyName)
Description copied from interface:Task
Returns specified item (property, reference or container) from the extension. Cloned if running task. Null if extension or item does not exist.- Specified by:
getExtensionItemOrClone
in interfaceTask
-
setExtensionContainer
public <C extends Containerable> void setExtensionContainer(PrismContainer<C> item)
Description copied from interface:Task
Sets a container in the extension - replaces existing value(s), if any, by the one(s) provided.- Specified by:
setExtensionContainer
in interfaceTask
- Parameters:
item
- Container with value(s) to be put into task extension.
-
setExtensionReference
public void setExtensionReference(PrismReference reference)
Description copied from interface:Task
Sets a reference in the extension - replaces existing value(s), if any, by the one(s) provided.- Specified by:
setExtensionReference
in interfaceTask
-
setExtensionProperty
public void setExtensionProperty(PrismProperty<?> property)
Description copied from interface:Task
Sets a property in the extension - replaces existing value(s), if any, by the one(s) provided.- Specified by:
setExtensionProperty
in interfaceTask
-
setExtensionPropertyImmediate
public void setExtensionPropertyImmediate(PrismProperty<?> property, OperationResult result)
Description copied from interface:Task
"Immediate" version of the above method.- Specified by:
setExtensionPropertyImmediate
in interfaceTask
-
addExtensionProperty
public void addExtensionProperty(PrismProperty<?> property)
Description copied from interface:Task
Adds value(s) to a given extension property.- Specified by:
addExtensionProperty
in interfaceTask
- Parameters:
property
- holder of the value(s) to be added into task extension property
-
setPropertyRealValue
public <T> void setPropertyRealValue(ItemPath path, T value) throws SchemaException
- Specified by:
setPropertyRealValue
in interfaceTask
- Throws:
SchemaException
-
setExtensionContainerValue
public <T extends Containerable> void setExtensionContainerValue(QName containerName, T value)
Description copied from interface:Task
Sets a container value in the extension - replaces existing value(s), if any, by the one provided.- Specified by:
setExtensionContainerValue
in interfaceTask
- Parameters:
containerName
- name of the containervalue
- value to be put into extension
-
setExtensionItem
public void setExtensionItem(Item<?,?> item)
Description copied from interface:Task
Puts generic item into extension.- Specified by:
setExtensionItem
in interfaceTask
-
getLegacyProgress
public long getLegacyProgress()
Description copied from interface:Task
Returns task progress, as reported by task handler.- Specified by:
getLegacyProgress
in interfaceTask
-
setLegacyProgress
public void setLegacyProgress(Long value)
Description copied from interface:Task
Records _legacy_ progress of the task, storing it persistently if needed.- Specified by:
setLegacyProgress
in interfaceTask
-
incrementLegacyProgressTransient
public void incrementLegacyProgressTransient()
Description copied from interface:Task
Increments legacy progress without creating a pending modification.- Specified by:
incrementLegacyProgressTransient
in interfaceTask
-
setLegacyProgressImmediate
public void setLegacyProgressImmediate(Long progress, OperationResult parentResult)
Description copied from interface:Task
"Immediate" version ofTask.setLegacyProgress(Long)
. BEWARE: this method can take quite a long time to execute, if invoked in a cycle.- Specified by:
setLegacyProgressImmediate
in interfaceTask
-
getUpdatedTaskObject
@NotNull public @NotNull PrismObject<TaskType> getUpdatedTaskObject()
Description copied from interface:Task
Returns backing task prism object UPDATED with current operation result. Assumes that task is not running. (Otherwise IllegalStateException is thrown.)- Specified by:
getUpdatedTaskObject
in interfaceTask
-
getRawTaskObjectClone
@NotNull public @NotNull PrismObject<TaskType> getRawTaskObjectClone()
Description copied from interface:Task
Returns CLONE of backing task prism object without updating with current operation result.- Specified by:
getRawTaskObjectClone
in interfaceTask
-
refresh
public void refresh(OperationResult result)
Description copied from interface:Task
Re-reads the task state from the persistent storage. The task state may be synchronized with the repository all the time. But the specified timing is implementation-specific. Call to this method will make sure that the task contains fresh data. This has no effect on transient tasks.
-
debugDump
public String debugDump()
Description copied from interface:DebugDumpable
Show the content of the object intended for diagnostics by system administrator. The out put should be suitable to use in system logs at "debug" level. It may be multi-line, but in that case it should be well indented and quite terse. As it is intended to be used by system administrator, it should not use any developer terms such as class names, exceptions or stack traces.- Specified by:
debugDump
in interfaceDebugDumpable
- Returns:
- content of the object intended for diagnostics by system administrator.
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
-
flushPendingModifications
public void flushPendingModifications(OperationResult parentResult)
Description copied from interface:Task
Saves modifications done against the in-memory version of the task into the repository.- Specified by:
flushPendingModifications
in interfaceTask
-
getCategory
public String getCategory()
Description copied from interface:Task
Task category is a user-oriented term, hinting on what 'kind' of task is the one being considered (system task, workflow, live sync, ...). In most cases, category can be derived from the task handler. Category can be set directly; but if not set directly, it is set automatically on first task execution, determined based on task handler URI. List of categories is in the TaskCategory class.- Specified by:
getCategory
in interfaceTask
-
getNode
public String getNode()
Description copied from interface:Task
Returns the node the task is currently executing at, based on repository information. This is present in all cases, however, it might be out-of-date, e.g. when node crashes.
-
getNodeAsObserved
public String getNodeAsObserved()
Description copied from interface:Task
Returns the node as really observed. This is a transient information that has to be requested explicitly.- Specified by:
getNodeAsObserved
in interfaceTask
-
getResultStatus
public OperationResultStatusType getResultStatus()
Description copied from interface:Task
Returns the status of top-level OperationResult stored in the task. If "live" operation result is present, the status it taken from it. Otherwise, resultStatus from task prism is fetched. TODO reconsider this method- Specified by:
getResultStatus
in interfaceTask
-
getThreadStopAction
public ThreadStopActionType getThreadStopAction()
Description copied from interface:Task
Returns thread stop action (what happens when the task thread is stopped e.g. because of node going down).- Specified by:
getThreadStopAction
in interfaceTask
-
setCategory
public void setCategory(String category)
Description copied from interface:Task
Sets the task category.- Specified by:
setCategory
in interfaceTask
-
addArchetypeInformation
public void addArchetypeInformation(String archetypeOid)
Description copied from interface:Task
Adds an archetype for the task. Assumes that the task will NOT undergo full model processing, so this method will do everything by itself: creates an assignment, roleMembershipRef and archetypeRef. Throws an exception if an archetype is already assigned. This is temporary/experimental implementation. It was not tested for persistent tasks (although it should work also for them).- Specified by:
addArchetypeInformation
in interfaceTask
-
addArchetypeInformationIfMissing
public void addArchetypeInformationIfMissing(String archetypeOid)
Description copied from interface:Task
AsTask.addArchetypeInformation(String)
but executed only if there's no archetype currently set.- Specified by:
addArchetypeInformationIfMissing
in interfaceTask
-
getExtensionOrClone
public PrismContainer<? extends ExtensionType> getExtensionOrClone()
Description copied from interface:Task
Returns task extension. The extension is a part of task that can store arbitrary data. It usually holds data specific to a task type, internal task state, business state or similar data that are out of scope of this interface definition. To maintain thread safety, for RunningTask this method returns extension clone. (So don't use the return value to modify the task extension if not sure whether the task is running.)- Specified by:
getExtensionOrClone
in interfaceTask
-
getOrCreateExtension
@NotNull public @NotNull PrismContainer<? extends ExtensionType> getOrCreateExtension()
Description copied from interface:Task
Gets or creates an extension. Just likePrismObject.getOrCreateExtension()
. Cloned if the task is running.- Specified by:
getOrCreateExtension
in interfaceTask
-
getExtensionClone
public PrismContainer<? extends ExtensionType> getExtensionClone()
Description copied from interface:Task
Gets extension clone, or null if there is no extension.- Specified by:
getExtensionClone
in interfaceTask
-
getExtensionPropertyOrClone
public <T> PrismProperty<T> getExtensionPropertyOrClone(ItemName propertyName)
Description copied from interface:Task
Returns specified property from the extension; or null if extension or property does not exist. Cloned if task is running.- Specified by:
getExtensionPropertyOrClone
in interfaceTask
-
getPropertyRealValue
public <T> T getPropertyRealValue(ItemPath path, Class<T> expectedType)
- Specified by:
getPropertyRealValue
in interfaceTask
-
getPropertyRealValueOrClone
public <T> T getPropertyRealValueOrClone(ItemPath path, Class<T> expectedType)
- Specified by:
getPropertyRealValueOrClone
in interfaceTask
-
getItemRealValueOrClone
public <T> T getItemRealValueOrClone(ItemPath path, Class<T> expectedType)
- Specified by:
getItemRealValueOrClone
in interfaceTask
-
getReferenceRealValue
public ObjectReferenceType getReferenceRealValue(ItemPath path)
- Specified by:
getReferenceRealValue
in interfaceTask
-
getReferenceRealValues
public Collection<ObjectReferenceType> getReferenceRealValues(ItemPath path)
- Specified by:
getReferenceRealValues
in interfaceTask
-
getExtensionContainerRealValueOrClone
public <T extends Containerable> T getExtensionContainerRealValueOrClone(ItemName containerName)
Description copied from interface:Task
Returns specified single-valued container real value from the extension To ensure thread safety, in the case of running tasks the returned value is a clone of the live one. Returns null if extension or container does not exist.- Specified by:
getExtensionContainerRealValueOrClone
in interfaceTask
-
getExtensionReferenceOrClone
public PrismReference getExtensionReferenceOrClone(ItemName name)
Description copied from interface:Task
Returns specified reference from the extension. Cloned if running task. Null if extension or reference does not exist.- Specified by:
getExtensionReferenceOrClone
in interfaceTask
-
setDescriptionImmediate
public void setDescriptionImmediate(String value, OperationResult result)
Description copied from interface:Task
Sets task description, immediately storing it into the repo.- Specified by:
setDescriptionImmediate
in interfaceTask
-
setDescription
public void setDescription(String value)
Description copied from interface:Task
Sets task description.- Specified by:
setDescription
in interfaceTask
-
getDescription
public String getDescription()
Description copied from interface:Task
Returns task description.- Specified by:
getDescription
in interfaceTask
-
deleteExtensionProperty
public void deleteExtensionProperty(PrismProperty<?> property)
Description copied from interface:Task
Removes specified VALUES of this extension property (not all of its values).- Specified by:
deleteExtensionProperty
in interfaceTask
-
setThreadStopAction
public void setThreadStopAction(ThreadStopActionType value)
Description copied from interface:Task
Sets the thread stop action for this task.- Specified by:
setThreadStopAction
in interfaceTask
-
createSubtask
public Task createSubtask()
Description copied from interface:Task
Creates a transient subtask. Owner is inherited from parent task to subtask.- Specified by:
createSubtask
in interfaceTask
-
getParent
public String getParent()
Description copied from interface:Task
Returns the identifier of the task's parent (or null of there is no parent task).
-
listSubtasks
@NotNull public @NotNull List<Task> listSubtasks(boolean persistentOnly, OperationResult parentResult)
- Specified by:
listSubtasks
in interfaceTask
-
listSubtasksDeeply
public List<? extends Task> listSubtasksDeeply(OperationResult result) throws SchemaException
Description copied from interface:Task
List all the subtasks of a given task, i.e. whole task tree rooted at the current task. Current task is not contained in the returned list.- Specified by:
listSubtasksDeeply
in interfaceTask
- Throws:
SchemaException
-
listPrerequisiteTasks
public List<Task> listPrerequisiteTasks(OperationResult parentResult)
Description copied from interface:Task
List all prerequisite tasks for the current tasks, i.e. tasks that must complete before this one can proceed. If A is on the list of prerequisites of B (THIS), it means that B is on list of dependents of A (i.e. B waits for A to complete). Again, implicit prerequisites (children) are not listed here.- Specified by:
listPrerequisiteTasks
in interfaceTask
-
getRawTaskObjectClonedIfNecessary
@NotNull public @NotNull PrismObject<TaskType> getRawTaskObjectClonedIfNecessary()
Description copied from interface:Task
Returns backing task prism object without updating with current operation result. If the task is running, a clone is returned.- Specified by:
getRawTaskObjectClonedIfNecessary
in interfaceTask
-
getDependents
public List<String> getDependents()
Description copied from interface:Task
Lists all explicit dependents' identifiers.- Specified by:
getDependents
in interfaceTask
-
listDependents
public List<Task> listDependents(OperationResult result)
Description copied from interface:Task
Lists all explicit dependents, i.e. tasks that wait for the completion of this tasks (that depend on it). Implicit dependents, i.e. task's parent, grandparent, etc are NOT listed here.- Specified by:
listDependents
in interfaceTask
-
getParentTask
public Task getParentTask(OperationResult result)
Description copied from interface:Task
Returns the parent task, if any.- Specified by:
getParentTask
in interfaceTask
-
getWaitingReason
public TaskWaitingReasonType getWaitingReason()
Description copied from interface:Task
Returns the task waiting reason for a WAITING task.- Specified by:
getWaitingReason
in interfaceTask
-
getCompletionTimestamp
public Long getCompletionTimestamp()
Description copied from interface:Task
Returns the completion timestamp - time when the task was closed (or null if it is not closed).- Specified by:
getCompletionTimestamp
in interfaceTask
-
addExtensionReference
public void addExtensionReference(PrismReference reference)
Description copied from interface:Task
Adds value(s) to a given extension reference.- Specified by:
addExtensionReference
in interfaceTask
- Parameters:
reference
- holder of the value(s) to be added into task extension reference
-
listSubtasksDeeply
public List<Task> listSubtasksDeeply(boolean persistentOnly, OperationResult result)
Description copied from interface:Task
Lists all tasks in subtasks tree.- Specified by:
listSubtasksDeeply
in interfaceTask
- Parameters:
persistentOnly
- If true, transient subtasks (i.e. lightweight asynchronous tasks) are ignored.
-
getPolicyRule
public PolicyRuleType getPolicyRule()
Description copied from interface:Task
Gets the policy rule defined for the task (for running task the returned value is a clone).- Specified by:
getPolicyRule
in interfaceTask
-
getExpectedTotal
public Long getExpectedTotal()
Description copied from interface:Task
Returns expected total progress.- Specified by:
getExpectedTotal
in interfaceTask
-
setExpectedTotal
public void setExpectedTotal(Long value)
Description copied from interface:Task
Stores expected total progress of the task, storing it persistently if needed.- Specified by:
setExpectedTotal
in interfaceTask
-
recordStateMessage
public void recordStateMessage(String message)
Description copied from interface:StatisticsCollector
Records a state message.- Specified by:
recordStateMessage
in interfaceStatisticsCollector
-
recordNotificationOperation
public void recordNotificationOperation(String transportName, boolean success, long duration)
- Specified by:
recordNotificationOperation
in interfaceNotificationStatisticsCollector
-
recordMappingOperation
public void recordMappingOperation(String objectOid, String objectName, String objectTypeName, String mappingName, long duration)
- Specified by:
recordMappingOperation
in interfaceMappingStatisticsCollector
-
onSynchronizationStart
public void onSynchronizationStart(@Nullable @Nullable String processingIdentifier, @Nullable @Nullable String shadowOid, @Nullable @Nullable SynchronizationSituationType situation)
Description copied from interface:TaskSynchronizationStatisticsCollector
Called when a situation was determined right before a synchronization takes place. We assume that we have a shadow with OID by that time. (If the OID is null we ignore further synchronization situation updates.)- Specified by:
onSynchronizationStart
in interfaceTaskSynchronizationStatisticsCollector
-
onSynchronizationExclusion
public void onSynchronizationExclusion(@Nullable @Nullable String processingIdentifier, @NotNull @NotNull SynchronizationExclusionReasonType exclusionReason)
Description copied from interface:TaskSynchronizationStatisticsCollector
Informs the task that no synchronization will take place. Note that in theory it is possible thatTaskSynchronizationStatisticsCollector.onSynchronizationStart(String, String, SynchronizationSituationType)
is called first.- Specified by:
onSynchronizationExclusion
in interfaceTaskSynchronizationStatisticsCollector
-
onSynchronizationSituationChange
public void onSynchronizationSituationChange(@Nullable @Nullable String processingIdentifier, String shadowOid, @Nullable @Nullable SynchronizationSituationType situation)
Description copied from interface:TaskSynchronizationStatisticsCollector
Informs the task that sync situation has changed for given shadow OID. There could be more such changes. But we are interested in the last one. If the shadow OID is null, we ignore such updates.- Specified by:
onSynchronizationSituationChange
in interfaceTaskSynchronizationStatisticsCollector
-
startCollectingSynchronizationStatistics
public void startCollectingSynchronizationStatistics(SynchronizationStatisticsCollector collector)
Description copied from interface:TaskSynchronizationStatisticsCollector
Starts collecting synchronization statistics within the task. Must be accompanied by correspondingTaskSynchronizationStatisticsCollector.stopCollectingSynchronizationStatistics(QualifiedItemProcessingOutcomeType)
call. (Related to the same item!)- Specified by:
startCollectingSynchronizationStatistics
in interfaceTaskSynchronizationStatisticsCollector
-
stopCollectingSynchronizationStatistics
public void stopCollectingSynchronizationStatistics(@NotNull @NotNull QualifiedItemProcessingOutcomeType outcome)
- Specified by:
stopCollectingSynchronizationStatistics
in interfaceTaskSynchronizationStatisticsCollector
-
recordIterativeOperationStart
@NotNull public @NotNull Operation recordIterativeOperationStart(@NotNull @NotNull IterativeOperationStartInfo info)
Description copied from interface:TaskIterativeOperationCollector
Records the start of iterative operation. The operation end is recorded by calling appropriate method on the returned object.- Specified by:
recordIterativeOperationStart
in interfaceTaskIterativeOperationCollector
-
recordObjectActionExecuted
public void recordObjectActionExecuted(String objectName, String objectDisplayName, QName objectType, String objectOid, ChangeType changeType, String channel, Throwable exception)
- Specified by:
recordObjectActionExecuted
in interfaceTaskActionsExecutedCollector
-
recordObjectActionExecuted
public void recordObjectActionExecuted(PrismObject<? extends ObjectType> object, ChangeType changeType, Throwable exception)
Description copied from interface:TaskActionsExecutedCollector
Logs under default channel known to the current task.- Specified by:
recordObjectActionExecuted
in interfaceTaskActionsExecutedCollector
-
recordObjectActionExecuted
public <T extends ObjectType> void recordObjectActionExecuted(PrismObject<T> objectOld, Class<T> objectTypeClass, String oid, ChangeType delete, String channel, Throwable o)
- Specified by:
recordObjectActionExecuted
in interfaceTaskActionsExecutedCollector
-
getStoredOperationStatsOrClone
public OperationStatsType getStoredOperationStatsOrClone()
Description copied from interface:Task
Returns operation statistics from the task prism object (i.e. not the live ones). Clones if running task.- Specified by:
getStoredOperationStatsOrClone
in interfaceTask
-
modify
public void modify(@NotNull @NotNull ItemDelta<?,?> delta)
Description copied from interface:Task
Changes in-memory representation immediately and schedules a corresponding batched modification.
-
modifyAndFlush
public void modifyAndFlush(ItemDelta<?,?> delta, OperationResult result)
-
getExecutionConstraints
public TaskExecutionConstraintsType getExecutionConstraints()
Description copied from interface:Task
Returns task execution constraints- Specified by:
getExecutionConstraints
in interfaceTask
-
getGroup
public String getGroup()
Description copied from interface:Task
Gets the execution group name (i.e. executionConstraints/group).
-
getGroups
@NotNull public @NotNull Collection<String> getGroups()
Description copied from interface:Task
Returns names of all groups (primary plus all secondary ones).
-
getGroupsWithLimits
@NotNull public @NotNull Map<String,Integer> getGroupsWithLimits()
Description copied from interface:Task
Returns all groups (primary plus all secondary ones) along with task count limits.- Specified by:
getGroupsWithLimits
in interfaceTask
-
getWorkState
public TaskActivityStateType getWorkState()
Description copied from interface:Task
Gets task work state. NOT THREAD SAFE! TODO throw exception for RunningTask. (After revising of all uses.)- Specified by:
getWorkState
in interfaceTask
-
getActivitiesStateOrClone
public TaskActivityStateType getActivitiesStateOrClone()
Description copied from interface:Task
Gets task work state or its clone (for running tasks). TODO better name- Specified by:
getActivitiesStateOrClone
in interfaceTask
-
getContainerableOrClone
public <C extends Containerable> C getContainerableOrClone(ItemPath path, Class<C> type)
Description copied from interface:Task
TODO- Specified by:
getContainerableOrClone
in interfaceTask
-
doesItemExist
public boolean doesItemExist(ItemPath path)
Description copied from interface:Task
TODO- Specified by:
doesItemExist
in interfaceTask
-
getActivityStateOrClone
public ActivityStateType getActivityStateOrClone(ItemPath path)
Description copied from interface:Task
TODO- Specified by:
getActivityStateOrClone
in interfaceTask
-
getParentAndRoot
@NotNull public @NotNull ParentAndRoot getParentAndRoot(OperationResult result) throws SchemaException, ObjectNotFoundException
Description copied from interface:Task
Looks for OID of the parent and the root of the task tree for this task. PRE: task is either persistent or is aRunningTask
.- Specified by:
getParentAndRoot
in interfaceTask
- Throws:
SchemaException
ObjectNotFoundException
-
getAggregatedLiveOperationStats
public OperationStatsType getAggregatedLiveOperationStats()
Description copied from interface:Task
Gets information from the current task and - for running task - its transient subtasks (aka worker threads). Clients beware: Update thread-local statistics before! They are not updated inside this method.- Specified by:
getAggregatedLiveOperationStats
in interfaceTask
-
getSelfReferenceFull
@NotNull public @NotNull ObjectReferenceType getSelfReferenceFull()
Description copied from interface:Task
Returns a full (object-bearing) reference to the task prism. Precondition: Task must be persistent.- Specified by:
getSelfReferenceFull
in interfaceTask
-
getSelfReference
@NotNull public @NotNull ObjectReferenceType getSelfReference()
Description copied from interface:Task
Returns a reference to the task prism. Precondition: Task must be persistent.- Specified by:
getSelfReference
in interfaceTask
-
getVersion
public String getVersion()
Description copied from interface:Task
Returns the version of underlying prism object.- Specified by:
getVersion
in interfaceTask
-
getPathToRootTask
public List<Task> getPathToRootTask(OperationResult result) throws SchemaException
Description copied from interface:Task
Returns the path from this task to the task tree root. (Starts with this task, ends with the root.)- Specified by:
getPathToRootTask
in interfaceTask
- Throws:
SchemaException
-
getOwnerRef
public ObjectReferenceType getOwnerRef()
Description copied from interface:Task
Returns a reference to the task owner. (Cloned if the task is running.)- Specified by:
getOwnerRef
in interfaceTask
-
getCachingProfiles
@NotNull public @NotNull Collection<String> getCachingProfiles()
Description copied from interface:Task
Returns an immutable collection of caching profiles. (From execution environment.)- Specified by:
getCachingProfiles
in interfaceTask
-
setExecutionConstraints
public void setExecutionConstraints(TaskExecutionConstraintsType value)
Description copied from interface:Task
Sets task execution constraints.- Specified by:
setExecutionConstraints
in interfaceTask
-
getExecutionEnvironment
public TaskExecutionEnvironmentType getExecutionEnvironment()
Description copied from interface:Task
Gets the execution environment configuration. Cloned if running task.- Specified by:
getExecutionEnvironment
in interfaceTask
-
setExecutionEnvironment
public void setExecutionEnvironment(TaskExecutionEnvironmentType value)
Description copied from interface:Task
Sets the execution environment configuration.- Specified by:
setExecutionEnvironment
in interfaceTask
-
getTracingRequestedFor
@NotNull public @NotNull Collection<TracingRootType> getTracingRequestedFor()
Description copied from interface:Task
Get points for which the tracing is requested (within this task).- Specified by:
getTracingRequestedFor
in interfaceTask
-
addTracingRequest
public void addTracingRequest(TracingRootType point)
Description copied from interface:Task
Requests (future) tracing for given tracing point - for this task.- Specified by:
addTracingRequest
in interfaceTask
-
removeTracingRequests
public void removeTracingRequests()
Description copied from interface:Task
Removes all tracing requests for this task.- Specified by:
removeTracingRequests
in interfaceTask
-
getTracingProfile
public TracingProfileType getTracingProfile()
Description copied from interface:Task
Returns (reference to tracing profile) that was defined for the tracing started by this task. NOT THREAD SAFE!- Specified by:
getTracingProfile
in interfaceTask
-
setTracingProfile
public void setTracingProfile(TracingProfileType tracingProfile)
Description copied from interface:Task
Sets the profile to be used for future tracing within this task.- Specified by:
setTracingProfile
in interfaceTask
-
registerConnIdOperationsListener
public void registerConnIdOperationsListener(@NotNull @NotNull ConnIdOperationsListener listener)
Description copied from interface:Task
Registers aConnIdOperationsListener
.- Specified by:
registerConnIdOperationsListener
in interfaceTask
-
unregisterConnIdOperationsListener
public void unregisterConnIdOperationsListener(@NotNull @NotNull ConnIdOperationsListener listener)
Description copied from interface:Task
Unregisters aConnIdOperationsListener
.- Specified by:
unregisterConnIdOperationsListener
in interfaceTask
-
hasAssignments
public boolean hasAssignments()
Description copied from interface:Task
Returns true if the task has any assignments.- Specified by:
hasAssignments
in interfaceTask
-
applyDeltasImmediate
public void applyDeltasImmediate(Collection<ItemDelta<?,?>> itemDeltas, OperationResult result) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException
- Specified by:
applyDeltasImmediate
in interfaceTask
- Throws:
ObjectAlreadyExistsException
ObjectNotFoundException
SchemaException
-
applyModificationsTransient
public void applyModificationsTransient(Collection<ItemDelta<?,?>> modifications) throws SchemaException
- Specified by:
applyModificationsTransient
in interfaceTask
- Throws:
SchemaException
-
startCollectingActionsExecuted
public void startCollectingActionsExecuted(ActionsExecutedCollector collector)
- Specified by:
startCollectingActionsExecuted
in interfaceTaskActionsExecutedCollector
-
stopCollectingActionsExecuted
public void stopCollectingActionsExecuted()
- Specified by:
stopCollectingActionsExecuted
in interfaceTaskActionsExecutedCollector
-
-