com.silverpeas.workflow.engine.instance
Class HistoryStepImpl

java.lang.Object
  extended by com.silverpeas.workflow.engine.instance.HistoryStepImpl
All Implemented Interfaces:
HistoryStep, UpdatableHistoryStep, Comparable<HistoryStep>

public class HistoryStepImpl
extends Object
implements UpdatableHistoryStep, Comparable<HistoryStep>


Constructor Summary
HistoryStepImpl()
          Default constructor
 
Method Summary
 int compareTo(HistoryStep arg0)
           
 void deleteActionRecord()
          Delete the data associated to this step.
 String getAction()
          Get the action name logged in this History step
 Date getActionDate()
          Get the date when the action has been done
 DataRecord getActionRecord()
          Get the data associated to this step.
 int getActionStatus()
          Get the resulting status of action logged in this history step
 String getId()
          For persistence in database Get this object id
 ProcessInstance getProcessInstance()
          Get the process instance
 String getResolvedState()
          Get the name of state that has been resolved
 String getResultingState()
          Get the name of state that has been resolved
 User getUser()
          Get the actor of the action logged in this History step
 String getUserId()
          Get the actor id of the action logged in this History step
 String getUserRoleName()
          Get the role under which the user did the action
 void setAction(String action)
          Set the action name logged in this History step
 void setActionDate(Date actionDate)
          Set the date when the action has been done
 void setActionRecord(DataRecord data)
          Set the data associated to this step.
 void setActionStatus(int actionStatus)
          Set the resulting status of action logged in this history step -1 : Process failed 0 : To Be Processed 1 : Processed 2 : Affectations Done 3 : Saved (to be continued)
 void setId(String id)
          For persistence in database Set this object id
 void setProcessInstance(ProcessInstance processInstance)
          Set the process instance
 void setResolvedState(String state)
          Set the name of state that has been resolved
 void setResultingState(String state)
          Set the name of state that must result from logged action
 void setTodayAsActionDate()
          Set the today as date when the action has been done
 void setUserId(String userId)
          Set the actor id of the action logged in this History step
 void setUserRoleName(String userRoleName)
          Set the role under which the user did the action
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HistoryStepImpl

public HistoryStepImpl()
Default constructor

Method Detail

getId

public String getId()
For persistence in database Get this object id

Specified by:
getId in interface HistoryStep
Returns:
this object id

setId

public void setId(String id)
For persistence in database Set this object id

Parameters:
this - object id

getProcessInstance

public ProcessInstance getProcessInstance()
Get the process instance

Specified by:
getProcessInstance in interface HistoryStep
Returns:
process instance

setProcessInstance

public void setProcessInstance(ProcessInstance processInstance)
Set the process instance

Specified by:
setProcessInstance in interface UpdatableHistoryStep
Parameters:
instance - process instance

getUser

public User getUser()
             throws WorkflowException
Get the actor of the action logged in this History step

Specified by:
getUser in interface HistoryStep
Returns:
the actor
Throws:
WorkflowException

getUserId

public String getUserId()
Get the actor id of the action logged in this History step

Returns:
the actor id

setUserId

public void setUserId(String userId)
Set the actor id of the action logged in this History step

Specified by:
setUserId in interface UpdatableHistoryStep
Parameters:
userId - the actor id

getUserRoleName

public String getUserRoleName()
Get the role under which the user did the action

Specified by:
getUserRoleName in interface HistoryStep
Returns:
the role's name

setUserRoleName

public void setUserRoleName(String userRoleName)
Set the role under which the user did the action

Specified by:
setUserRoleName in interface UpdatableHistoryStep
Parameters:
userRoleName - the role's name

getAction

public String getAction()
Get the action name logged in this History step

Specified by:
getAction in interface HistoryStep
Returns:
the action name

setAction

public void setAction(String action)
Set the action name logged in this History step

Specified by:
setAction in interface UpdatableHistoryStep
Parameters:
action - the action name

getActionDate

public Date getActionDate()
Get the date when the action has been done

Specified by:
getActionDate in interface HistoryStep
Returns:
the action date

setActionDate

public void setActionDate(Date actionDate)
Set the date when the action has been done

Specified by:
setActionDate in interface UpdatableHistoryStep
Parameters:
actionDate - the action date

setTodayAsActionDate

public void setTodayAsActionDate()
Set the today as date when the action has been done


getResolvedState

public String getResolvedState()
Get the name of state that has been resolved

Specified by:
getResolvedState in interface HistoryStep
Returns:
the resolved state name

setResolvedState

public void setResolvedState(String state)
Set the name of state that has been resolved

Specified by:
setResolvedState in interface UpdatableHistoryStep
Parameters:
state - the resolved state name

getResultingState

public String getResultingState()
Get the name of state that has been resolved

Specified by:
getResultingState in interface HistoryStep
Returns:
the resolved state name

setResultingState

public void setResultingState(String state)
Set the name of state that must result from logged action

Specified by:
setResultingState in interface UpdatableHistoryStep
Parameters:
state - state name

getActionStatus

public int getActionStatus()
Get the resulting status of action logged in this history step

Specified by:
getActionStatus in interface HistoryStep
Returns:
action status
  • -1 : Process failed
  • 0 : To Be Processed
  • 1 : Processed
  • 2 : Affectations Done

setActionStatus

public void setActionStatus(int actionStatus)
Set the resulting status of action logged in this history step

Specified by:
setActionStatus in interface UpdatableHistoryStep
Parameters:
actionStatus - action status

getActionRecord

public DataRecord getActionRecord()
                           throws WorkflowException
Get the data associated to this step. Returns null if there is no form associated to the action

Specified by:
getActionRecord in interface HistoryStep
Throws:
WorkflowException

setActionRecord

public void setActionRecord(DataRecord data)
                     throws WorkflowException
Set the data associated to this step.

Specified by:
setActionRecord in interface HistoryStep
Throws:
WorkflowException

deleteActionRecord

public void deleteActionRecord()
                        throws WorkflowException
Delete the data associated to this step.

Specified by:
deleteActionRecord in interface HistoryStep
Throws:
WorkflowException

compareTo

public int compareTo(HistoryStep arg0)
Specified by:
compareTo in interface Comparable<HistoryStep>


Copyright © 2016 Silverpeas. All Rights Reserved.