Package org.silverpeas.processmanager.record

## 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 for a given language.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `checkDataRecord​(org.silverpeas.core.contribution.content.form.DataRecord record)` |
    `org.silverpeas.core.contribution.content.form.DataRecord` | `getEmptyRecord()` |
    `int` | `getFieldIndex​(String fieldName)` |
    `String[]` | `getFieldNames()` |
    `org.silverpeas.core.contribution.content.form.FieldTemplate` | `getFieldTemplate​(String fieldName)` |
    `org.silverpeas.core.contribution.content.form.FieldTemplate[]` | `getFieldTemplates()` |

    - ### 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 QuestionTemplate is built for a given language.
      Parameters:
        `language` - the language the ISO-631 code of a supported language.
        `readonly` - is read only a boolean indicating if the question should be readonly

  - ### Method Detail

    - #### getFieldNames

          public String[] getFieldNames()

      Specified by:
        `getFieldNames` in interface `org.silverpeas.core.contribution.content.form.RecordTemplate`

    - #### getFieldTemplates

          public org.silverpeas.core.contribution.content.form.FieldTemplate[] getFieldTemplates()

      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

      Specified by:
        `getFieldTemplate` in interface `org.silverpeas.core.contribution.content.form.RecordTemplate`
      Throws:
        `org.silverpeas.core.contribution.content.form.FormException`

    - #### getFieldIndex

          public int getFieldIndex​(String fieldName)

      Specified by:
        `getFieldIndex` in interface `org.silverpeas.core.contribution.content.form.RecordTemplate`

    - #### getEmptyRecord

          public org.silverpeas.core.contribution.content.form.DataRecord getEmptyRecord()

      Specified by:
        `getEmptyRecord` in interface `org.silverpeas.core.contribution.content.form.RecordTemplate`

    - #### checkDataRecord

          public boolean checkDataRecord​(org.silverpeas.core.contribution.content.form.DataRecord record)

      Specified by:
        `checkDataRecord` in interface `org.silverpeas.core.contribution.content.form.RecordTemplate`