Class NullTaskImpl

  • All Implemented Interfaces:
    StatisticsCollector, 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 Detail

      • INSTANCE

        public static final Task INSTANCE
    • Constructor Detail

      • NullTaskImpl

        public NullTaskImpl()
    • 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 interface Task
      • 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 interface Task
        Returns:
        true if the task is asynchronous.
      • makeWaiting

        public void makeWaiting()
        Description copied from interface: Task
        Status-changing method. It changes task's execution status to WAITING. Currently use only on transient tasks, on suspended tasks or from within task handler.
        Specified by:
        makeWaiting in interface Task
      • makeRunnable

        public void makeRunnable()
        Description copied from interface: Task
        Status-changing method. It changes task's execution status to RUNNABLE. Currently use ONLY on transient tasks.
        Specified by:
        makeRunnable in interface Task
      • setInitialExecutionStatus

        public void setInitialExecutionStatus​(TaskExecutionStatus value)
        Description copied from interface: Task
        Sets task execution status. Can be used only for transient tasks (for safety reasons). However, it is better to use specific state-changing methods (makeWaiting, makeRunnable, ...).
        Specified by:
        setInitialExecutionStatus in interface Task
        Parameters:
        value - new task execution status.
        See Also:
        TaskExecutionStatus
      • 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 interface Task
      • isPersistent

        public boolean isPersistent()
        Description copied from interface: Task
        Returns true if task is persistent (i.e. stored in repository).
        Specified by:
        isPersistent in interface Task
      • getRecurrenceStatus

        public TaskRecurrence getRecurrenceStatus()
        Description copied from interface: Task
        Returns task recurrence status.
        Specified by:
        getRecurrenceStatus in interface Task
        Returns:
        task recurrence status
      • isSingle

        public boolean isSingle()
        Description copied from interface: Task
        Checks whether the task is single-run.
        Specified by:
        isSingle in interface Task
      • isRecurring

        public boolean isRecurring()
        Description copied from interface: Task
        Checks whether the task is a cyclic (recurrent) one.
        Specified by:
        isRecurring in interface Task
      • getSchedule

        public ScheduleType getSchedule()
        Description copied from interface: Task
        Returns the schedule.
        Specified by:
        getSchedule in interface Task
      • getBinding

        public TaskBinding getBinding()
        Description copied from interface: Task
        Returns task binding.
        Specified by:
        getBinding in interface Task
      • isTightlyBound

        public boolean isTightlyBound()
        Description copied from interface: Task
        Returns true if the task is tightly bound.
        Specified by:
        isTightlyBound in interface Task
      • isLooselyBound

        public boolean isLooselyBound()
        Description copied from interface: Task
        Returns true if the task is loosely bound.
        Specified by:
        isLooselyBound in interface Task
      • setBinding

        public void setBinding​(TaskBinding value)
        Description copied from interface: Task
        Sets the binding for this task.
        Specified by:
        setBinding in interface Task
      • getHandlerUri

        public String getHandlerUri()
        Description copied from interface: Task
        Returns handler URI. Handler URI 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 interface Task
        Returns:
        handler URI
      • setHandlerUri

        public void setHandlerUri​(String value)
        Description copied from interface: Task
        Sets handler URI. Handler URI 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:
        setHandlerUri in interface Task
        Parameters:
        value - new handler URI
      • setHandlerUriImmediate

        public void setHandlerUriImmediate​(String value,
                                           OperationResult parentResult)
        Description copied from interface: Task
        Sets handler URI, also immediately in the repository.
        Specified by:
        setHandlerUriImmediate in interface Task
      • getOtherHandlersUriStack

        public UriStack getOtherHandlersUriStack()
        Description copied from interface: Task
        Returns the stack of other handlers URIs. The idea is that a task may have a chain of handlers, forming a stack. After a handler at the top of the stack finishes its processing, TaskManager will remove it from the stack and invoke the then-current handler. After that finishes, the next handler will be called, and so on, until the stack is empty.
        Specified by:
        getOtherHandlersUriStack in interface Task
      • 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 interface Task
        Returns:
        task (lightweight) identifier
      • getOwner

        public PrismObject<? extends FocusType> getOwner()
        Description copied from interface: Task
        Returns user 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.
        Specified by:
        getOwner in interface Task
        Returns:
        task owner
      • setOwner

        public void setOwner​(PrismObject<? extends FocusType> owner)
        Description copied from interface: Task
        Sets the task owner. BEWARE: sets the owner only for in-memory information. So do not call this method for persistent tasks! (until fixed)
        Specified by:
        setOwner in interface Task
      • getChannel

        public String getChannel()
        Description copied from interface: Task
        Returns change channel URI.
        Specified by:
        getChannel in interface Task
      • setChannel

        public void setChannel​(String channelUri)
        Description copied from interface: Task
        Sets change channel URI.
        Specified by:
        setChannel in interface Task
      • 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 interface Task
      • getOid

        public String getOid()
        Description copied from interface: Task
        Returns task OID. Only persistent tasks have OID. This returns null if the task is not persistent.
        Specified by:
        getOid in interface Task
        Returns:
        task OID
      • getObject

        public <T extends ObjectTypePrismObject<T> getObject​(Class<T> type,
                                                               OperationResult parentResult)
        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. This is an optional property. The object will only be returned if the task really contains an object without OID (e.g. unfinished account shadow). In all other cases this method may return null. Use getObjectRefOrClone instead. Optional. May return null.
        Specified by:
        getObject in interface Task
      • 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 interface Task
      • setObjectRef

        public void setObjectRef​(String oid,
                                 QName type)
        Description copied from interface: Task
        Sets the object reference.
        Specified by:
        setObjectRef in interface Task
      • setObjectTransient

        public void setObjectTransient​(PrismObject object)
        Description copied from interface: Task
        Sets the "task object" in the in-memory task representation (i.e. not in the repo).
        Specified by:
        setObjectTransient in interface Task
      • 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 interface Task
      • 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!
        Specified by:
        getResult in interface Task
        Returns:
        task operation result.
      • setResult

        public void setResult​(OperationResult result)
        Description copied from interface: Task
        Sets the top-level OperationResult stored in the task.
        Specified by:
        setResult in interface Task
      • 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).
        Specified by:
        getLastRunStartTimestamp in interface Task
      • 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).
        Specified by:
        getLastRunFinishTimestamp in interface Task
      • getNextRunStartTime

        public Long getNextRunStartTime​(OperationResult parentResult)
        Description copied from interface: Task
        Returns the time when the task should start again.
        Specified by:
        getNextRunStartTime in interface Task
      • getName

        public PolyStringType getName()
        Description copied from interface: Task
        Returns human-readable name of the task.
        Specified by:
        getName in interface Task
      • setName

        public void setName​(PolyStringType value)
        Description copied from interface: Task
        Sets the human-readable name of the task.
        Specified by:
        setName in interface Task
      • setName

        public void setName​(String value)
        Description copied from interface: Task
        Sets the human-readable name of the task.
        Specified by:
        setName in interface 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 interface Task
      • getExtensionItemOrClone

        public <IV extends PrismValue,​ID extends ItemDefinitionItem<IV,​ID> getExtensionItemOrClone​(ItemName propertyName)
        Description copied from interface: Task
        Returns specified item (property, reference or container) from the extension.
        Specified by:
        getExtensionItemOrClone in interface Task
        Returns:
        null if extension or item does not exist To maintain thread safety, for running tasks returns a clone of the original item.
      • 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 interface Task
        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 interface Task
      • 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 interface Task
      • addExtensionProperty

        public void addExtensionProperty​(PrismProperty<?> property)
        Description copied from interface: Task
        Adds value(s) to a given extension property.
        Specified by:
        addExtensionProperty in interface Task
        Parameters:
        property - holder of the value(s) to be added into task extension property
      • setExtensionPropertyValue

        public <T> void setExtensionPropertyValue​(QName propertyName,
                                                  T value)
        Description copied from interface: Task
        Sets (i.e., replaces) the value of the given property in task extension.
        Specified by:
        setExtensionPropertyValue in interface Task
        Parameters:
        propertyName - name of the property
        value - value of the property
      • setExtensionPropertyValueTransient

        public <T> void setExtensionPropertyValueTransient​(QName propertyName,
                                                           T value)
        Description copied from interface: Task
        Sets (i.e., replaces) the value of the given property in task extension - without writing to repo.
        Specified by:
        setExtensionPropertyValueTransient in interface Task
        Parameters:
        propertyName - name of the property
        value - value of the property
      • 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 interface Task
        Parameters:
        containerName - name of the container
        value - 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 interface Task
      • modifyExtension

        public void modifyExtension​(ItemDelta itemDelta)
        Description copied from interface: Task
        Modifies task extension using given delta.
        Specified by:
        modifyExtension in interface Task
      • getProgress

        public long getProgress()
        Description copied from interface: Task
        Returns task progress, as reported by task handler.
        Specified by:
        getProgress in interface Task
      • setProgress

        public void setProgress​(Long value)
        Description copied from interface: Task
        Record progress of the task, storing it persistently if needed.
        Specified by:
        setProgress in interface Task
      • setProgressImmediate

        public void setProgressImmediate​(Long progress,
                                         OperationResult parentResult)
        Description copied from interface: Task
        "Immediate" version of the above method.
        Specified by:
        setProgressImmediate in interface Task
      • getUpdatedOrClonedTaskObject

        @NotNull
        public @NotNull PrismObject<TaskType> getUpdatedOrClonedTaskObject()
        Description copied from interface: Task
        Returns backing task prism object. AVOID use of this method if possible. - for regular tasks it has to update operation result in the prism object (might be costly) - for running tasks it provides a clone of the actual prism object (even more costly and leads to lost changes if the returned value is changed)
        Specified by:
        getUpdatedOrClonedTaskObject in interface Task
      • getUpdatedTaskObject

        @NotNull
        public @NotNull PrismObject<TaskType> getUpdatedTaskObject()
        Description copied from interface: Task
        Returns backing task prism object, provided that task is not running. Beware that the task operation result is updated (might be costly).
        Specified by:
        getUpdatedTaskObject in interface Task
      • refresh

        public void refresh​(OperationResult parentResult)
        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.
        Specified by:
        refresh in interface Task
      • 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 interface DebugDumpable
        Returns:
        content of the object intended for diagnostics by system administrator.
      • 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 interface Task
      • 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 interface Task
      • makeRecurringSimple

        public void makeRecurringSimple​(int interval)
        Description copied from interface: Task
        Makes a task recurring, running in a fixed time intervals.
        Specified by:
        makeRecurringSimple in interface Task
        Parameters:
        interval - interval to run the task (in seconds)
      • makeRecurringCron

        public void makeRecurringCron​(String cronLikeSpecification)
        Description copied from interface: Task
        Makes a task recurring, running according to a cron-like schedule.
        Specified by:
        makeRecurringCron in interface Task
        Parameters:
        cronLikeSpecification - schedule specification
      • makeSingle

        public void makeSingle()
        Description copied from interface: Task
        Makes a task single-run, with no particular schedule.
        Specified by:
        makeSingle in interface Task
      • 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.
        Specified by:
        getNode in interface Task
      • getResultStatus

        public OperationResultStatusType getResultStatus()
        Description copied from interface: Task
        Returns the status of top-level OperationResult stored in the task.
        Specified by:
        getResultStatus in interface Task
        Returns:
        task operation result status
      • 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 interface Task
      • isResilient

        public boolean isResilient()
        Description copied from interface: Task
        Resilient tasks are those that survive node shutdown. I.e. their ThreadStopAction is either 'restart' or 'reschedule'.
        Specified by:
        isResilient in interface Task
      • setCategory

        public void setCategory​(String category)
        Description copied from interface: Task
        Sets the task category.
        Specified by:
        setCategory in interface Task
      • 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 interface Task
      • 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 interface Task
        Returns:
        task extension
      • hasExtension

        public boolean hasExtension()
        Specified by:
        hasExtension in interface Task
      • getExtensionPropertyOrClone

        public <T> PrismProperty<T> getExtensionPropertyOrClone​(ItemName propertyName)
        Description copied from interface: Task
        Returns specified property from the extension
        Specified by:
        getExtensionPropertyOrClone in interface Task
        Returns:
        null if extension or property does not exist.
      • getExtensionPropertyRealValue

        public <T> T getExtensionPropertyRealValue​(ItemName propertyName)
        Description copied from interface: Task
        Returns specified single-valued property real value from the extension
        Specified by:
        getExtensionPropertyRealValue in interface Task
        Returns:
        null if extension or property does not exist.
      • 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.
        Specified by:
        getExtensionContainerRealValueOrClone in interface Task
        Returns:
        null if extension or container does not exist.
      • getExtensionReferenceOrClone

        public PrismReference getExtensionReferenceOrClone​(ItemName name)
        Description copied from interface: Task
        Returns specified reference from the extension.
        Specified by:
        getExtensionReferenceOrClone in interface Task
        Returns:
        null if extension or reference does not exist.
      • setDescriptionImmediate

        public void setDescriptionImmediate​(String value,
                                            OperationResult parentResult)
        Description copied from interface: Task
        Sets task description, immediately storing it into the repo.
        Specified by:
        setDescriptionImmediate in interface Task
      • setDescription

        public void setDescription​(String value)
        Description copied from interface: Task
        Sets task description.
        Specified by:
        setDescription in interface Task
      • getDescription

        public String getDescription()
        Description copied from interface: Task
        Returns task description.
        Specified by:
        getDescription in interface Task
      • 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 interface Task
      • makeRecurring

        public void makeRecurring​(ScheduleType schedule)
        Description copied from interface: Task
        Makes a task recurring, with a given schedule.
        Specified by:
        makeRecurring in interface Task
      • makeSingle

        public void makeSingle​(ScheduleType schedule)
        Description copied from interface: Task
        Makes a task single-run, with a given schedule.
        Specified by:
        makeSingle in interface Task
      • 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 interface Task
      • 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).
        Specified by:
        getParent in interface Task
      • pushHandlerUri

        public void pushHandlerUri​(String uri,
                                   ScheduleType schedule,
                                   TaskBinding binding,
                                   Collection<ItemDelta<?,​?>> extensionDeltas)
        Description copied from interface: Task
        Pushes a new handler URI onto the stack of handlers. This means that the provided handler URI becomes the current one. Current one becomes the first one on the stack of other handlers, etc. So the newly added handler will be started FIRST. Care must be taken not to interfere with the execution of a task handler. It is recommended to call this method when it is sure that no handler is executing. Alongwith URI, other information are set, namely schedule, binding, and parameters that will be put into task extension when the handler URI will be invoked.
        Specified by:
        pushHandlerUri in interface Task
        Parameters:
        uri - Handler URI to be put onto the stack.
        schedule - Schedule to be used to run the handler.
        binding - Binding to be used to run the handler.
        extensionDeltas - The feature is EXPERIMENTAL, do not use if not absolutely necessary.
      • pushHandlerUri

        public void pushHandlerUri​(String uri,
                                   ScheduleType schedule,
                                   TaskBinding binding,
                                   ItemDelta<?,​?> delta)
        Description copied from interface: Task
        Same as above, with one extension delta (not a collection of them).
        Specified by:
        pushHandlerUri in interface Task
        delta - EXPERIMENTAL, do not use if not absolutely necessary.
      • finishHandler

        public void finishHandler​(OperationResult parentResult)
        Description copied from interface: Task
        Removes current handler from the handlers stack. Closes task if that was the last handler. USE WITH CARE. Normally, this is used implicitly in the task execution routine and there's no need for you to call this from your code.
        Specified by:
        finishHandler in interface Task
      • 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 interface Task
      • startWaitingForTasksImmediate

        public void startWaitingForTasksImmediate​(OperationResult result)
        Description copied from interface: Task
        Starts "passive" waiting for other tasks. Precondition: The task must already be in WAITING state. Postcondition: If there are any tasks to wait for, task remains in WAITING/OTHER_TASKS state. However, if there are no tasks to wait for, task is either unpaused (if there is any handler) or closed (if there is not). Passive waiting consists of putting the task into WAITING/OTHER_TASKS state. Unpausing it is the responsibility of task manager - it does it when any of prerequisite tasks closes. At that moment, task manager checks all dependent tasks (explicit or implicit) of the closing task, and unpauses these, which can be unpaused.
        Specified by:
        startWaitingForTasksImmediate in interface Task
      • getDependents

        public List<String> getDependents()
        Description copied from interface: Task
        Lists all explicit dependents' identifiers.
        Specified by:
        getDependents in interface Task
      • deleteDependent

        public void deleteDependent​(String value)
        Description copied from interface: Task
        Deletes a task from the list of dependents of this task.
        Specified by:
        deleteDependent in interface Task
      • 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 interface Task
      • getWaitingReason

        public TaskWaitingReason getWaitingReason()
        Description copied from interface: Task
        Returns the task waiting reason for a WAITING task.
        Specified by:
        getWaitingReason in interface Task
      • isClosed

        public boolean isClosed()
        Description copied from interface: Task
        Returns true if the task is closed.
        Specified by:
        isClosed in interface Task
      • makeWaiting

        public void makeWaiting​(TaskWaitingReason reason)
        Description copied from interface: Task
        Changes exec status to WAITING, with a given waiting reason. Currently use only on transient tasks or from within task handler.
        Specified by:
        makeWaiting in interface Task
      • 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 interface Task
      • addExtensionReference

        public void addExtensionReference​(PrismReference reference)
        Description copied from interface: Task
        Adds value(s) to a given extension reference.
        Specified by:
        addExtensionReference in interface Task
        Parameters:
        reference - holder of the value(s) to be added into task extension reference
      • 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 interface Task
      • getExpectedTotal

        public Long getExpectedTotal()
        Description copied from interface: Task
        Returns expected total progress.
        Specified by:
        getExpectedTotal in interface Task
      • 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 interface Task
      • modify

        public void modify​(ItemDelta<?,​?> delta)
        Description copied from interface: Task
        Changes in-memory representation immediately and schedules a corresponding batched modification.
        Specified by:
        modify in interface Task
      • modifyAndFlush

        public void modifyAndFlush​(ItemDelta<?,​?> delta,
                                   OperationResult parentResult)
        Description copied from interface: Task
        Changes in-memory and in-repo representations immediately.
        Specified by:
        modifyAndFlush in interface Task
      • 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).
        Specified by:
        getAggregatedLiveOperationStats in interface Task
      • getTriggers

        public Collection<? extends TriggerType> getTriggers()
        Description copied from interface: Task
        NEVER modify objects returned in multithreaded environments!
        Specified by:
        getTriggers in interface Task
      • getAssignments

        public Collection<? extends AssignmentType> getAssignments()
        Description copied from interface: Task
        NEVER modify objects returned in multithreaded environments!
        Specified by:
        getAssignments in interface Task
      • isScavenger

        public boolean isScavenger()
        Specified by:
        isScavenger in interface Task