Class ConsequenceImpl
- java.lang.Object
-
- org.silverpeas.core.workflow.engine.model.ConsequenceImpl
-
- All Implemented Interfaces:
Serializable
,Consequence
public class ConsequenceImpl extends Object implements Consequence, Serializable
Class implementing the representation of the <consequence> element of a Process Model.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConsequenceImpl()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNotifiedUsers(QualifiedUsers notifyUsers)
Add a new notifiedUser to the collectionvoid
addTargetState(StateSetter stateSetter)
Add a new Target State to the collectionvoid
addUnsetState(StateSetter stateSetter)
Add a new Unset State to the collectionString
getItem()
Get the item on which the comparison will be processedboolean
getKill()
Get the flag that specifies if instance has to be removedList<QualifiedUsers>
getNotifiedUsers()
Get all the users that have to be notifiedString
getOperator()
Get the operator used to compare item and valueState
getTargetState(String strStateName)
Get the target state with the given state nameState[]
getTargetStates()
Get the target statesTriggers
getTriggers()
State
getUnsetState(String strStateName)
Get the state to un-set with the given state nameState[]
getUnsetStates()
Get the states to unsetString
getValue()
Get the value to compare with itemboolean
isVerified(String itemValue)
Check if the consequence is verified or notvoid
setItem(String string)
Set the item on which the comparison will be processedvoid
setKill(boolean kill)
Set the flag that specifies if instance has to be removedvoid
setNotifiedUsers(List<QualifiedUsers> notifiedUsersList)
Set all the users that have to be notifiedvoid
setOperator(String string)
Set the operator used to compare item and valuevoid
setTriggers(Triggers triggers)
void
setValue(String string)
Set the value to compare with item
-
-
-
Method Detail
-
getTargetState
public State getTargetState(String strStateName)
Description copied from interface:Consequence
Get the target state with the given state name- Specified by:
getTargetState
in interfaceConsequence
- Parameters:
strStateName
- the name of the state- Returns:
- the target state or
null
if not found
-
getTargetStates
public State[] getTargetStates()
Get the target states- Specified by:
getTargetStates
in interfaceConsequence
- Returns:
- the target states as a Vector
-
addTargetState
public void addTargetState(StateSetter stateSetter)
Description copied from interface:Consequence
Add a new Target State to the collection- Specified by:
addTargetState
in interfaceConsequence
- Parameters:
stateSetter
- object to be added
-
getUnsetState
public State getUnsetState(String strStateName)
Description copied from interface:Consequence
Get the state to un-set with the given state name- Specified by:
getUnsetState
in interfaceConsequence
- Parameters:
strStateName
- the name of the state- Returns:
- the state to un-set or
null
if not found
-
getUnsetStates
public State[] getUnsetStates()
Get the states to unset- Specified by:
getUnsetStates
in interfaceConsequence
- Returns:
- the states to unset as a Vector
-
addUnsetState
public void addUnsetState(StateSetter stateSetter)
Description copied from interface:Consequence
Add a new Unset State to the collection- Specified by:
addUnsetState
in interfaceConsequence
- Parameters:
stateSetter
- object to be added
-
getKill
public boolean getKill()
Get the flag that specifies if instance has to be removed- Specified by:
getKill
in interfaceConsequence
- Returns:
- true if instance has to be removed
-
setKill
public void setKill(boolean kill)
Set the flag that specifies if instance has to be removed- Specified by:
setKill
in interfaceConsequence
- Parameters:
kill
- true if instance has to be removed
-
getNotifiedUsers
public List<QualifiedUsers> getNotifiedUsers()
Get all the users that have to be notified- Specified by:
getNotifiedUsers
in interfaceConsequence
- Returns:
- QualifiedUsers object containing notified users
-
setNotifiedUsers
public void setNotifiedUsers(List<QualifiedUsers> notifiedUsersList)
Set all the users that have to be notified- Specified by:
setNotifiedUsers
in interfaceConsequence
- Parameters:
notifiedUsersList
- object containing notified users
-
getItem
public String getItem()
Description copied from interface:Consequence
Get the item on which the comparison will be processed- Specified by:
getItem
in interfaceConsequence
- Returns:
- the item name
-
getOperator
public String getOperator()
Description copied from interface:Consequence
Get the operator used to compare item and value- Specified by:
getOperator
in interfaceConsequence
- Returns:
- an operator (ie : =, >, >=, <, <=, !=)
-
getValue
public String getValue()
Description copied from interface:Consequence
Get the value to compare with item- Specified by:
getValue
in interfaceConsequence
- Returns:
- the value
-
isVerified
public boolean isVerified(String itemValue)
Check if the consequence is verified or not- Specified by:
isVerified
in interfaceConsequence
- Parameters:
itemValue
- - the value of the folder item (specified in xml attribute 'item'- Returns:
- true if the consequence is verified
-
setItem
public void setItem(String string)
Description copied from interface:Consequence
Set the item on which the comparison will be processed- Specified by:
setItem
in interfaceConsequence
- Parameters:
string
- the item
-
setOperator
public void setOperator(String string)
Description copied from interface:Consequence
Set the operator used to compare item and value- Specified by:
setOperator
in interfaceConsequence
- Parameters:
string
- the operator (ie : =, >, >=, <, <=, !=)
-
setValue
public void setValue(String string)
Description copied from interface:Consequence
Set the value to compare with item- Specified by:
setValue
in interfaceConsequence
- Parameters:
string
- the value
-
getTriggers
public Triggers getTriggers()
- Specified by:
getTriggers
in interfaceConsequence
-
setTriggers
public void setTriggers(Triggers triggers)
-
addNotifiedUsers
public void addNotifiedUsers(QualifiedUsers notifyUsers)
Description copied from interface:Consequence
Add a new notifiedUser to the collection- Specified by:
addNotifiedUsers
in interfaceConsequence
- Parameters:
notifyUsers
- object to be added
-
-