org.ow2.bonita.facade.runtime.impl
Class TaskInstanceImpl

java.lang.Object
  extended by org.ow2.bonita.facade.runtime.impl.ActivityBodyImpl
      extended by org.ow2.bonita.facade.runtime.impl.TaskInstanceImpl
All Implemented Interfaces:
java.io.Serializable, ActivityBody, TaskInstance
Direct Known Subclasses:
TaskFullInstanceImpl

public class TaskInstanceImpl
extends ActivityBodyImpl
implements TaskInstance

Author:
Pierre Vigneras
See Also:
Serialized Form

Field Summary
protected  java.util.List<AssignUpdate> assignUpdates
           
protected  java.util.Date createdDate
           
protected  java.util.Date dueDate
           
protected  java.lang.String endedBy
           
protected  java.lang.String startedBy
           
 
Fields inherited from class org.ow2.bonita.facade.runtime.impl.ActivityBodyImpl
dbid, endedDate, readyDate, startedDate, stateUpdates, uuid
 
Constructor Summary
protected TaskInstanceImpl()
           
  TaskInstanceImpl(TaskInstanceImpl taskInstance)
           
protected TaskInstanceImpl(TaskUUID taskUUID, java.util.Date createdDate)
           
 
Method Summary
 ActivityBody copy()
           
 java.util.List<AssignUpdate> getAssignUpdates()
          Returns the list of recorded assign changes.
 java.util.Date getCreatedDate()
          Returns the date recorded when the task is created.
 java.util.Date getDueDate()
          Returns the date at which the task must be started.
 java.lang.String getEndedBy()
          Returns the user finishing the activity.
protected  Update getLastUpdate()
           
 java.lang.String getStartedBy()
          Returns the user starting the task.
 java.util.Set<java.lang.String> getTaskCandidates()
          Returns the current set of candidate users.
This list depends on:
the set of candidate users when the task has been initially created.
 java.lang.String getTaskUser()
          Returns the user assigned for the task.
Check before calling this method if a user has been assigned with TaskInstance.isTaskAssigned() method.
 java.lang.String getUpdatedBy()
          Returns the user Id performing the update (state update or assign update).
 TaskUUID getUUID()
          Return the UUID of the ActivityBody.
For instance, if the body of the activity is a TaskInstance this UUID is a TaskUUID.
 boolean isTaskAssigned()
          Return true if the task is assigned.
 java.lang.String toString()
           
 
Methods inherited from class org.ow2.bonita.facade.runtime.impl.ActivityBodyImpl
getEndedDate, getReadyDate, getStartedDate, getState, getStateUpdates, setActivityState, setEndedDate, setReadyDate, setStartedDate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ow2.bonita.facade.runtime.ActivityBody
getEndedDate, getReadyDate, getStartedDate, getState, getStateUpdates
 

Field Detail

startedBy

protected java.lang.String startedBy

endedBy

protected java.lang.String endedBy

dueDate

protected java.util.Date dueDate

createdDate

protected java.util.Date createdDate

assignUpdates

protected java.util.List<AssignUpdate> assignUpdates
Constructor Detail

TaskInstanceImpl

protected TaskInstanceImpl()

TaskInstanceImpl

protected TaskInstanceImpl(TaskUUID taskUUID,
                           java.util.Date createdDate)

TaskInstanceImpl

public TaskInstanceImpl(TaskInstanceImpl taskInstance)
Parameters:
processDefinitionUUID -
deploymentId -
Method Detail

copy

public ActivityBody copy()
Specified by:
copy in interface ActivityBody

toString

public java.lang.String toString()
Overrides:
toString in class ActivityBodyImpl

getCreatedDate

public java.util.Date getCreatedDate()
Description copied from interface: TaskInstance
Returns the date recorded when the task is created. The task is created when the execution flow enters into the activity node defining the task.

Specified by:
getCreatedDate in interface TaskInstance
Returns:
The date recorded when the task is created.

getDueDate

public java.util.Date getDueDate()
Description copied from interface: TaskInstance
Returns the date at which the task must be started.

Specified by:
getDueDate in interface TaskInstance
Returns:
The date at which the task must be started.

getEndedBy

public java.lang.String getEndedBy()
Description copied from interface: TaskInstance
Returns the user finishing the activity.

Specified by:
getEndedBy in interface TaskInstance
Returns:
The user finishing the activity.

getStartedBy

public java.lang.String getStartedBy()
Description copied from interface: TaskInstance
Returns the user starting the task.

Specified by:
getStartedBy in interface TaskInstance
Returns:
The user starting the task.

getUpdatedBy

public java.lang.String getUpdatedBy()
Description copied from interface: TaskInstance
Returns the user Id performing the update (state update or assign update).

Specified by:
getUpdatedBy in interface TaskInstance
Returns:
the user Id performing the update (state update or assign update).

getTaskUser

public java.lang.String getTaskUser()
Description copied from interface: TaskInstance
Returns the user assigned for the task.
Check before calling this method if a user has been assigned with TaskInstance.isTaskAssigned() method. The assigned user depends on:

Specified by:
getTaskUser in interface TaskInstance
Returns:
The user assigned for the task.

getTaskCandidates

public java.util.Set<java.lang.String> getTaskCandidates()
Description copied from interface: TaskInstance
Returns the current set of candidate users.
This list depends on:

Specified by:
getTaskCandidates in interface TaskInstance
Returns:
A set of user id.

getUUID

public TaskUUID getUUID()
Description copied from interface: ActivityBody
Return the UUID of the ActivityBody.
For instance, if the body of the activity is a TaskInstance this UUID is a TaskUUID.

Specified by:
getUUID in interface ActivityBody
Specified by:
getUUID in interface TaskInstance
Overrides:
getUUID in class ActivityBodyImpl
Returns:
The UUID of the ActivityBody.

isTaskAssigned

public boolean isTaskAssigned()
Description copied from interface: TaskInstance
Return true if the task is assigned.

Specified by:
isTaskAssigned in interface TaskInstance
Returns:
true if the task is assigned.

getAssignUpdates

public java.util.List<AssignUpdate> getAssignUpdates()
Description copied from interface: TaskInstance
Returns the list of recorded assign changes.

Specified by:
getAssignUpdates in interface TaskInstance
Returns:
The list of recorded assign changes.

getLastUpdate

protected Update getLastUpdate()


Copyright © 2009 OW2 Consortium. All Rights Reserved.