|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.evolveum.midpoint.task.impl.TaskImpl
public class TaskImpl
Implementation of a Task. This is very simplistic now. It does not even serialize itself.
TaskManagerImpl
Method Summary | ||
---|---|---|
boolean |
canRun()
Returns true if the task can run (was not interrupted). |
|
void |
close(OperationResult parentResult)
Close the task. |
|
java.lang.String |
dump()
Return human-readable representation of the task content. |
|
boolean |
equals(java.lang.Object obj)
|
|
void |
finishHandler()
Marks current handler as finished, and removes it from the handler stack. |
|
TaskBinding |
getBinding()
|
|
TaskExclusivityStatus |
getExclusivityStatus()
Returns task exclusivity status. |
|
TaskExecutionStatus |
getExecutionStatus()
Returns execution status. |
|
PropertyContainer |
getExtension()
Returns task extension. |
|
Property |
getExtension(javax.xml.namespace.QName propertyName)
|
|
java.lang.String |
getHandlerUri()
Returns handler URI. |
|
java.lang.Long |
getLastRunFinishTimestamp()
|
|
java.lang.Long |
getLastRunStartTimestamp()
|
|
java.lang.String |
getName()
Returns human-readable name of the task. |
|
java.lang.Long |
getNextRunStartTime()
|
|
|
getObject(java.lang.Class<T> type,
OperationResult parentResult)
Returns object that the task is associated with. |
|
java.lang.String |
getObjectOid()
Returns OID of the object that the task is associated with. |
|
ObjectReferenceType |
getObjectRef()
Returns reference to the object that the task is associated with. |
|
java.lang.String |
getOid()
Returns task OID. |
|
UriStack |
getOtherHandlersUriStack()
Returns the stack of other handlers URIs. |
|
UserType |
getOwner()
Returns user that owns this task. |
|
TaskPersistenceStatus |
getPersistenceStatus()
Returns task persistence status. |
|
long |
getProgress()
|
|
OperationResult |
getResult()
Returns a top-level OperationResult stored in the task. |
|
ScheduleType |
getSchedule()
|
|
java.lang.String |
getTaskIdentifier()
Returns task (lightweight) identifier. |
|
TaskType |
getTaskTypeObject()
|
|
int |
hashCode()
|
|
boolean |
isAsynchronous()
Returns true if the task is asynchronous. |
|
boolean |
isCycle()
|
|
boolean |
isLooselyBound()
|
|
boolean |
isSingle()
|
|
boolean |
isTightlyBound()
|
|
void |
makeRecurrent(long interval)
|
|
void |
modifyExtension(java.util.List<PropertyModification> modifications,
OperationResult parentResult)
TODO The modification path is relative to the extension, therefore it will almost always be "." (or null). |
|
void |
recordProgress(long progress,
OperationResult parentResult)
Record progress of the task, storing it persistently if needed. |
|
void |
recordRunFinish(TaskRunResult runResult,
OperationResult parentResult)
Record finish of the last "run" of the task TODO: better documentation |
|
void |
recordRunStart(OperationResult parentResult)
|
|
void |
refresh(OperationResult parentResult)
Re-reads the task state from the persistent storage. |
|
void |
setExclusivityStatus(TaskExclusivityStatus exclusivityStatus)
Sets task exclusivity status. |
|
void |
setExecutionStatus(TaskExecutionStatus executionStatus)
Sets task execution status. |
|
void |
setHandlerUri(java.lang.String handlerUri)
Sets handler URI. |
|
void |
setName(java.lang.String name)
Sets the human-readable name of the task. |
|
void |
setObjectRef(ObjectReferenceType objectRef)
|
|
void |
setOid(java.lang.String oid)
Sets task OID. |
|
void |
setOwner(UserType owner)
|
|
void |
setPersistenceStatus(TaskPersistenceStatus persistenceStatus)
Sets task persistence status. |
|
void |
setResult(OperationResult result)
|
|
void |
shutdown()
Signal the task to shut down. |
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public java.lang.String getTaskIdentifier()
Task
getTaskIdentifier
in interface Task
public UserType getOwner()
Task
getOwner
in interface Task
public void setOwner(UserType owner)
setOwner
in interface Task
public TaskExecutionStatus getExecutionStatus()
Task
getExecutionStatus
in interface Task
TaskExecutionStatus
public TaskPersistenceStatus getPersistenceStatus()
Task
getPersistenceStatus
in interface Task
TaskPersistenceStatus
public TaskExclusivityStatus getExclusivityStatus()
Task
getExclusivityStatus
in interface Task
TaskExclusivityStatus
public TaskBinding getBinding()
getBinding
in interface Task
public boolean isAsynchronous()
Task
isAsynchronous
in interface Task
public long getProgress()
getProgress
in interface Task
public ObjectReferenceType getObjectRef()
Task
getObjectRef
in interface Task
public void setObjectRef(ObjectReferenceType objectRef)
setObjectRef
in interface Task
public java.lang.String getObjectOid()
Task
getObjectOid
in interface Task
public <T extends ObjectType> T getObject(java.lang.Class<T> type, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
Task
getObject
in interface Task
ObjectNotFoundException
SchemaException
public OperationResult getResult()
Task
getResult
in interface Task
public void setResult(OperationResult result)
public java.lang.String getHandlerUri()
Task
getHandlerUri
in interface Task
public void setHandlerUri(java.lang.String handlerUri)
Task
setHandlerUri
in interface Task
handlerUri
- new handler URIpublic UriStack getOtherHandlersUriStack()
Task
getOtherHandlersUriStack
in interface Task
public void setExecutionStatus(TaskExecutionStatus executionStatus)
Task
setExecutionStatus
in interface Task
executionStatus
- new task execution status.TaskExecutionStatus
public void setPersistenceStatus(TaskPersistenceStatus persistenceStatus)
Task
setPersistenceStatus
in interface Task
persistenceStatus
- new task persistence status.TaskPersistenceStatus
public void setExclusivityStatus(TaskExclusivityStatus exclusivityStatus)
Task
setExclusivityStatus
in interface Task
exclusivityStatus
- new task exclusivity status.TaskExclusivityStatus
public java.lang.String getOid()
Task
getOid
in interface Task
public void setOid(java.lang.String oid)
Task
setOid
in interface Task
oid
- new task OID.public java.lang.String getName()
Task
getName
in interface Task
public void setName(java.lang.String name)
Task
setName
in interface Task
name
- new human-readable name of the task.public PropertyContainer getExtension()
Task
getExtension
in interface Task
public Property getExtension(javax.xml.namespace.QName propertyName)
getExtension
in interface Task
public void modifyExtension(java.util.List<PropertyModification> modifications, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
Task
modifyExtension
in interface Task
ObjectNotFoundException
SchemaException
public TaskType getTaskTypeObject()
getTaskTypeObject
in interface Task
public java.lang.Long getLastRunStartTimestamp()
getLastRunStartTimestamp
in interface Task
public java.lang.Long getLastRunFinishTimestamp()
getLastRunFinishTimestamp
in interface Task
public java.lang.Long getNextRunStartTime()
getNextRunStartTime
in interface Task
public java.lang.String dump()
Task
dump
in interface Task
dump
in interface Dumpable
public void recordRunStart(OperationResult parentResult) throws ObjectNotFoundException, SchemaException
recordRunStart
in interface Task
ObjectNotFoundException
SchemaException
public void recordRunFinish(TaskRunResult runResult, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
Task
recordRunFinish
in interface Task
runResult
- result of the run to record
ObjectNotFoundException
SchemaException
public void recordProgress(long progress, OperationResult parentResult) throws ObjectNotFoundException, SchemaException
Task
recordProgress
in interface Task
ObjectNotFoundException
SchemaException
public void refresh(OperationResult parentResult) throws ObjectNotFoundException, SchemaException
Task
refresh
in interface Task
ObjectNotFoundException
SchemaException
public void close(OperationResult parentResult) throws ObjectNotFoundException, SchemaException
Task
close
in interface Task
ObjectNotFoundException
SchemaException
public boolean isSingle()
isSingle
in interface Task
public boolean isCycle()
isCycle
in interface Task
public boolean isTightlyBound()
isTightlyBound
in interface Task
public boolean isLooselyBound()
isLooselyBound
in interface Task
public ScheduleType getSchedule()
getSchedule
in interface Task
public void shutdown()
Task
shutdown
in interface Task
public boolean canRun()
Task
canRun
in interface Task
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void makeRecurrent(long interval)
public void finishHandler()
Task
finishHandler
in interface Task
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |