Class DummyRecordTemplate
- java.lang.Object
-
- org.silverpeas.core.contribution.content.form.dummy.DummyRecordTemplate
-
- All Implemented Interfaces:
Serializable
,RecordTemplate
public class DummyRecordTemplate extends Object implements RecordTemplate
A dummy record template.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DummyRecordTemplate()
A DummyRecordTemplate is empty.DummyRecordTemplate(RecordTemplate template)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkDataRecord(DataRecord record)
Returns true if the data record is built on this template and all the constraints are ok.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 DataRecord built on this template.FieldTemplate
getFieldTemplate(String fieldName)
Returns the FieldTemplate of the named field.FieldTemplate[]
getFieldTemplates()
Returns all the field templates.
-
-
-
Constructor Detail
-
DummyRecordTemplate
public DummyRecordTemplate()
A DummyRecordTemplate is empty.
-
DummyRecordTemplate
public DummyRecordTemplate(RecordTemplate template) throws FormException
- Throws:
FormException
-
-
Method Detail
-
getFieldNames
public String[] getFieldNames()
Returns all the field names of the DataRecord built on this template.- Specified by:
getFieldNames
in interfaceRecordTemplate
-
getFieldTemplates
public FieldTemplate[] getFieldTemplates()
Returns all the field templates.- Specified by:
getFieldTemplates
in interfaceRecordTemplate
-
getFieldTemplate
public FieldTemplate getFieldTemplate(String fieldName) throws FormException
Returns the FieldTemplate of the named field.- Specified by:
getFieldTemplate
in interfaceRecordTemplate
- Throws:
FormException
-
getFieldIndex
public int getFieldIndex(String fieldName) throws FormException
Returns the field index of the named field.- Specified by:
getFieldIndex
in interfaceRecordTemplate
- Throws:
FormException
- if the field name is unknown.
-
getEmptyRecord
public DataRecord getEmptyRecord() throws FormException
Returns an empty DataRecord built on this template.- Specified by:
getEmptyRecord
in interfaceRecordTemplate
- Throws:
FormException
-
checkDataRecord
public boolean checkDataRecord(DataRecord record)
Returns true if the data record is built on this template and all the constraints are ok.- Specified by:
checkDataRecord
in interfaceRecordTemplate
-
-