com.silverpeas.workflow.engine.dataRecord
Class ProcessInstanceFieldTemplate

java.lang.Object
  extended by com.silverpeas.workflow.engine.dataRecord.ProcessInstanceFieldTemplate
All Implemented Interfaces:
FieldTemplate
Direct Known Subclasses:
ActionActorTemplate, ActionDateTemplate, ActionLabelTemplate, ItemTemplate, StateTemplate, TitleTemplate, UserInfoTemplate

public abstract class ProcessInstanceFieldTemplate
extends Object
implements FieldTemplate

A ProcessInstanceFieldTemplate describes a field of a process instance.


Constructor Summary
ProcessInstanceFieldTemplate(String fieldName, String typeName, String displayerName, String label)
           
 
Method Summary
 String getDisplayerName()
          Returns the name of the FieldDisplayer to display the described field.
 Field getEmptyField()
          Throws an illegal call exception, since an empty field can't be built from this template.
 Field getEmptyField(int occurrence)
           
abstract  Field getField(ProcessInstance instance)
          Returns a field built from this template and filled from the given process instance.
 String getFieldName()
          Returns the field name of the Field built on this template.
 String getLabel()
          Returns the default label of the described field.
 String getLabel(String language)
          Returns the local label of the described field.
 String[] getLanguages()
          Returns an empty array : this implementation use only a default local.
 int getMaximumNumberOfOccurrences()
           
 Map<String,String> getParameters(String language)
          Returns a Map (String -> String) of named parameters which can be used by the displayer (max-size, length ...).
 List<Parameter> getParametersObj()
           
 String getTemplateName()
           
 String getTypeName()
          Returns the type name of the described field.
 boolean isDisabled()
          Returns false.
 boolean isHidden()
          Returns false.
 boolean isMandatory()
          Returns false since a process instance field is read only.
 boolean isReadOnly()
          Returns true since a process instance field is read only.
 boolean isRepeatable()
           
 boolean isSearchable()
           
 boolean isUsedAsFacet()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessInstanceFieldTemplate

public ProcessInstanceFieldTemplate(String fieldName,
                                    String typeName,
                                    String displayerName,
                                    String label)
Method Detail

getFieldName

public String getFieldName()
Returns the field name of the Field built on this template.

Specified by:
getFieldName in interface FieldTemplate

getTypeName

public String getTypeName()
Returns the type name of the described field.

Specified by:
getTypeName in interface FieldTemplate

getDisplayerName

public String getDisplayerName()
Returns the name of the FieldDisplayer to display the described field.

Specified by:
getDisplayerName in interface FieldTemplate

getLabel

public String getLabel()
Returns the default label of the described field.

Specified by:
getLabel in interface FieldTemplate

getLabel

public String getLabel(String language)
Returns the local label of the described field.

Specified by:
getLabel in interface FieldTemplate

getLanguages

public String[] getLanguages()
Returns an empty array : this implementation use only a default local.

Specified by:
getLanguages in interface FieldTemplate

isMandatory

public boolean isMandatory()
Returns false since a process instance field is read only.

Specified by:
isMandatory in interface FieldTemplate

isReadOnly

public boolean isReadOnly()
Returns true since a process instance field is read only.

Specified by:
isReadOnly in interface FieldTemplate

isDisabled

public boolean isDisabled()
Returns false.

Specified by:
isDisabled in interface FieldTemplate

isHidden

public boolean isHidden()
Returns false.

Specified by:
isHidden in interface FieldTemplate

getParameters

public Map<String,String> getParameters(String language)
Returns a Map (String -> String) of named parameters which can be used by the displayer (max-size, length ...).

Specified by:
getParameters in interface FieldTemplate

getParametersObj

public List<Parameter> getParametersObj()
Specified by:
getParametersObj in interface FieldTemplate

getEmptyField

public Field getEmptyField()
                    throws FormException
Throws an illegal call exception, since an empty field can't be built from this template.

Specified by:
getEmptyField in interface FieldTemplate
Throws:
FormException
See Also:
getField

getEmptyField

public Field getEmptyField(int occurrence)
                    throws FormException
Specified by:
getEmptyField in interface FieldTemplate
Throws:
FormException

isSearchable

public boolean isSearchable()
Specified by:
isSearchable in interface FieldTemplate

getTemplateName

public String getTemplateName()
Specified by:
getTemplateName in interface FieldTemplate

isUsedAsFacet

public boolean isUsedAsFacet()
Specified by:
isUsedAsFacet in interface FieldTemplate

getMaximumNumberOfOccurrences

public int getMaximumNumberOfOccurrences()
Specified by:
getMaximumNumberOfOccurrences in interface FieldTemplate

isRepeatable

public boolean isRepeatable()
Specified by:
isRepeatable in interface FieldTemplate

getField

public abstract Field getField(ProcessInstance instance)
                        throws FormException
Returns a field built from this template and filled from the given process instance.

Throws:
FormException


Copyright © 2016 Silverpeas. All Rights Reserved.