Class SpecificLabelListHelper
- java.lang.Object
-
- org.silverpeas.core.workflow.engine.model.SpecificLabelListHelper
-
- All Implemented Interfaces:
Serializable
,ContextualDesignations
public class SpecificLabelListHelper extends Object implements ContextualDesignations, Serializable
Class managing a collection of ContextualDesigantion objects.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SpecificLabelListHelper()
ConstructorSpecificLabelListHelper(List<ContextualDesignation> labels)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addContextualDesignation(ContextualDesignation contextualDesignation)
Add a contextualDesignation to the collectionContextualDesignation
createContextualDesignation()
Create a ContextualDesignationString
getLabel(String role, String language)
Get the designation for the given role and language; make the best match if the required language and/ or role are not supported fall-back to the default values to the default values.ContextualDesignation
getSpecificLabel(String role, String language)
Get the designation for the given role and language; make an exact match, do not fall-back to the default values.Iterator<ContextualDesignation>
iterateContextualDesignation()
Iterate through the ContextualDesignation objectsvoid
removeContextualDesignation(ContextualDesignation contextualDesignation)
Remove a matching contextualDesignation from the collection.
-
-
-
Constructor Detail
-
SpecificLabelListHelper
public SpecificLabelListHelper()
Constructor
-
SpecificLabelListHelper
public SpecificLabelListHelper(List<ContextualDesignation> labels)
Constructor
-
-
Method Detail
-
getLabel
public String getLabel(String role, String language)
Description copied from interface:ContextualDesignations
Get the designation for the given role and language; make the best match if the required language and/ or role are not supported fall-back to the default values to the default values.- Specified by:
getLabel
in interfaceContextualDesignations
- Parameters:
role
- the name of the rolelanguage
- the code of the language- Returns:
- the label or an empty string if nothing found.
-
getSpecificLabel
public ContextualDesignation getSpecificLabel(String role, String language)
Description copied from interface:ContextualDesignations
Get the designation for the given role and language; make an exact match, do not fall-back to the default values.- Specified by:
getSpecificLabel
in interfaceContextualDesignations
- Parameters:
role
- the name of the rolelanguage
- the code of the language- Returns:
- an object implementing ContextualDesignation or
null
-
addContextualDesignation
public void addContextualDesignation(ContextualDesignation contextualDesignation)
Description copied from interface:ContextualDesignations
Add a contextualDesignation to the collection- Specified by:
addContextualDesignation
in interfaceContextualDesignations
- Parameters:
contextualDesignation
- to be added
-
createContextualDesignation
public ContextualDesignation createContextualDesignation()
Description copied from interface:ContextualDesignations
Create a ContextualDesignation- Specified by:
createContextualDesignation
in interfaceContextualDesignations
- Returns:
- an object implementing ContextualDesignation
-
iterateContextualDesignation
public Iterator<ContextualDesignation> iterateContextualDesignation()
Description copied from interface:ContextualDesignations
Iterate through the ContextualDesignation objects- Specified by:
iterateContextualDesignation
in interfaceContextualDesignations
- Returns:
- an iterator
-
removeContextualDesignation
public void removeContextualDesignation(ContextualDesignation contextualDesignation) throws WorkflowException
Description copied from interface:ContextualDesignations
Remove a matching contextualDesignation from the collection. The collection shall be searched for a Designation with the same language and role.- Specified by:
removeContextualDesignation
in interfaceContextualDesignations
- Parameters:
contextualDesignation
- a model of the contextualDesignation to be removed.- Throws:
WorkflowException
- when a matching contextualDescription could not be found.
-
-