org.enhydra.barracuda.core.forms
Interface FormElement

All Known Implementing Classes:
DefaultFormElement

public interface FormElement

This interfaces defines the methods a class needs to implement to act as a FormElement.

A FormElement defines how an element in a FormMap should be mapped to a first class java object. There are several key pieces of information required:

Once we have this information, we basically have enough data to map a String value in the data source to a first class Java object in the element.


Method Summary
 boolean allowMultiples()
          Does this element allow multiple values
 java.lang.Object getDefaultVal()
          Get the default value for this form element
 java.lang.String getKey()
          Get the key value for this form element
 java.lang.String getName()
          Get the name value of form element
 java.lang.Object getOrigVal()
          Get the original value for this element
 ParseException getParseException()
          Get any parse exceptions associated with the element (ie. that might have occurred when the element was mapped)
 FormType getType()
          Get the FormType for this for element
 java.lang.Object getVal()
          Get the value for this element
 FormValidator getValidator()
          Get the default FormValidator for this form element
 void setAllowMultiples(boolean val)
          Set whether or not this element allows multiple values
 void setDefaultVal(java.lang.Object defaultVal)
          Set the default value for this form element
 void setKey(java.lang.String key)
          Set the key value for this form element
 void setName(java.lang.String name)
          Set the name of this form element
 void setOrigVal(java.lang.Object iorigVal)
          Set the original value for this element
 void setParseException(ParseException pe)
          Set the parse exception associated with this element
 void setType(FormType type)
          Set the FormType for this form element
 void setVal(java.lang.Object ival)
          Set the value for this element
 void setValidator(FormValidator validator)
          Set the FormValidator for this form element
 

Method Detail

setKey

public void setKey(java.lang.String key)
Set the key value for this form element

Parameters:
key - the key value for this form element

getKey

public java.lang.String getKey()
Get the key value for this form element

Returns:
the key for this form element

setName

public void setName(java.lang.String name)
Set the name of this form element

Parameters:
name - the name value of this form element

getName

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

Returns:
the name of this form element

setType

public void setType(FormType type)
Set the FormType for this form element

Parameters:
type - the FormType for this form element

getType

public FormType getType()
Get the FormType for this for element

Returns:
the FormType for this form element

setDefaultVal

public void setDefaultVal(java.lang.Object defaultVal)
Set the default value for this form element

Parameters:
defaultVal - the FormType for this form element

getDefaultVal

public java.lang.Object getDefaultVal()
Get the default value for this form element

Returns:
the default value for this form element (may be null)

setAllowMultiples

public void setAllowMultiples(boolean val)
Set whether or not this element allows multiple values

Parameters:
val - true if the element allows multiples

allowMultiples

public boolean allowMultiples()
Does this element allow multiple values

Returns:
true if this element allows multiple values

setValidator

public void setValidator(FormValidator validator)
Set the FormValidator for this form element

Parameters:
validator - the FormValidator for this form element

getValidator

public FormValidator getValidator()
Get the default FormValidator for this form element

Returns:
the validator for this form element (may be null)

setOrigVal

public void setOrigVal(java.lang.Object iorigVal)
Set the original value for this element


getOrigVal

public java.lang.Object getOrigVal()
Get the original value for this element

Returns:
the original value for this form element (may be null)

setVal

public void setVal(java.lang.Object ival)
Set the value for this element


getVal

public java.lang.Object getVal()
Get the value for this element

Returns:
the value for this form element (may be null)

setParseException

public void setParseException(ParseException pe)
Set the parse exception associated with this element

Returns:
any parse exceptions associated with the element

getParseException

public ParseException getParseException()
Get any parse exceptions associated with the element (ie. that might have occurred when the element was mapped)

Returns:
any parse exceptions associated with the element


Copyright © 2001 Enhydra.org