com.silverpeas.workflow.engine.model
Class RoleImpl

java.lang.Object
  extended by com.silverpeas.workflow.engine.AbstractReferrableObject
      extended by com.silverpeas.workflow.engine.model.RoleImpl
All Implemented Interfaces:
AbstractDescriptor, Role, ReferrableObjectIntf, Serializable

public class RoleImpl
extends AbstractReferrableObject
implements AbstractDescriptor, Role, Serializable

Class implementing the representation of the <role> element of a Process Model.

See Also:
Serialized Form

Constructor Summary
RoleImpl()
          Constructor
RoleImpl(String name)
          Constructor
 
Method Summary
 void addDescription(ContextualDesignation description)
          Add a description Method needed primarily by Castor
 void addLabel(ContextualDesignation label)
          Add a label Method needed primarily by Castor
 ContextualDesignation createDesignation()
          Create an object implementing ContextualDesignation Method needed primarily by Castor
 String getDescription(String role, String language)
          Get description in specific language for the given role
 ContextualDesignations getDescriptions()
          Get all the descriptions
 int getId()
           
 String getKey()
          Get the unique key, used by equals method
 String getLabel(String role, String language)
          Get label in specific language for the given role
 ContextualDesignations getLabels()
          Get all the labels
 String getName()
          Get the name of the Role
 AbstractDescriptor getParent()
           
 boolean hasId()
           
 Iterator<ContextualDesignation> iterateDescription()
          Iterate through the descriptions
 Iterator<ContextualDesignation> iterateLabel()
          Iterate through the Labels
 void setId(int id)
          Implemented methods
 void setName(String name)
          Set the name of the Role
 void setParent(AbstractDescriptor parent)
           
 
Methods inherited from class com.silverpeas.workflow.engine.AbstractReferrableObject
equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoleImpl

public RoleImpl()
Constructor


RoleImpl

public RoleImpl(String name)
Constructor

Parameters:
name - role nama
Method Detail

getName

public String getName()
Get the name of the Role

Specified by:
getName in interface Role
Returns:
role's name

setName

public void setName(String name)
Description copied from interface: Role
Set the name of the Role

Specified by:
setName in interface Role

getLabels

public ContextualDesignations getLabels()
Description copied from interface: Role
Get all the labels

Specified by:
getLabels in interface Role
Returns:
an object containing the collection of the labels

getLabel

public String getLabel(String role,
                       String language)
Description copied from interface: Role
Get label in specific language for the given role

Specified by:
getLabel in interface Role
Parameters:
role - role for which the label is
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.

addLabel

public void addLabel(ContextualDesignation label)
Description copied from interface: Role
Add a label Method needed primarily by Castor

Specified by:
addLabel in interface Role

iterateLabel

public Iterator<ContextualDesignation> iterateLabel()
Description copied from interface: Role
Iterate through the Labels

Specified by:
iterateLabel in interface Role
Returns:
an iterator

getDescriptions

public ContextualDesignations getDescriptions()
Description copied from interface: Role
Get all the descriptions

Specified by:
getDescriptions in interface Role
Returns:
an object containing the collection of the descriptions

getDescription

public String getDescription(String role,
                             String language)
Description copied from interface: Role
Get description in specific language for the given role

Specified by:
getDescription in interface Role
Parameters:
role - role for which the description is
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.

addDescription

public void addDescription(ContextualDesignation description)
Description copied from interface: Role
Add a description Method needed primarily by Castor

Specified by:
addDescription in interface Role

iterateDescription

public Iterator<ContextualDesignation> iterateDescription()
Description copied from interface: Role
Iterate through the descriptions

Specified by:
iterateDescription in interface Role
Returns:
an iterator

createDesignation

public ContextualDesignation createDesignation()
Description copied from interface: Role
Create an object implementing ContextualDesignation Method needed primarily by Castor

Specified by:
createDesignation in interface Role

getKey

public String getKey()
Get the unique key, used by equals method

Specified by:
getKey in interface ReferrableObjectIntf
Specified by:
getKey in class AbstractReferrableObject
Returns:
unique key
See Also:
equals, hashCode

setId

public void setId(int id)
Implemented methods

Specified by:
setId in interface AbstractDescriptor

getId

public int getId()
Specified by:
getId in interface AbstractDescriptor

setParent

public void setParent(AbstractDescriptor parent)
Specified by:
setParent in interface AbstractDescriptor

getParent

public AbstractDescriptor getParent()
Specified by:
getParent in interface AbstractDescriptor

hasId

public boolean hasId()
Specified by:
hasId in interface AbstractDescriptor


Copyright © 2016 Silverpeas. All Rights Reserved.