|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.repo.forms.FormData
public class FormData
Represents the data going to or coming from a Form.
| Nested Class Summary | |
|---|---|
class |
FormData.FieldData
Inner class to represent the value of a field on a form |
| Field Summary | |
|---|---|
protected java.util.Map |
data
|
| Constructor Summary | |
|---|---|
FormData()
Default constructor |
|
| Method Summary | |
|---|---|
void |
addFieldData(org.springframework.extensions.webscripts.servlet.FormData.FormField field)
Adds the given webscript FormField object to the form. |
void |
addFieldData(java.lang.String fieldName,
java.lang.Object fieldValue)
Adds the given data to the form. |
void |
addFieldData(java.lang.String fieldName,
java.lang.Object fieldValue,
boolean overwrite)
Adds the given data to the form. |
FormData.FieldData |
getFieldData(java.lang.String fieldName)
Returns the data for the given field. |
java.util.Set |
getFieldNames()
Returns a list of the names of the fields held by this object. |
int |
getNumberOfFields()
Returns the number of fields data is being held for. |
boolean |
hasFieldData(java.lang.String fieldName)
Determines whether field data for the given item exists. |
java.util.Iterator |
iterator()
Returns an Iterator over the FieldData objects held by this object. |
void |
removeFieldData(java.lang.String fieldName)
Removes the data associated with the given field if it exists. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map data
| Constructor Detail |
|---|
public FormData()
| Method Detail |
|---|
public boolean hasFieldData(java.lang.String fieldName)
fieldName - Name of field to look for
public FormData.FieldData getFieldData(java.lang.String fieldName)
fieldName - Name of field to look for
public void addFieldData(java.lang.String fieldName,
java.lang.Object fieldValue)
NOTE: Adding the same named data will append the value and thereafter return a List containing all added values.
fieldName - The name of the fieldfieldValue - The value of the datapublic void addFieldData(org.springframework.extensions.webscripts.servlet.FormData.FormField field)
field - A WebScript FormField object
public void addFieldData(java.lang.String fieldName,
java.lang.Object fieldValue,
boolean overwrite)
If overwrite is true the provided value replaces the existing value whereas false will force the creation of a List (if necessary) and the provided value will be added to the List.
fieldName - The name of the fieldfieldValue - The value of the dataoverwrite - public void removeFieldData(java.lang.String fieldName)
fieldName - Name of the field to removepublic java.util.Set getFieldNames()
public int getNumberOfFields()
public java.util.Iterator iterator()
iterator in interface java.lang.Iterablepublic 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 | ||||||||