Class FormData.FieldData

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

public class FormData.FieldData extends Object
Inner class to represent the value of a field on a form
Author:
Gavin Cornwell
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected InputStream
     
    protected boolean
     
    protected String
     
    protected Object
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    FieldData(String name, Object value, boolean isFile)
    Default Constructor
    FieldData(org.springframework.extensions.webscripts.servlet.FormData.FormField field)
    Constructs a FieldData object from a WebScript FormField object
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns an InputStream onto the content of the file, throws IllegalStateException if this is called for non file field data
    Returns the name of the form field that data represents
    Returns the value of the form field that data represents
    boolean
    Determines whether the data represents a file
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • name

      protected String name
    • value

      protected Object value
    • isFile

      protected boolean isFile
    • is

      protected InputStream is
  • Constructor Details

    • FieldData

      public FieldData(String name, 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
    • 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 Details

    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object