|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.forms.Form
public class Form
Data representation of a form to be displayed in the UI.
Field Summary | |
---|---|
protected FormData |
data
|
protected java.util.List |
fieldDefinitions
|
protected java.util.Collection |
fieldGroups
|
protected Item |
item
|
protected java.lang.String |
submissionUrl
|
Constructor Summary | |
---|---|
Form(Item item)
Constructs a Form |
Method Summary | |
---|---|
void |
addData(java.lang.String fieldName,
java.lang.Object fieldData)
Adds some data to be displayed by the form |
void |
addField(Field field)
Adds a Field to the form by adding the FieldDefinition
and the value if any. |
void |
addFieldDefinition(FieldDefinition definition)
Adds the given FieldDefinition to the form. |
void |
addFields(java.util.Collection fields)
Adds a Collection of Fields to the form by adding the FieldDefinitions
and the values if any. |
boolean |
dataExists(java.lang.String dataKey)
Returns true if the Form contains FormData.FieldData for the
specified dataKey . |
java.util.List |
getFieldDefinitionNames()
|
java.util.List |
getFieldDefinitions()
Returns the list of field definitions for the form |
java.util.Collection |
getFieldGroups()
Returns the collection of field groups for the form |
FormData |
getFormData()
Returns the data to display in the form |
Item |
getItem()
Returns the item the form is for |
java.lang.String |
getSubmissionUrl()
Returns the submission URL to use for the form |
void |
setFieldDefinitions(java.util.List fieldDefinitions)
Sets the list of FieldDefinition objects representing the fields the form is able to display |
void |
setFieldGroups(java.util.Collection fieldGroups)
Sets the collection of FieldGroup objects representing the groups of fields the form should display and maintain |
void |
setFormData(FormData data)
Sets the data this form should display. |
void |
setSubmissionUrl(java.lang.String url)
Sets the submission URL the form should use |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Item item
protected java.lang.String submissionUrl
protected java.util.List fieldDefinitions
protected java.util.Collection fieldGroups
protected FormData data
Constructor Detail |
---|
public Form(Item item)
item
- The item the form is forMethod Detail |
---|
public Item getItem()
public java.lang.String getSubmissionUrl()
public void setSubmissionUrl(java.lang.String url)
url
- URL to submit topublic java.util.List getFieldDefinitions()
public java.util.List getFieldDefinitionNames()
public void setFieldDefinitions(java.util.List fieldDefinitions)
fieldDefinitions
- List of FieldDefinition objectspublic void addFieldDefinition(FieldDefinition definition)
NOTE: Multiple fields with the same name can be added to the list, it is therefore the form processor and the client of the FormService responsibility to differentiate the fields in some way i.e. by type, property vs. association.
definition
- The FieldDefinition to addpublic java.util.Collection getFieldGroups()
public void setFieldGroups(java.util.Collection fieldGroups)
fieldGroups
- Collection of FieldGroup objectspublic FormData getFormData()
public void setFormData(FormData data)
data
- FormData instance containing the datapublic boolean dataExists(java.lang.String dataKey)
true
if the Form contains FormData.FieldData
for the
specified dataKey
.
dataKey
- The dataKey for the field.
public void addData(java.lang.String fieldName, java.lang.Object fieldData)
fieldName
- Name of the field the data is forfieldData
- The valuepublic void addField(Field field)
Field
to the form by adding the FieldDefinition
and the value if any.
field
- public void addFields(java.util.Collection fields)
Collection
of Fields
to the form by adding the FieldDefinitions
and the values if any.
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |