com.silverpeas.workflow.api.model
Interface Form

All Known Implementing Classes:
FormImpl

public interface Form

Interface describing a representation of the <Form> element of a Process Model.


Method Summary
 void addInput(Input input)
          Add an input Method needed primarily by Castor
 void addTitle(ContextualDesignation description)
          Add a title Method needed primarily by Castor
 ContextualDesignation createDesignation()
          Create an object implementing ContextualDesignation Method needed primarily by Castor
 Input createInput()
          Create and return and object implementing Input
 DataRecord getDefaultRecord(String role, String lang, DataRecord data)
          Converts this object in a DataRecord object
 String getHTMLFileName()
          Get the name of HTML file to show this form if no HTML file is defined, XMLForm will be used to display the form
 Input getInput(Input reference)
          Get the input specified by item and / or value
 Input getInput(int idx)
          Get the input specified by the index
 Input[] getInputs()
          Get the inputs
 String getName()
          Get the name of this form
 String getRole()
          Get the role
 String getTitle(String role, String language)
          Get title in specific language for the given role
 ContextualDesignations getTitles()
          Get all the titles
 Iterator<Input> iterateInput()
          Iterate through the inputs
 Iterator<ContextualDesignation> iterateTitle()
          Iterate through the titles
 void removeInput(int idx)
          Remove the input specified by the index
 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
 void setName(String name)
          Set the name of this form
 void setRole(String role)
          Set the role name
 RecordTemplate toRecordTemplate(String roleName, String language)
          Converts this object in a RecordTemplate object
 RecordTemplate toRecordTemplate(String roleName, String language, boolean readOnly)
          Converts this object in a RecordTemplate object
 

Method Detail

getName

String getName()
Get the name of this form

Returns:
form's name

setName

void setName(String name)
Set the name of this form

Parameters:
name - form's name

getRole

String getRole()
Get the role

Returns:
the role name

setRole

void setRole(String role)
Set the role name

Parameters:
role - name to set

getHTMLFileName

String getHTMLFileName()
Get the name of HTML file to show this form if no HTML file is defined, XMLForm will be used to display the form

Returns:
form's name

setHTMLFileName

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


getInputs

Input[] getInputs()
Get the inputs

Returns:
the inputs as a Vector

getInput

Input getInput(int idx)
Get the input specified by the index

Parameters:
idx - the index
Returns:
the items as a Vector

getInput

Input getInput(Input reference)
Get the input specified by item and / or value

Parameters:
reference - the reference object
Returns:
the items as a Vector

createInput

Input createInput()
Create and return and object implementing Input


iterateInput

Iterator<Input> iterateInput()
Iterate through the inputs

Returns:
an iterator

addInput

void addInput(Input input)
Add an input Method needed primarily by Castor


removeInput

void removeInput(int idx)
                 throws WorkflowException
Remove the input specified by the index

Parameters:
idx - the index
Throws:
WorkflowException

getTitles

ContextualDesignations getTitles()
Get all the titles

Returns:
an object containing the collection of the tables

getTitle

String getTitle(String role,
                String language)
Get title in specific language for the given role

Parameters:
lang - title's language
role - role for which the title is
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.

iterateTitle

Iterator<ContextualDesignation> iterateTitle()
Iterate through the titles

Returns:
an iterator

addTitle

void addTitle(ContextualDesignation description)
Add a title Method needed primarily by Castor


createDesignation

ContextualDesignation createDesignation()
Create an object implementing ContextualDesignation Method needed primarily by Castor


getDefaultRecord

DataRecord getDefaultRecord(String role,
                            String lang,
                            DataRecord data)
                            throws FormException,
                                   WorkflowException
Converts this object in a DataRecord object

Returns:
the resulting DataRecord object with the default values set
Throws:
FormException
WorkflowException

toRecordTemplate

RecordTemplate toRecordTemplate(String roleName,
                                String language)
                                throws WorkflowException
Converts this object in a RecordTemplate object

Returns:
the resulting RecordTemplate
Throws:
WorkflowException

toRecordTemplate

RecordTemplate toRecordTemplate(String roleName,
                                String language,
                                boolean readOnly)
                                throws WorkflowException
Converts this object in a RecordTemplate object

Returns:
the resulting RecordTemplate
Throws:
WorkflowException


Copyright © 2016 Silverpeas. All Rights Reserved.