com.silverpeas.workflow.api.model
Interface ContextualDesignations

All Known Implementing Classes:
SpecificLabelListHelper

public interface ContextualDesignations

Interface describing an object holding a collection of ContextualDesignation objects. Does not correspond to any Process Model schema elements.


Method Summary
 void addContextualDesignation(ContextualDesignation contextualDesignation)
          Add a contextualDesignation to the collection
 ContextualDesignation createContextualDesignation()
          Create a ContextualDesignation
 String 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 objects
 void removeContextualDesignation(ContextualDesignation contextualDesignation)
          Remove a matching contextualDesignation from the collection.
 

Method Detail

iterateContextualDesignation

Iterator<ContextualDesignation> iterateContextualDesignation()
Iterate through the ContextualDesignation objects

Returns:
an iterator

createContextualDesignation

ContextualDesignation createContextualDesignation()
Create a ContextualDesignation

Returns:
an object implementing ContextualDesignation

addContextualDesignation

void addContextualDesignation(ContextualDesignation contextualDesignation)
Add a contextualDesignation to the collection

Parameters:
contextualDesignation - to be added

removeContextualDesignation

void removeContextualDesignation(ContextualDesignation contextualDesignation)
                                 throws WorkflowException
Remove a matching contextualDesignation from the collection. The collection shall be searched for a Designation with the same language and role.

Parameters:
contextualDesignation - a model of the contextualDesignation to be removed.
Throws:
WorkflowException - when a matching contextualDescription could not be found.

getSpecificLabel

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.

Parameters:
role - the name of the role
language - the code of the language
Returns:
an object implementing ContextualDesignation or null

getLabel

String 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.

Parameters:
role - the name of the role
language - the code of the language
Returns:
the label or an empty string if nothing found.


Copyright © 2016 Silverpeas. All Rights Reserved.