Class StateImpl
- java.lang.Object
-
- org.silverpeas.core.workflow.engine.model.StateImpl
-
- All Implemented Interfaces:
Serializable
,State
public class StateImpl extends Object implements State, Serializable
Class implementing the representation of the <state> element of a Process Model.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AllowedActions
createAllowedActions()
Create and return an object implementing AllowedActionsboolean
equals(Object o)
ContextualDesignations
getActivities()
Get all the activitiesString
getActivity(String role, String language)
Action[]
getAllowedActions()
Get actions available in this stateAllowedActions
getAllowedActionsEx()
Get all the allowed actionsString
getDescription(String role, String language)
Get description in specific language for the given roleContextualDesignations
getDescriptions()
Get all the descriptionsAction[]
getFilteredActions()
QualifiedUsers
getInterestedUsers()
Get all the users interested by this stateQualifiedUsers
getInterestedUsersEx()
Get all the users interested by this stateString
getLabel(String role, String language)
Get label in specific language for the given roleContextualDesignations
getLabels()
Get all the labelsString
getName()
Get the name of this stateAction
getTimeoutAction()
Get the timeout action of this state Action that will played if timeout is triggeredTimeOutAction[]
getTimeOutActions()
Get timeout actions for this stateint
getTimeoutInterval()
Get the timeout interval of this stateboolean
getTimeoutNotifyAdmin()
Get flag for admin notification if true, the timeout manager will send a notification to all supervisorsQualifiedUsers
getWorkingUsers()
Get all the users who can act in this stateQualifiedUsers
getWorkingUsersEx()
Get all the users who can act in this stateint
hashCode()
void
setAllowedActions(AllowedActions allowedActions)
Set the allowed actionsvoid
setFilteredActions(AllowedActions allowedActions)
void
setInterestedUsers(QualifiedUsers interestedUsers)
Set all the users interested by this statevoid
setName(String name)
Set the name of this statevoid
setTimeoutAction(Action timeoutAction)
Set the timeout action of this state Action that will played if timeout is trigerredvoid
setTimeoutInterval(int hours)
Set the timeout interval of this statevoid
setTimeoutNotifyAdmin(boolean timeoutAction)
Set flag for admin notification if true, the timeout manager will send a notification to all supervisorsvoid
setWorkingUsers(QualifiedUsers workingUsers)
Set all the users who can act in this state
-
-
-
Constructor Detail
-
StateImpl
public StateImpl()
Constructor
-
StateImpl
public StateImpl(String name)
Constructor- Parameters:
name
- state name
-
-
Method Detail
-
getLabels
public ContextualDesignations getLabels()
Description copied from interface:State
Get all the labels
-
getLabel
public String getLabel(String role, String language)
Description copied from interface:State
Get label in specific language for the given role- Specified by:
getLabel
in interfaceState
- Parameters:
role
- role for which the label islanguage
- label's language- Returns:
- wanted label as a String object. If label is not found, search label with given role and default language, if not found again, return the default label in given language, if not found again, return the default label in default language, if not found again, return empty string.
-
getActivities
public ContextualDesignations getActivities()
Description copied from interface:State
Get all the activities- Specified by:
getActivities
in interfaceState
- Returns:
- an object containing the collection of the activities
-
getDescriptions
public ContextualDesignations getDescriptions()
Description copied from interface:State
Get all the descriptions- Specified by:
getDescriptions
in interfaceState
- Returns:
- an object containing the collection of the descriptions
-
getDescription
public String getDescription(String role, String language)
Description copied from interface:State
Get description in specific language for the given role- Specified by:
getDescription
in interfaceState
- Parameters:
role
- role for which the description islanguage
- description's language- Returns:
- wanted description as a String object. If description is not found, search description with given role and default language, if not found again, return the default description in given language, if not found again, return the default description in default language, if not found again, return empty string.
-
getAllowedActions
public Action[] getAllowedActions()
Get actions available in this state- Specified by:
getAllowedActions
in interfaceState
- Returns:
- allowedActions allowed actions
-
getTimeOutActions
public TimeOutAction[] getTimeOutActions()
Get timeout actions for this state- Specified by:
getTimeOutActions
in interfaceState
- Returns:
- timeout actions
-
getAllowedActionsEx
public AllowedActions getAllowedActionsEx()
Description copied from interface:State
Get all the allowed actions- Specified by:
getAllowedActionsEx
in interfaceState
- Returns:
- an object containing the collection of the allowed actions
-
createAllowedActions
public AllowedActions createAllowedActions()
Description copied from interface:State
Create and return an object implementing AllowedActions- Specified by:
createAllowedActions
in interfaceState
-
getFilteredActions
public Action[] getFilteredActions()
- Specified by:
getFilteredActions
in interfaceState
-
setFilteredActions
public void setFilteredActions(AllowedActions allowedActions)
- Specified by:
setFilteredActions
in interfaceState
-
getInterestedUsers
public QualifiedUsers getInterestedUsers()
Description copied from interface:State
Get all the users interested by this state- Specified by:
getInterestedUsers
in interfaceState
- Returns:
- QualifiedUsers object containing interested users, or an empty QualifiedUsers object
but never
null
-
getInterestedUsersEx
public QualifiedUsers getInterestedUsersEx()
Description copied from interface:State
Get all the users interested by this state- Specified by:
getInterestedUsersEx
in interfaceState
- Returns:
- QualifiedUsers object containing interested users, or
null
if none are defined
-
getName
public String getName()
Get the name of this state
-
getWorkingUsers
public QualifiedUsers getWorkingUsers()
Description copied from interface:State
Get all the users who can act in this state- Specified by:
getWorkingUsers
in interfaceState
- Returns:
- QualifiedUsers object containing theses users, or an empty QualifiedUsers object but
never
null
-
getWorkingUsersEx
public QualifiedUsers getWorkingUsersEx()
Description copied from interface:State
Get all the users who can act in this state- Specified by:
getWorkingUsersEx
in interfaceState
- Returns:
- QualifiedUsers object containing theses users, or
null
if none are defined
-
setAllowedActions
public void setAllowedActions(AllowedActions allowedActions)
Description copied from interface:State
Set the allowed actions- Specified by:
setAllowedActions
in interfaceState
-
setInterestedUsers
public void setInterestedUsers(QualifiedUsers interestedUsers)
Set all the users interested by this state- Specified by:
setInterestedUsers
in interfaceState
- Parameters:
interestedUsers
- object containing interested users
-
setName
public void setName(String name)
Description copied from interface:State
Set the name of this state
-
setWorkingUsers
public void setWorkingUsers(QualifiedUsers workingUsers)
Set all the users who can act in this state- Specified by:
setWorkingUsers
in interfaceState
- Parameters:
workingUsers
- object containing these users
-
getTimeoutInterval
public int getTimeoutInterval()
Description copied from interface:State
Get the timeout interval of this state- Specified by:
getTimeoutInterval
in interfaceState
- Returns:
- timeoutInterval interval in hours (as a int)
-
setTimeoutInterval
public void setTimeoutInterval(int hours)
Description copied from interface:State
Set the timeout interval of this state- Specified by:
setTimeoutInterval
in interfaceState
- Parameters:
hours
- interval in hours (as a int)
-
getTimeoutAction
public Action getTimeoutAction()
Get the timeout action of this state Action that will played if timeout is triggered- Specified by:
getTimeoutAction
in interfaceState
- Returns:
- timeout action
-
setTimeoutAction
public void setTimeoutAction(Action timeoutAction)
Description copied from interface:State
Set the timeout action of this state Action that will played if timeout is trigerred- Specified by:
setTimeoutAction
in interfaceState
- Parameters:
timeoutAction
- timeout action
-
getTimeoutNotifyAdmin
public boolean getTimeoutNotifyAdmin()
Get flag for admin notification if true, the timeout manager will send a notification to all supervisors- Specified by:
getTimeoutNotifyAdmin
in interfaceState
- Returns:
- admin notification flag
-
setTimeoutNotifyAdmin
public void setTimeoutNotifyAdmin(boolean timeoutAction)
Description copied from interface:State
Set flag for admin notification if true, the timeout manager will send a notification to all supervisors- Specified by:
setTimeoutNotifyAdmin
in interfaceState
- Parameters:
timeoutAction
- notification flag
-
-