org.formproc.config
Class AbstractFormConfiguration

java.lang.Object
  |
  +--org.formproc.config.AbstractFormConfiguration
All Implemented Interfaces:
FormConfiguration
Direct Known Subclasses:
XMLFormConfiguration

public abstract class AbstractFormConfiguration
extends java.lang.Object
implements FormConfiguration

Abstract implementation of the FormConfiguration interface which provides common base functionality.

Author:
Anthony Eden

Field Summary
protected  boolean convertNullValues
           
protected  java.util.List formElementGroupList
           
protected  java.util.Map formElementGroups
           
protected  java.util.List formElementList
           
protected  java.util.Map formElements
           
protected  java.lang.String name
           
protected  boolean skipNullValues
           
protected  boolean storeNullValues
           
protected  Storer storer
           
protected  TypeConverter typeConverter
           
protected  boolean validateNullValues
           
protected  Validator validator
           
 
Constructor Summary
AbstractFormConfiguration()
           
 
Method Summary
 FormElement getFormElement(java.lang.String name)
          Get the named FormElement.
 FormElementGroup getFormElementGroup(java.lang.String name)
          Get the named FormElementGroup.
 java.util.List getFormElementGroups()
          Return a non-mutable List of FormElementGroup objects in the same order as they appear in the form's configuration.
 java.util.List getFormElements()
          Return a non-mutable List of FormElements in the same order as they appear in the form's configuration.
 java.lang.String getName()
          Get the form name.
 Storer getStorer()
          Get the default Storer.
 TypeConverter getTypeConverter()
          Get the default TypeConverter.
 Validator getValidator()
          Get the default Validator.
 boolean isConvertNullValues()
          Return true to convert null values.
 boolean isSkipNullValues()
          Return true to skip validation, conversion and storage of null values.
 boolean isStoreNullValues()
          Return true to store null values.
 boolean isValidateNullValues()
          Return true to validate null values.
protected  void setName(java.lang.String name)
          Set the form name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

formElements

protected java.util.Map formElements

formElementGroups

protected java.util.Map formElementGroups

formElementList

protected java.util.List formElementList

formElementGroupList

protected java.util.List formElementGroupList

validator

protected Validator validator

typeConverter

protected TypeConverter typeConverter

storer

protected Storer storer

name

protected java.lang.String name

skipNullValues

protected boolean skipNullValues

validateNullValues

protected boolean validateNullValues

convertNullValues

protected boolean convertNullValues

storeNullValues

protected boolean storeNullValues
Constructor Detail

AbstractFormConfiguration

public AbstractFormConfiguration()
Method Detail

getName

public java.lang.String getName()
Get the form name.

Specified by:
getName in interface FormConfiguration
Returns:
The form name

setName

protected void setName(java.lang.String name)
Set the form name.

Parameters:
name - The form name

getValidator

public Validator getValidator()
Get the default Validator. This method may be null if no default Validator is specified in the form configuration.

Specified by:
getValidator in interface FormConfiguration
Returns:
The Validator or null

getTypeConverter

public TypeConverter getTypeConverter()
Get the default TypeConverter. This method may be null if no default TypeConverter is specified in the form configuration.

Specified by:
getTypeConverter in interface FormConfiguration
Returns:
The TypeConverter or null

getStorer

public Storer getStorer()
Get the default Storer. This method may return null if no default Storer is specified in the form configuration.

Specified by:
getStorer in interface FormConfiguration
Returns:
The Storer or null

getFormElement

public FormElement getFormElement(java.lang.String name)
Get the named FormElement. If no FormElement for the given name exists then this method returns null.

Specified by:
getFormElement in interface FormConfiguration
Parameters:
name - The form element name
Returns:
The FormElement

getFormElementGroup

public FormElementGroup getFormElementGroup(java.lang.String name)
Get the named FormElementGroup. If no FormElementGroup for the given name exists then this method returns null.

Specified by:
getFormElementGroup in interface FormConfiguration
Parameters:
name - The form element group name
Returns:
The FormElementGroup

getFormElements

public java.util.List getFormElements()
Return a non-mutable List of FormElements in the same order as they appear in the form's configuration.

Specified by:
getFormElements in interface FormConfiguration
Returns:
An non-mutable List of FormElement objects

getFormElementGroups

public java.util.List getFormElementGroups()
Return a non-mutable List of FormElementGroup objects in the same order as they appear in the form's configuration.

Specified by:
getFormElementGroups in interface FormConfiguration
Returns:
An non-mutable List of FormElementGroup objects

isSkipNullValues

public boolean isSkipNullValues()
Return true to skip validation, conversion and storage of null values.

Specified by:
isSkipNullValues in interface FormConfiguration
Returns:
True to skip null values

isValidateNullValues

public boolean isValidateNullValues()
Return true to validate null values.

Specified by:
isValidateNullValues in interface FormConfiguration
Returns:
True to validate null values

isConvertNullValues

public boolean isConvertNullValues()
Return true to convert null values.

Specified by:
isConvertNullValues in interface FormConfiguration
Returns:
True to convert null values

isStoreNullValues

public boolean isStoreNullValues()
Return true to store null values.

Specified by:
isStoreNullValues in interface FormConfiguration
Returns:
True to store null values


Copyright (c) 2001-2003 Anthony Eden. All Rights Reserved.