org.alfresco.repo.forms
Class FormData.FieldData

java.lang.Object
  extended by org.alfresco.repo.forms.FormData.FieldData
Enclosing class:
FormData

public class FormData.FieldData
extends java.lang.Object

Inner class to represent the value of a field on a form


Field Summary
protected  java.io.InputStream is
           
protected  boolean isFile
           
protected  java.lang.String name
           
protected  java.lang.Object value
           
 
Constructor Summary
FormData.FieldData(org.springframework.extensions.webscripts.servlet.FormData.FormField field)
          Constructs a FieldData object from a WebScript FormField object
FormData.FieldData(java.lang.String name, java.lang.Object value, boolean isFile)
          Default Constructor
 
Method Summary
 java.io.InputStream getInputStream()
          Returns an InputStream onto the content of the file, throws IllegalStateException if this is called for non file field data
 java.lang.String getName()
          Returns the name of the form field that data represents
 java.lang.Object getValue()
          Returns the value of the form field that data represents
 boolean isFile()
          Determines whether the data represents a file
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

value

protected java.lang.Object value

isFile

protected boolean isFile

is

protected java.io.InputStream is
Constructor Detail

FormData.FieldData

public FormData.FieldData(java.lang.String name,
                          java.lang.Object value,
                          boolean isFile)
Default Constructor

Parameters:
name - The name of the form field
value - The value of the form field
isFile - Whether the field data represents an uploaded file

FormData.FieldData

public FormData.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 java.lang.String getName()
Returns the name of the form field that data represents

Returns:
The name

getValue

public java.lang.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 java.io.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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.