Class QuestionTemplate
- java.lang.Object
-
- org.silverpeas.processmanager.record.QuestionTemplate
-
- All Implemented Interfaces:
Serializable,org.silverpeas.core.contribution.content.form.RecordTemplate
public class QuestionTemplate extends Object implements org.silverpeas.core.contribution.content.form.RecordTemplate
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description QuestionTemplate(String language, boolean readonly)A QuestionTemplate is built from a language.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckDataRecord(org.silverpeas.core.contribution.content.form.DataRecord record)Returns true if the data record is built on this template and all the constraints are ok.org.silverpeas.core.contribution.content.form.DataRecordgetEmptyRecord()Returns an empty DataRecord built on this template.intgetFieldIndex(String fieldName)Returns the field index of the named field.String[]getFieldNames()Returns all the field names of the UserRecord built on this template.org.silverpeas.core.contribution.content.form.FieldTemplategetFieldTemplate(String fieldName)Returns the FieldTemplate of the named field.org.silverpeas.core.contribution.content.form.FieldTemplate[]getFieldTemplates()Returns all the field templates.
-
-
-
Constructor Detail
-
QuestionTemplate
public QuestionTemplate(String language, boolean readonly)
A QuestionTemplate is built from a language.- Parameters:
language- the languagereadonly- is read only
-
-
Method Detail
-
getFieldNames
public String[] getFieldNames()
Returns all the field names of the UserRecord built on this template.- Specified by:
getFieldNamesin interfaceorg.silverpeas.core.contribution.content.form.RecordTemplate
-
getFieldTemplates
public org.silverpeas.core.contribution.content.form.FieldTemplate[] getFieldTemplates()
Returns all the field templates.- Specified by:
getFieldTemplatesin interfaceorg.silverpeas.core.contribution.content.form.RecordTemplate
-
getFieldTemplate
public org.silverpeas.core.contribution.content.form.FieldTemplate getFieldTemplate(String fieldName) throws org.silverpeas.core.contribution.content.form.FormException
Returns the FieldTemplate of the named field.- Specified by:
getFieldTemplatein interfaceorg.silverpeas.core.contribution.content.form.RecordTemplate- Throws:
org.silverpeas.core.contribution.content.form.FormException- if the field name is unknown.
-
getFieldIndex
public int getFieldIndex(String fieldName) throws org.silverpeas.core.contribution.content.form.FormException
Returns the field index of the named field.- Specified by:
getFieldIndexin interfaceorg.silverpeas.core.contribution.content.form.RecordTemplate- Throws:
org.silverpeas.core.contribution.content.form.FormException- if the field name is unknown.
-
getEmptyRecord
public org.silverpeas.core.contribution.content.form.DataRecord getEmptyRecord() throws org.silverpeas.core.contribution.content.form.FormExceptionReturns an empty DataRecord built on this template.- Specified by:
getEmptyRecordin interfaceorg.silverpeas.core.contribution.content.form.RecordTemplate- Throws:
org.silverpeas.core.contribution.content.form.FormException
-
checkDataRecord
public boolean checkDataRecord(org.silverpeas.core.contribution.content.form.DataRecord record)
Returns true if the data record is built on this template and all the constraints are ok.- Specified by:
checkDataRecordin interfaceorg.silverpeas.core.contribution.content.form.RecordTemplate
-
-