org.outerj.xreporter.report.instance
Class InputField

java.lang.Object
  extended byorg.outerj.xreporter.report.instance.InputField
Direct Known Subclasses:
Condition, Parameter

public abstract class InputField
extends java.lang.Object


Constructor Summary
InputField()
           
 
Method Summary
abstract  void generateInfoSaxFragment(org.xml.sax.ContentHandler contentHandler, ExecutionContext executionContext, ResourceHandle resourceHandle)
          Similar to generateSaxFragment, but only contains the state of the inputfield, not other information like the datatype or validation errors.
abstract  void generateSaxFragment(org.xml.sax.ContentHandler contentHandler, ExecutionContext executionContext, ResourceHandle resourceHandle)
          Generates a piece of SAX representing the state and metadata of this inputfield.
abstract  DataType getDataType()
           
abstract  java.lang.String getName()
           
abstract  boolean hasValue()
           
abstract  boolean isValid()
           
abstract  void readStoredEntry(UserEntryStore userEntryStore, User user, ResourceHandle resourceHandle)
          Allows an inputfield to initialize itself using a previously stored value.
abstract  void reset()
           
abstract  void storeEntry(UserEntryStore userEntryStore, User user)
          Allows an inputfield to store its value into the user entry store.
abstract  void storeState(ReportState reportState)
           
abstract  void submit(java.util.Map values, ExecutionContext executionContext)
          Same as submit(values, executionContext, false).
abstract  void submit(java.util.Map values, ExecutionContext executionContext, boolean rawLocale)
          Submit (user input) values to this inputField.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputField

public InputField()
Method Detail

getName

public abstract java.lang.String getName()

generateSaxFragment

public abstract void generateSaxFragment(org.xml.sax.ContentHandler contentHandler,
                                         ExecutionContext executionContext,
                                         ResourceHandle resourceHandle)
                                  throws java.lang.Exception
Generates a piece of SAX representing the state and metadata of this inputfield. For example, this could be its name, value, validation errors, information about the datatype. The methods startDocument and endDocument will not be called.

Throws:
java.lang.Exception

generateInfoSaxFragment

public abstract void generateInfoSaxFragment(org.xml.sax.ContentHandler contentHandler,
                                             ExecutionContext executionContext,
                                             ResourceHandle resourceHandle)
                                      throws org.xml.sax.SAXException
Similar to generateSaxFragment, but only contains the state of the inputfield, not other information like the datatype or validation errors. Only inputfields that have a non-empty value will generate something here.

The purpose of this method is to include information about the InputFields on the output page. Hence this method should only be called after the containing step has been completed successfully.

Throws:
org.xml.sax.SAXException

submit

public abstract void submit(java.util.Map values,
                            ExecutionContext executionContext)
Same as submit(values, executionContext, false).


submit

public abstract void submit(java.util.Map values,
                            ExecutionContext executionContext,
                            boolean rawLocale)
Submit (user input) values to this inputField. The Map can contain values for all inputFields, it is the responsiblity of the InputField implementation to take only the appropriate values from the map.

Parameters:
values - a Map wherein the values are Strings.
rawLocale - ignore the user locale and use the built-in default locale

isValid

public abstract boolean isValid()
Returns:
true if this input field has a valid value or if it has no value and is not required to have one.

hasValue

public abstract boolean hasValue()
Returns:
true if this input field has a value.

getDataType

public abstract DataType getDataType()

reset

public abstract void reset()

readStoredEntry

public abstract void readStoredEntry(UserEntryStore userEntryStore,
                                     User user,
                                     ResourceHandle resourceHandle)
                              throws UserEntryStoreException
Allows an inputfield to initialize itself using a previously stored value.

Throws:
UserEntryStoreException

storeEntry

public abstract void storeEntry(UserEntryStore userEntryStore,
                                User user)
                         throws UserEntryStoreException
Allows an inputfield to store its value into the user entry store.

Throws:
UserEntryStoreException

storeState

public abstract void storeState(ReportState reportState)