Package org.alfresco.repo.forms
Class FormData.FieldData
- java.lang.Object
-
- org.alfresco.repo.forms.FormData.FieldData
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamgetInputStream()Returns an InputStream onto the content of the file, throws IllegalStateException if this is called for non file field dataStringgetName()Returns the name of the form field that data representsObjectgetValue()Returns the value of the form field that data representsbooleanisFile()Determines whether the data represents a fileStringtoString()
-
-
-
Field Detail
-
name
protected String name
-
value
protected Object value
-
isFile
protected boolean isFile
-
is
protected InputStream is
-
-
Constructor Detail
-
FieldData
public FieldData(String name, Object value, boolean isFile)
Default Constructor- Parameters:
name- The name of the form fieldvalue- The value of the form fieldisFile- Whether the field data represents an uploaded file
-
FieldData
public FieldData(org.springframework.extensions.webscripts.servlet.FormData.FormField field)
Constructs a FieldData object from a WebScript FormField object- Parameters:
field- The WebScript FormData object to create the field from
-
-
Method Detail
-
getName
public String getName()
Returns the name of the form field that data represents- Returns:
- The name
-
getValue
public Object getValue()
Returns the value of the form field that data represents- Returns:
- The value
-
isFile
public boolean isFile()
Determines whether the data represents a file- Returns:
- true if the data is a file
-
getInputStream
public InputStream getInputStream()
Returns an InputStream onto the content of the file, throws IllegalStateException if this is called for non file field data- Returns:
- An InputStream onto the file
-
-