Class 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 Detail

      • QuestionTemplate

        public QuestionTemplate​(String language,
                                boolean readonly)
        A QuestionTemplate is built from a language.
        Parameters:
        language - the language
        readonly - is read only
    • Method Detail

      • getFieldNames

        public String[] getFieldNames()
        Returns all the field names of the UserRecord built on this template.
        Specified by:
        getFieldNames in interface org.silverpeas.core.contribution.content.form.RecordTemplate
      • getFieldTemplates

        public org.silverpeas.core.contribution.content.form.FieldTemplate[] getFieldTemplates()
        Returns all the field templates.
        Specified by:
        getFieldTemplates in interface org.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:
        getFieldTemplate in interface org.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:
        getFieldIndex in interface org.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.FormException
        Returns an empty DataRecord built on this template.
        Specified by:
        getEmptyRecord in interface org.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:
        checkDataRecord in interface org.silverpeas.core.contribution.content.form.RecordTemplate