Package org.ametys.cms.form
Class Form
- java.lang.Object
 - 
- org.ametys.cms.form.Form
 
 
- 
- Direct Known Subclasses:
 RepeaterField.RepeaterEntry
public class Form extends Object
Abstraction of the form submitted by the client. 
- 
- 
Constructor Summary
Constructors Constructor Description Form() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BinaryFieldgetBinaryField(String fieldName)Returns the named field's value asBinaryField.SimpleField<Boolean>getBooleanArray(String fieldName)Returns the named field's value as boolean array.MetadataComment[]getCommentArray(String metadataName)Return the array of comments for the named field.FormgetCompositeField(String fieldName)Returns the named field's value asForm.SimpleField<Content>getContentArray(String fieldName)Returns the named field's value as a content array.SimpleField<Date>getDateArray(String fieldName)Returns the named field's value as Date array.SimpleField<Double>getDoubleArray(String fieldName)Returns the named field's value as double array.ExternalizableFieldgetExternalizableField(String fieldName)Returns the named field's value as aExternalizableFieldAbstractFieldgetField(String fieldName)Get a non-typed field.Set<String>getFieldNames()Returns an array containing field names.SimpleField<Long>getLongArray(String fieldName)Returns the named field's value as long array.SimpleField<MultilingualString>getMultilingualStringArray(String fieldName)Returns the named field's value as MultilingualString array.ReferenceFieldgetReferenceField(String fieldName)Returns the named field's value asReferenceField.RepeaterFieldgetRepeaterField(String fieldName)Returns the named field's value asRepeaterField.RichTextFieldgetRichTextField(String fieldName)Returns the named field's value asRichTextField.SimpleField<String>getStringArray(String fieldName)Returns the named field's value as String array.SubContentFieldgetSubContentField(String fieldName)Returns the named field's value asSubContentField.SimpleField<UserIdentity>getUserArray(String fieldName)Returns the named field's value as UserIdentity array.voidsetCommentsField(String fieldName, MetadataComment[] comments)Set the comment of a fieldvoidsetCompositeField(String fieldName, Form compositeField)Set a composite field.voidsetField(String fieldName, AbstractField values)Set a multi-valued date field.StringtoString() 
 - 
 
- 
- 
Constructor Detail
- 
Form
public Form()
 
 - 
 
- 
Method Detail
- 
getFieldNames
public Set<String> getFieldNames()
Returns an array containing field names.- Returns:
 - an array containing field names.
 
 
- 
getCompositeField
public Form getCompositeField(String fieldName)
Returns the named field's value asForm.- Parameters:
 fieldName- the field name.- Returns:
 - the field value as 
Form. 
 
- 
setCompositeField
public void setCompositeField(String fieldName, Form compositeField)
Set a composite field.- Parameters:
 fieldName- the field name.compositeField- the composite field.
 
- 
getRepeaterField
public RepeaterField getRepeaterField(String fieldName)
Returns the named field's value asRepeaterField.- Parameters:
 fieldName- the field name.- Returns:
 - the field value as 
RepeaterField. 
 
- 
getRichTextField
public RichTextField getRichTextField(String fieldName)
Returns the named field's value asRichTextField.- Parameters:
 fieldName- the field name.- Returns:
 - the field value as RichText.
 
 
- 
getBinaryField
public BinaryField getBinaryField(String fieldName)
Returns the named field's value asBinaryField.- Parameters:
 fieldName- the field name.- Returns:
 - the field value as a BinaryField.
 
 
- 
getSubContentField
public SubContentField getSubContentField(String fieldName)
Returns the named field's value asSubContentField.- Parameters:
 fieldName- the field name.- Returns:
 - the field value as a SubContentField.
 
 
- 
getReferenceField
public ReferenceField getReferenceField(String fieldName)
Returns the named field's value asReferenceField.- Parameters:
 fieldName- the field name.- Returns:
 - the field value as a ReferenceField.
 
 
- 
getStringArray
public SimpleField<String> getStringArray(String fieldName)
Returns the named field's value as String array.- Parameters:
 fieldName- the field name.- Returns:
 - field value as String array.
 
 
- 
getDateArray
public SimpleField<Date> getDateArray(String fieldName)
Returns the named field's value as Date array.- Parameters:
 fieldName- the field name.- Returns:
 - field value as Date array.
 
 
- 
getLongArray
public SimpleField<Long> getLongArray(String fieldName)
Returns the named field's value as long array.- Parameters:
 fieldName- the field name.- Returns:
 - field value as long array.
 
 
- 
getDoubleArray
public SimpleField<Double> getDoubleArray(String fieldName)
Returns the named field's value as double array.- Parameters:
 fieldName- the field name.- Returns:
 - field value as double array.
 
 
- 
getBooleanArray
public SimpleField<Boolean> getBooleanArray(String fieldName)
Returns the named field's value as boolean array.- Parameters:
 fieldName- the field name.- Returns:
 - field value as boolean array.
 
 
- 
getUserArray
public SimpleField<UserIdentity> getUserArray(String fieldName)
Returns the named field's value as UserIdentity array.- Parameters:
 fieldName- the field name.- Returns:
 - field value as UserIdentity array.
 
 
- 
getMultilingualStringArray
public SimpleField<MultilingualString> getMultilingualStringArray(String fieldName)
Returns the named field's value as MultilingualString array.- Parameters:
 fieldName- the field name.- Returns:
 - field value as UserIdentity array.
 
 
- 
getContentArray
public SimpleField<Content> getContentArray(String fieldName)
Returns the named field's value as a content array.- Parameters:
 fieldName- the field name.- Returns:
 - the field value as a content array.
 
 
- 
getExternalizableField
public ExternalizableField getExternalizableField(String fieldName)
Returns the named field's value as aExternalizableField- Parameters:
 fieldName- the field name.- Returns:
 - the externalizable field
 
 
- 
setField
public void setField(String fieldName, AbstractField values)
Set a multi-valued date field.- Parameters:
 fieldName- the field name.values- the Date array containing values of this field.
 
- 
getField
public AbstractField getField(String fieldName)
Get a non-typed field.- Parameters:
 fieldName- The name of the field- Returns:
 - The desired field or null
 
 
- 
getCommentArray
public MetadataComment[] getCommentArray(String metadataName)
Return the array of comments for the named field.- Parameters:
 metadataName- the field name.- Returns:
 - the array of comments
 
 
- 
setCommentsField
public void setCommentsField(String fieldName, MetadataComment[] comments)
Set the comment of a field- Parameters:
 fieldName- The field namecomments- The array of metadata comments
 
 - 
 
 -