com.silverpeas.workflow.engine.model
Class ItemRef

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

public class ItemRef
extends AbstractReferrableObject
implements Input, AbstractDescriptor, Serializable

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

See Also:
Serialized Form

Constructor Summary
ItemRef()
          Constructor
 
Method Summary
 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 getDisplayerName()
          Get name of displayer used to show the item
 int getId()
           
 Item getItem()
          Get the referred item
 String getKey()
          This method has to be implemented by the referrable object it has to compute the unique key
 String getLabel(String role, String language)
          Get label in specific language for the given role
 ContextualDesignations getLabels()
          Get all the labels
 AbstractDescriptor getParent()
           
 String getValue()
          Get default value
 boolean hasId()
           
 boolean isMandatory()
          Get value of mandatory attribute
 boolean isReadonly()
          Get value of readOnly attribute
 Iterator<ContextualDesignation> iterateLabel()
          Iterate through the Labels
 void setDisplayerName(String displayerName)
          Set name of displayer used to show the item
 void setId(int id)
          Implemented methods
 void setItem(Item item)
          Set the referred item
 void setMandatory(boolean mandatory)
          Set value of mandatory attribute
 void setParent(AbstractDescriptor parent)
           
 void setReadonly(boolean readonly)
          Set the readonly attribute
 void setValue(String value)
          Set default value
 
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

ItemRef

public ItemRef()
Constructor

Method Detail

getItem

public Item getItem()
Get the referred item

Specified by:
getItem in interface Column
Returns:
the item

isReadonly

public boolean isReadonly()
Get value of readOnly attribute

Specified by:
isReadonly in interface Input
Returns:
true if item must be readonly

isMandatory

public boolean isMandatory()
Get value of mandatory attribute

Specified by:
isMandatory in interface Input
Returns:
true if item must be filled

getDisplayerName

public String getDisplayerName()
Get name of displayer used to show the item

Specified by:
getDisplayerName in interface Input
Returns:
displayer name

getValue

public String getValue()
Get default value

Specified by:
getValue in interface Input
Returns:
default value

setItem

public void setItem(Item item)
Set the referred item

Specified by:
setItem in interface Column
Parameters:
item - Item to refer

setReadonly

public void setReadonly(boolean readonly)
Set the readonly attribute

Specified by:
setReadonly in interface Input

setMandatory

public void setMandatory(boolean mandatory)
Set value of mandatory attribute

Specified by:
setMandatory in interface Input
Parameters:
mandatory - true if item must be filled

setDisplayerName

public void setDisplayerName(String displayerName)
Set name of displayer used to show the item

Specified by:
setDisplayerName in interface Input
Parameters:
displayerName - displayer name

setValue

public void setValue(String value)
Set default value

Specified by:
setValue in interface Input
Parameters:
value - default value

getLabels

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

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

getLabel

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

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

Specified by:
addLabel in interface Input

iterateLabel

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

Specified by:
iterateLabel in interface Input
Returns:
an iterator

createDesignation

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

Specified by:
createDesignation in interface Input

getKey

public String getKey()
Description copied from class: AbstractReferrableObject
This method has to be implemented by the referrable object it has to compute the unique key

Specified by:
getKey in interface ReferrableObjectIntf
Specified by:
getKey in class AbstractReferrableObject
Returns:
The 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.