Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webengine.forms
Class FormData

java.lang.Object
  extended by org.nuxeo.ecm.webengine.forms.FormData
All Implemented Interfaces:
FormDataProvider, FormInstance

public class FormData
extends Object
implements FormInstance

Author:
Bogdan Stefanescu

Field Summary
static String DOCTYPE
           
static String MAJOR
           
static String MINOR
           
static String PROPERTY
           
static String TITLE
           
static String VERSIONING
           
 
Constructor Summary
FormData(HttpServletRequest request)
           
 
Method Summary
 void fillDocument(DocumentModel doc)
           
 void fillDocumentFromForm(DocumentModel doc)
           
 void fillDocumentFromMultiPartForm(DocumentModel doc)
           
 Object[] get(String key)
           
 Blob getBlob(String key)
           
 Map<String,Blob[]> getBlobFields()
          XXX TODO implement it
 Blob[] getBlobs(String key)
           
 String getDocumentTitle()
           
 String getDocumentType()
           
 FileItem getFileItem(String key)
           
 List<FileItem> getFileItems(String key)
           
 Object getFileItemValue(FileItem item)
           
 Blob getFirstBlob()
           
 Map<String,String[]> getFormFields()
           
 String[] getFormListProperty(String key)
           
 String getFormProperty(String key)
           
 Collection<String> getKeys()
           
 String[] getList(String key)
           
 Map<String,String[]> getMultiPartFormFields()
           
 Object[] getMultiPartFormItems(List<FileItem> list)
           
 Object[] getMultiPartFormItems(String key)
           
 String[] getMultiPartFormListProperty(String key)
           
 String getMultiPartFormProperty(String key)
           
 Map<String,List<FileItem>> getMultiPartItems()
           
 String getString(String key)
           
 VersioningOption getVersioningOption()
           
 boolean isMultipartContent()
           
<T extends Form>
T
validate(Class<T> type)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY

public static final String PROPERTY
See Also:
Constant Field Values

TITLE

public static final String TITLE
See Also:
Constant Field Values

DOCTYPE

public static final String DOCTYPE
See Also:
Constant Field Values

VERSIONING

public static final String VERSIONING
See Also:
Constant Field Values

MAJOR

public static final String MAJOR
See Also:
Constant Field Values

MINOR

public static final String MINOR
See Also:
Constant Field Values
Constructor Detail

FormData

public FormData(HttpServletRequest request)
Method Detail

isMultipartContent

public boolean isMultipartContent()

getFormFields

public Map<String,String[]> getFormFields()
Specified by:
getFormFields in interface FormDataProvider
Specified by:
getFormFields in interface FormInstance

getMultiPartFormFields

public Map<String,String[]> getMultiPartFormFields()

getMultiPartItems

public Map<String,List<FileItem>> getMultiPartItems()

getKeys

public Collection<String> getKeys()
Specified by:
getKeys in interface FormDataProvider

getBlob

public Blob getBlob(String key)
Specified by:
getBlob in interface FormInstance

getBlobs

public Blob[] getBlobs(String key)
Specified by:
getBlobs in interface FormInstance

getBlobFields

public Map<String,Blob[]> getBlobFields()
XXX TODO implement it

Specified by:
getBlobFields in interface FormInstance

getFirstBlob

public Blob getFirstBlob()

getFileItem

public final FileItem getFileItem(String key)

getFileItems

public final List<FileItem> getFileItems(String key)

getMultiPartFormProperty

public String getMultiPartFormProperty(String key)

getMultiPartFormListProperty

public String[] getMultiPartFormListProperty(String key)

getMultiPartFormItems

public Object[] getMultiPartFormItems(String key)
Parameters:
key -
Returns:
an array of strings or an array of blobs

getMultiPartFormItems

public Object[] getMultiPartFormItems(List<FileItem> list)

getFileItemValue

public final Object getFileItemValue(FileItem item)

getFormProperty

public String getFormProperty(String key)

getFormListProperty

public String[] getFormListProperty(String key)

getString

public String getString(String key)
Specified by:
getString in interface FormDataProvider

getList

public String[] getList(String key)
Specified by:
getList in interface FormDataProvider

get

public Object[] get(String key)
Specified by:
get in interface FormInstance

fillDocument

public void fillDocument(DocumentModel doc)
Specified by:
fillDocument in interface FormInstance

fillDocumentFromForm

public void fillDocumentFromForm(DocumentModel doc)
                          throws PropertyException
Throws:
PropertyException

fillDocumentFromMultiPartForm

public void fillDocumentFromMultiPartForm(DocumentModel doc)
                                   throws PropertyException
Throws:
PropertyException

getVersioningOption

public VersioningOption getVersioningOption()

getDocumentType

public String getDocumentType()

getDocumentTitle

public String getDocumentTitle()

validate

public <T extends Form> T validate(Class<T> type)
                        throws ValidationException
Throws:
ValidationException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.