com.silverpeas.workflow.engine.model
Class ParticipantImpl

java.lang.Object
  extended by com.silverpeas.workflow.engine.AbstractReferrableObject
      extended by com.silverpeas.workflow.engine.model.ParticipantImpl
All Implemented Interfaces:
Participant, ReferrableObjectIntf, Serializable

public class ParticipantImpl
extends AbstractReferrableObject
implements Participant, Serializable

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

See Also:
Serialized Form

Constructor Summary
ParticipantImpl()
          Constructor
ParticipantImpl(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
 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 this participant
 String getResolvedState()
          Get the state that defined participant has resolved
 Iterator<ContextualDesignation> iterateDescription()
          Iterate through the descriptions
 Iterator<ContextualDesignation> iterateLabel()
          Iterate through the Labels
 void setName(String name)
          Set the name of this participant
 void setResolvedState(String resolvedState)
          Set state that defined participant has resolved resolvedState state that defined participant has resolved
 
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

ParticipantImpl

public ParticipantImpl()
Constructor


ParticipantImpl

public ParticipantImpl(String name)
Constructor

Parameters:
name - participant name
Method Detail

getDescription

public String getDescription(String role,
                             String language)
Get description in specific language for the given role

Specified by:
getDescription in interface Participant
Parameters:
lang - description's language
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.

getDescriptions

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

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

addDescription

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

Specified by:
addDescription in interface Participant

iterateDescription

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

Specified by:
iterateDescription in interface Participant
Returns:
an iterator

createDesignation

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

Specified by:
createDesignation in interface Participant

getLabel

public String getLabel(String role,
                       String language)
Get label in specific language for the given role

Specified by:
getLabel in interface Participant
Parameters:
lang - label's language
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.

getLabels

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

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

addLabel

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

Specified by:
addLabel in interface Participant

iterateLabel

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

Specified by:
iterateLabel in interface Participant
Returns:
an iterator

getName

public String getName()
Get the name of this participant

Specified by:
getName in interface Participant
Returns:
participant's name

getResolvedState

public String getResolvedState()
Get the state that defined participant has resolved

Specified by:
getResolvedState in interface Participant
Returns:
state that defined participant has resolved

setName

public void setName(String name)
Description copied from interface: Participant
Set the name of this participant

Specified by:
setName in interface Participant

setResolvedState

public void setResolvedState(String resolvedState)
Description copied from interface: Participant
Set state that defined participant has resolved resolvedState state that defined participant has resolved

Specified by:
setResolvedState in interface Participant

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


Copyright © 2016 Silverpeas. All Rights Reserved.