de.mguennewig.pobjects.metadata
Class InputEntry

java.lang.Object
  extended by de.mguennewig.pobjects.metadata.Column
      extended by de.mguennewig.pobjects.metadata.FormEntry
          extended by de.mguennewig.pobjects.metadata.ValueEntry
              extended by de.mguennewig.pobjects.metadata.InputEntry
Direct Known Subclasses:
FileEntry, TextAreaEntry

public class InputEntry
extends ValueEntry

A form entry describes an input element within a form.

Author:
Michael Günnewig

Field Summary
static int INPUT_CLASS_CHECKBOX
          Use a checkbox form element for input.
static int INPUT_CLASS_PASSWORD
          Use a password form element for input.
static int INPUT_CLASS_STANDARD
          Use the standard form element for input.
static int NORMALIZE_COLLAPSE_WHITESPACE
          Normalize input by collapsing whitespace.
static int NORMALIZE_NO_TRANSFORMATION
          Don't apply any string transformation to input values.
 
Fields inherited from class de.mguennewig.pobjects.metadata.ValueEntry
RENDER_AS_DISABLED, RENDER_AS_HIDDEN, RENDER_AS_INPUT, RENDER_AS_TEXT
 
Fields inherited from class de.mguennewig.pobjects.metadata.FormEntry
ADD_METHOD, CHANGED_METHOD, CLASS_NAME, LAYOUT_NO_HEADER_CELL, LAYOUT_PULL_IN, LAYOUT_PULL_IN_CELL, LAYOUT_STANDARD
 
Fields inherited from class de.mguennewig.pobjects.metadata.Column
GET_METHOD, GET_METHOD_VISUAL, MEMBER_ATTR, MEMBER_ATTR_TYPE, MEMBER_NAME, SET_METHOD
 
Constructor Summary
InputEntry(java.lang.String name, Type type, int layout, int renderAs, java.lang.String label, boolean nullAllowed, java.lang.String defaultValue)
          Creates a new input entry for an attribute type.
InputEntry(java.lang.String name, Type type, int layout, int renderAs, java.lang.String label, boolean nullAllowed, java.lang.String defaultValue, int inputClass, int normalization)
          Creates a new input entry for an attribute type.
InputEntry(java.lang.String name, Type type, java.lang.String label, boolean nullAllowed, java.lang.String defaultValue)
          Creates a new input entry for an attribute type.
 
Method Summary
 java.lang.String getDefaultValue()
          Returns the string representation of the parameter's default value.
 int getInputClass()
           
 java.lang.String getLabel()
          Returns the string used to refer to this field in the user interface.
 int getNormalization()
           
 boolean isNullAllowed()
          Tests whether this entry is not mandatory and can be null.
 java.lang.String normalize(java.lang.String s)
           
 
Methods inherited from class de.mguennewig.pobjects.metadata.ValueEntry
getRenderAs
 
Methods inherited from class de.mguennewig.pobjects.metadata.FormEntry
getLayout, name
 
Methods inherited from class de.mguennewig.pobjects.metadata.Column
getDescription, getIndex, getName, getSchemaName, getType, setDescription, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INPUT_CLASS_STANDARD

public static final int INPUT_CLASS_STANDARD
Use the standard form element for input.

See Also:
Constant Field Values

INPUT_CLASS_CHECKBOX

public static final int INPUT_CLASS_CHECKBOX
Use a checkbox form element for input.

See Also:
Constant Field Values

INPUT_CLASS_PASSWORD

public static final int INPUT_CLASS_PASSWORD
Use a password form element for input.

See Also:
Constant Field Values

NORMALIZE_NO_TRANSFORMATION

public static final int NORMALIZE_NO_TRANSFORMATION
Don't apply any string transformation to input values.

This is the default.

See Also:
Constant Field Values

NORMALIZE_COLLAPSE_WHITESPACE

public static final int NORMALIZE_COLLAPSE_WHITESPACE
Normalize input by collapsing whitespace.

Removes all whitespace characters (this is, everything with an ASCII code less or equal to 32) from the beginning and the end of the string. Further replaces sequences of whitespace within a string with a single space (ASCI 32).

See Also:
Constant Field Values
Constructor Detail

InputEntry

public InputEntry(java.lang.String name,
                  Type type,
                  java.lang.String label,
                  boolean nullAllowed,
                  java.lang.String defaultValue)
Creates a new input entry for an attribute type.


InputEntry

public InputEntry(java.lang.String name,
                  Type type,
                  int layout,
                  int renderAs,
                  java.lang.String label,
                  boolean nullAllowed,
                  java.lang.String defaultValue)
Creates a new input entry for an attribute type.


InputEntry

public InputEntry(java.lang.String name,
                  Type type,
                  int layout,
                  int renderAs,
                  java.lang.String label,
                  boolean nullAllowed,
                  java.lang.String defaultValue,
                  int inputClass,
                  int normalization)
Creates a new input entry for an attribute type.

Method Detail

getLabel

public final java.lang.String getLabel()
Returns the string used to refer to this field in the user interface.

See Also:
Field.getLabel(), Parameter.getLabel()

isNullAllowed

public final boolean isNullAllowed()
Tests whether this entry is not mandatory and can be null.

See Also:
Field.isNullAllowed(), Parameter.isNullAllowed()

getDefaultValue

public final java.lang.String getDefaultValue()
Returns the string representation of the parameter's default value.

See Also:
Parameter.isNullAllowed()

getInputClass

public final int getInputClass()

getNormalization

public final int getNormalization()

normalize

public java.lang.String normalize(java.lang.String s)