Class ItemImpl
- java.lang.Object
-
- org.silverpeas.core.workflow.engine.model.ItemImpl
-
- All Implemented Interfaces:
Serializable
,Item
public class ItemImpl extends Object implements Item, Serializable
Class implementing the representation of the <item> element of a Process Model.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ItemImpl()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addParameter(Parameter parameter)
Add a Parameter to the collectionParameter
createParameter()
Create an object implementing Parameterboolean
equals(Object o)
String
getDescription(String role, String language)
Get description in specific language for the given roleContextualDesignations
getDescriptions()
Get all the descriptionsString
getFormula()
Get formula to use if item must be computedMap<String,String>
getKeyValuePairs()
Gets the parameters as a dictionary of keys to values.String
getLabel(String role, String language)
Get label in specific language for the given roleContextualDesignations
getLabels()
Get all the labelsString
getMapTo()
Get the full user field name, to which this item is mapString
getName()
Get the name of this itemParameter
getParameter(String strName)
Get the parameter specified by nameString
getType()
Get the type of this itemint
hashCode()
boolean
isComputed()
Get value of computed attributeboolean
isReadonly()
Get value of readOnly attributeIterator<Parameter>
iterateParameter()
Return an Iterator over the parameters collectionvoid
removeParameter(String strName)
Remove the parameter specified by its namevoid
setComputed(boolean computed)
Set value of computed attributevoid
setFormula(String formula)
Set formula to use if item must be computedvoid
setMapTo(String mapTo)
Set the full user field name, to which this item is mapvoid
setName(String name)
Set the name of this itemvoid
setReadonly(boolean readonly)
Set value of readOnly attributevoid
setType(String type)
Set the type of this item
-
-
-
Method Detail
-
isComputed
public boolean isComputed()
Get value of computed attribute- Specified by:
isComputed
in interfaceItem
- Returns:
- true if item must be computed
-
getFormula
public String getFormula()
Get formula to use if item must be computed- Specified by:
getFormula
in interfaceItem
- Returns:
- formula of type 'action.Validation.actor'
-
getMapTo
public String getMapTo()
Get the full user field name, to which this item is map
-
getName
public String getName()
Get the name of this item
-
isReadonly
public boolean isReadonly()
Get value of readOnly attribute- Specified by:
isReadonly
in interfaceItem
- Returns:
- true if item must be readonly
-
getType
public String getType()
Get the type of this item
-
setComputed
public void setComputed(boolean computed)
Description copied from interface:Item
Set value of computed attribute- Specified by:
setComputed
in interfaceItem
- Parameters:
computed
- true if item must be computed
-
setFormula
public void setFormula(String formula)
Description copied from interface:Item
Set formula to use if item must be computed- Specified by:
setFormula
in interfaceItem
- Parameters:
formula
- formula of type 'action.Validation.actor'
-
setMapTo
public void setMapTo(String mapTo)
Description copied from interface:Item
Set the full user field name, to which this item is map
-
setName
public void setName(String name)
Description copied from interface:Item
Set the name of this item
-
setReadonly
public void setReadonly(boolean readonly)
Description copied from interface:Item
Set value of readOnly attribute- Specified by:
setReadonly
in interfaceItem
- Parameters:
readonly
- true if item must be readonly
-
setType
public void setType(String type)
Description copied from interface:Item
Set the type of this item
-
getDescription
public String getDescription(String role, String language)
Get description in specific language for the given role- Specified by:
getDescription
in interfaceItem
- 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.
-
getDescriptions
public ContextualDesignations getDescriptions()
Description copied from interface:Item
Get all the descriptions- Specified by:
getDescriptions
in interfaceItem
- Returns:
- an object containing the collection of the descriptions
-
getLabel
public String getLabel(String role, String language)
Get label in specific language for the given role- Specified by:
getLabel
in interfaceItem
- 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.
-
getLabels
public ContextualDesignations getLabels()
Description copied from interface:Item
Get all the labels
-
getParameter
public Parameter getParameter(String strName)
Description copied from interface:Item
Get the parameter specified by name- Specified by:
getParameter
in interfaceItem
- Parameters:
strName
- the parameter name- Returns:
- the parameters
-
createParameter
public Parameter createParameter()
Description copied from interface:Item
Create an object implementing Parameter- Specified by:
createParameter
in interfaceItem
- Returns:
- a new parameter.
-
addParameter
public void addParameter(Parameter parameter)
Description copied from interface:Item
Add a Parameter to the collection- Specified by:
addParameter
in interfaceItem
- Parameters:
parameter
- the parameter to add in this item.
-
iterateParameter
public Iterator<Parameter> iterateParameter()
Description copied from interface:Item
Return an Iterator over the parameters collection- Specified by:
iterateParameter
in interfaceItem
- Returns:
- an iterator over the parameters of this item.
-
removeParameter
public void removeParameter(String strName) throws WorkflowException
Description copied from interface:Item
Remove the parameter specified by its name- Specified by:
removeParameter
in interfaceItem
- Parameters:
strName
- the name of the parameter- Throws:
WorkflowException
- when the parameter cannot be found
-
getKeyValuePairs
public Map<String,String> getKeyValuePairs()
Description copied from interface:Item
Gets the parameters as a dictionary of keys to values.- Specified by:
getKeyValuePairs
in interfaceItem
- Returns:
- a
Map
with all the parameters with as key the parameter name and value the parameter value.
-
-