com.silverpeas.processManager.record
Class QuestionTemplate

java.lang.Object
  extended by com.silverpeas.processManager.record.QuestionTemplate
All Implemented Interfaces:
com.silverpeas.form.RecordTemplate

public class QuestionTemplate
extends Object
implements com.silverpeas.form.RecordTemplate


Constructor Summary
QuestionTemplate(String language, boolean readonly)
          A UserTemplate is built from a language : use addFieldTemplate for each field.
 
Method Summary
 boolean checkDataRecord(com.silverpeas.form.DataRecord record)
          Returns true if the data record is built on this template and all the constraints are ok.
 com.silverpeas.form.DataRecord getEmptyRecord()
          Returns an empty DataRecord built on this template.
 int getFieldIndex(String fieldName)
          Returns the field index of the named field.
 String[] getFieldNames()
          Returns all the field names of the UserRecord built on this template.
 com.silverpeas.form.FieldTemplate getFieldTemplate(String fieldName)
          Returns the FieldTemplate of the named field.
 com.silverpeas.form.FieldTemplate[] getFieldTemplates()
          Returns all the field templates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuestionTemplate

public QuestionTemplate(String language,
                        boolean readonly)
A UserTemplate is built from a language : use addFieldTemplate for each field.

See Also:
addFieldTemplate
Method Detail

getFieldNames

public String[] getFieldNames()
Returns all the field names of the UserRecord built on this template.

Specified by:
getFieldNames in interface com.silverpeas.form.RecordTemplate

getFieldTemplates

public com.silverpeas.form.FieldTemplate[] getFieldTemplates()
Returns all the field templates.

Specified by:
getFieldTemplates in interface com.silverpeas.form.RecordTemplate

getFieldTemplate

public com.silverpeas.form.FieldTemplate getFieldTemplate(String fieldName)
                                                   throws com.silverpeas.form.FormException
Returns the FieldTemplate of the named field.

Specified by:
getFieldTemplate in interface com.silverpeas.form.RecordTemplate
Throws:
com.silverpeas.form.FormException

getFieldIndex

public int getFieldIndex(String fieldName)
                  throws com.silverpeas.form.FormException
Returns the field index of the named field.

Specified by:
getFieldIndex in interface com.silverpeas.form.RecordTemplate
Throws:
com.silverpeas.form.FormException

getEmptyRecord

public com.silverpeas.form.DataRecord getEmptyRecord()
                                              throws com.silverpeas.form.FormException
Returns an empty DataRecord built on this template.

Specified by:
getEmptyRecord in interface com.silverpeas.form.RecordTemplate
Throws:
com.silverpeas.form.FormException

checkDataRecord

public boolean checkDataRecord(com.silverpeas.form.DataRecord record)
Returns true if the data record is built on this template and all the constraints are ok.

Specified by:
checkDataRecord in interface com.silverpeas.form.RecordTemplate


Copyright © 2016 Silverpeas. All Rights Reserved.