Class FormImpl
- java.lang.Object
-
- org.silverpeas.core.workflow.engine.model.FormImpl
-
- All Implemented Interfaces:
Serializable
,Form
public class FormImpl extends Object implements Form, Serializable
Class implementing the representation of the <form> element of a Process Model.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FormImpl()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInput(Input input)
Add an inputInput
createInput()
Create and return and object implementing InputDataRecord
getDefaultRecord(String role, String lang, DataRecord data)
Converts this object in a DataRecord objectString
getHTMLFileName()
Get the name of HTML file to show this form if no HTML file is defined, XMLForm will be used to create the formInput
getInput(int idx)
Get the input specified by the indexInput
getInput(Input reference)
Get the input specified by item and / or valueInput[]
getInputs()
Get the inputsString
getName()
Get the name of this formString
getRole()
Get the roleString
getTitle(String role, String language)
Get title in specific language for the given roleContextualDesignations
getTitles()
Get all the titlesIterator<Input>
iterateInput()
Iterate through the inputsvoid
removeInput(int idx)
Remove the input specified by the indexvoid
setHTMLFileName(String htmlFileName)
Set the name of HTML file to show this form if no HTML file is defined, XMLForm will be used to display the formvoid
setName(String name)
Set the name of this formvoid
setRole(String role)
Set the role nameRecordTemplate
toRecordTemplate(String role, String lang)
Converts this object in a RecordTemplate objectRecordTemplate
toRecordTemplate(String role, String lang, boolean readOnly)
Converts this object in a RecordTemplate object
-
-
-
Method Detail
-
getName
public String getName()
Get the name of this form
-
getHTMLFileName
public String getHTMLFileName()
Get the name of HTML file to show this form if no HTML file is defined, XMLForm will be used to create the form- Specified by:
getHTMLFileName
in interfaceForm
- Returns:
- form's name
-
setHTMLFileName
public void setHTMLFileName(String htmlFileName)
Set the name of HTML file to show this form if no HTML file is defined, XMLForm will be used to display the form- Specified by:
setHTMLFileName
in interfaceForm
-
getInputs
public Input[] getInputs()
Get the inputs
-
getInput
public Input getInput(int idx)
Description copied from interface:Form
Get the input specified by the index
-
getInput
public Input getInput(Input reference)
Description copied from interface:Form
Get the input specified by item and / or value
-
iterateInput
public Iterator<Input> iterateInput()
Description copied from interface:Form
Iterate through the inputs- Specified by:
iterateInput
in interfaceForm
- Returns:
- an iterator
-
createInput
public Input createInput()
Description copied from interface:Form
Create and return and object implementing Input- Specified by:
createInput
in interfaceForm
-
removeInput
public void removeInput(int idx) throws WorkflowException
Description copied from interface:Form
Remove the input specified by the index- Specified by:
removeInput
in interfaceForm
- Parameters:
idx
- the index- Throws:
WorkflowException
-
getTitles
public ContextualDesignations getTitles()
Description copied from interface:Form
Get all the titles
-
getTitle
public String getTitle(String role, String language)
Description copied from interface:Form
Get title in specific language for the given role- Specified by:
getTitle
in interfaceForm
- Parameters:
role
- role for which the title islanguage
- title's language- Returns:
- wanted title as a String object. If title is not found, search title with given role and default language, if not found again, return the default title in given language, if not found again, return the default title in default language, if not found again, return empty string.
-
setName
public void setName(String name)
Set the name of this form
-
toRecordTemplate
public RecordTemplate toRecordTemplate(String role, String lang) throws WorkflowException
Converts this object in a RecordTemplate object- Specified by:
toRecordTemplate
in interfaceForm
- Returns:
- the resulting RecordTemplate
- Throws:
WorkflowException
-
getDefaultRecord
public DataRecord getDefaultRecord(String role, String lang, DataRecord data) throws WorkflowException
Converts this object in a DataRecord object- Specified by:
getDefaultRecord
in interfaceForm
- Returns:
- the resulting DataRecord object with the default values set
- Throws:
WorkflowException
-
toRecordTemplate
public RecordTemplate toRecordTemplate(String role, String lang, boolean readOnly) throws WorkflowException
Converts this object in a RecordTemplate object- Specified by:
toRecordTemplate
in interfaceForm
- Returns:
- the resulting RecordTemplate
- Throws:
WorkflowException
-
-