|
||||||||||
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)
|
OperationResult |
getCurrentResult()
Returns an OperationResult that was marked as the "current". |
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. |
ObjectType |
getObject(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. |
TaskPersistenceStatus |
getPersistenceStatus()
Returns task persistence status. |
long |
getProgress()
|
OperationResult |
getResult()
Returns a top-level OperationResult stored in the task. |
ScheduleType |
getSchedule()
|
TaskType |
getTaskTypeObject()
|
int |
hashCode()
|
boolean |
isAsynchronous()
Returns true if the task is asynchronous. |
boolean |
isCycle()
|
boolean |
isSingle()
|
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 |
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 |
setPersistenceStatus(TaskPersistenceStatus persistenceStatus)
Sets task persistence status. |
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 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 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 ObjectType getObject(OperationResult parentResult) throws ObjectNotFoundException, SchemaException
Task
getObject
in interface Task
ObjectNotFoundException
SchemaException
public OperationResult getResult()
Task
getResult
in interface Task
public OperationResult getCurrentResult()
Task
getCurrentResult
in interface Task
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 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.String dump()
Task
dump
in interface Task
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 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 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |