com.silverpeas.whitePages.record
Class UserTemplate

java.lang.Object
  extended by com.silverpeas.whitePages.record.UserTemplate
All Implemented Interfaces:
com.silverpeas.form.RecordTemplate

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


Constructor Summary
UserTemplate(String fileName, String language)
          A UserTemplate is built from a fileName and 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.
 UserRecord getRecord(String idUser)
          Returns the UserRecord
 com.silverpeas.form.Form getViewForm()
          Returns the Form
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserTemplate

public UserTemplate(String fileName,
                    String language)
A UserTemplate is built from a fileName and a language : use addFieldTemplate for each field.

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

getViewForm

public com.silverpeas.form.Form getViewForm()
Returns the Form


getRecord

public UserRecord getRecord(String idUser)
Returns the UserRecord



Copyright © 2016 Silverpeas. All Rights Reserved.