com.silverpeas.workflow.engine.model
Class ActionImpl

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

public class ActionImpl
extends AbstractReferrableObject
implements Action, AbstractDescriptor, Serializable

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

See Also:
Serialized Form

Constructor Summary
ActionImpl()
          Constructor
ActionImpl(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
 Consequences createConsequences()
          Create and return and object implementing Consequences
 ContextualDesignation createDesignation()
          Create an object implementing ContextualDesignation Method needed primarily by Castor
 QualifiedUsers createQualifiedUsers()
          Create and return an object implementing QalifiedUsers
 QualifiedUsers getAllowedUsers()
          Get all the users allowed to execute this action
 Consequences getConsequences()
          Get all the consequences of this action
 String getDescription(String role, String language)
          Get description in specific language for the given role
 ContextualDesignations getDescriptions()
          Get all the descriptions
 Form getForm()
          Get the form associated with this action
 int getId()
           
 String getKey()
          Get the unique key, used by equals method
 String getKind()
          Get the kind of this action (update, create or delete)
 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 action
 AbstractDescriptor getParent()
           
 boolean hasId()
           
 Iterator<ContextualDesignation> iterateDescription()
          Iterate through the descriptions
 Iterator<ContextualDesignation> iterateLabel()
          Iterate through the Labels
 void setAllowedUsers(QualifiedUsers allowedUsers)
          Set the list of users allowed to execute this action
 void setConsequences(Consequences consequences)
          Set the consequences of this action
 void setForm(Form form)
          Set the form associated to this action
 void setId(int id)
          Implemented methods
 void setKind(String kind)
          Set the kind of this action
 void setName(String name)
          Set the name of this action
 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

ActionImpl

public ActionImpl()
Constructor


ActionImpl

public ActionImpl(String name)
Constructor

Parameters:
name - action name
Method Detail

createDesignation

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

Specified by:
createDesignation in interface Action

getLabels

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

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

getLabel

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

Specified by:
getLabel in interface Action
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: Action
Add a label Method needed primarily by Castor

Specified by:
addLabel in interface Action

iterateLabel

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

Specified by:
iterateLabel in interface Action
Returns:
an iterator

getAllowedUsers

public QualifiedUsers getAllowedUsers()
Get all the users allowed to execute this action

Specified by:
getAllowedUsers in interface Action
Returns:
object containing QualifiedUsers

getConsequences

public Consequences getConsequences()
Get all the consequences of this action

Specified by:
getConsequences in interface Action
Returns:
Consequences objects

getForm

public Form getForm()
Get the form associated with this action

Specified by:
getForm in interface Action
Returns:
form object

getName

public String getName()
Get the name of this action

Specified by:
getName in interface Action
Returns:
action's name

getKind

public String getKind()
Get the kind of this action (update, create or delete)

Specified by:
getKind in interface Action
Returns:
action's kind

getDescriptions

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

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

getDescription

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

Specified by:
getDescription in interface Action
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: Action
Add a description Method needed primarily by Castor

Specified by:
addDescription in interface Action

iterateDescription

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

Specified by:
iterateDescription in interface Action
Returns:
an iterator

createQualifiedUsers

public QualifiedUsers createQualifiedUsers()
Create and return an object implementing QalifiedUsers

Specified by:
createQualifiedUsers in interface Action

setAllowedUsers

public void setAllowedUsers(QualifiedUsers allowedUsers)
Set the list of users allowed to execute this action

Specified by:
setAllowedUsers in interface Action
Parameters:
allowedUsers - allowed users

createConsequences

public Consequences createConsequences()
Create and return and object implementing Consequences

Specified by:
createConsequences in interface Action

setConsequences

public void setConsequences(Consequences consequences)
Set the consequences of this action

Specified by:
setConsequences in interface Action
Parameters:
consequences -

setForm

public void setForm(Form form)
Set the form associated to this action

Specified by:
setForm in interface Action
Parameters:
form - associated form

setName

public void setName(String name)
Set the name of this action

Specified by:
setName in interface Action
Parameters:
name - action's name

setKind

public void setKind(String kind)
Set the kind of this action

Specified by:
setKind in interface Action
Parameters:
kind - action's kind

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.