Class AbstractTaskEvent
- java.lang.Object
-
- org.silverpeas.core.workflow.engine.event.AbstractTaskEvent
-
- All Implemented Interfaces:
GenericEvent
- Direct Known Subclasses:
QuestionEventImpl
,ResponseEventImpl
,TaskDoneEventImpl
,TaskSavedEventImpl
public class AbstractTaskEvent extends Object implements GenericEvent
-
-
Constructor Summary
Constructors Constructor Description AbstractTaskEvent(Task resolvedTask, String actionName, DataRecord data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Date
getActionDate()
Returns the action date.String
getActionName()
Returns the name of the action chosen to resolve the activity.DataRecord
getDataRecord()
Returns the data filled when the action was processed.ProcessInstance
getProcessInstance()
Returns the process instance.ProcessModel
getProcessModel()
Returns the process model (peas).State
getResolvedState()
Returns the state/activity resolved by the user.User
getSubstitute()
User
getUser()
Returns the actor.User
getUserOrSubstitute()
Returns substitute if defined, regular user otherwiseString
getUserRoleName()
Returns the role name of the actorvoid
setProcessInstance(ProcessInstance processInstance)
Set the process instance (when created).void
setSubstitute(User substitute)
-
-
-
Constructor Detail
-
AbstractTaskEvent
public AbstractTaskEvent(Task resolvedTask, String actionName, DataRecord data)
-
-
Method Detail
-
getUser
public User getUser()
Returns the actor.- Specified by:
getUser
in interfaceGenericEvent
-
getProcessInstance
public ProcessInstance getProcessInstance()
Returns the process instance. Returns null when the task is an instance creation.- Specified by:
getProcessInstance
in interfaceGenericEvent
-
setProcessInstance
public void setProcessInstance(ProcessInstance processInstance)
Set the process instance (when created).
-
getProcessModel
public ProcessModel getProcessModel()
Returns the process model (peas). Must be not null when the task is an instance creation.
-
getResolvedState
public State getResolvedState()
Returns the state/activity resolved by the user.- Specified by:
getResolvedState
in interfaceGenericEvent
-
getActionName
public String getActionName()
Returns the name of the action chosen to resolve the activity.- Specified by:
getActionName
in interfaceGenericEvent
-
getActionDate
public Date getActionDate()
Returns the action date.- Specified by:
getActionDate
in interfaceGenericEvent
-
getDataRecord
public DataRecord getDataRecord()
Returns the data filled when the action was processed.- Specified by:
getDataRecord
in interfaceGenericEvent
-
getUserRoleName
public String getUserRoleName()
Returns the role name of the actor- Specified by:
getUserRoleName
in interfaceGenericEvent
-
getSubstitute
public User getSubstitute()
- Specified by:
getSubstitute
in interfaceGenericEvent
-
setSubstitute
public void setSubstitute(User substitute)
- Specified by:
setSubstitute
in interfaceGenericEvent
-
getUserOrSubstitute
public User getUserOrSubstitute()
Description copied from interface:GenericEvent
Returns substitute if defined, regular user otherwise- Specified by:
getUserOrSubstitute
in interfaceGenericEvent
- Returns:
- a User
-
-