Class DateStringField

java.lang.Object
org.apache.fulcrum.intake.model.Field<Date>
org.apache.fulcrum.intake.model.DateStringField
All Implemented Interfaces:
Serializable, org.apache.avalon.framework.logger.LogEnabled

public class DateStringField extends Field<Date>
Field for date inputs as free form text. The parsing of date strings is dependent on any rules that are defined, so this field will expect that any validator will be (or extend) DateStringValidator.
Version:
$Id$
Author:
John McNally, Henning P. Schmiedehausen, Quinton McCombs
See Also:
  • Constructor Details

    • DateStringField

      public DateStringField(XmlField field, Group group) throws IntakeException
      Constructor.
      Parameters:
      field - xml field definition object
      group - xml group definition object
      Throws:
      IntakeException - thrown by superclass
  • Method Details

    • setDefaultValue

      public void setDefaultValue(String prop)
      Sets the default value for a DateString field
      Specified by:
      setDefaultValue in class Field<Date>
      Parameters:
      prop - Parameter for the default values
    • setEmptyValue

      public void setEmptyValue(String prop)
      Set the empty Value. This value is used if Intake maps a field to a parameter returned by the user and the corresponding field is either empty (empty string) or non-existant.
      Specified by:
      setEmptyValue in class Field<Date>
      Parameters:
      prop - The value to use if the field is empty.
    • getDefaultValidator

      protected String getDefaultValidator()
      A suitable validator.
      Overrides:
      getDefaultValidator in class Field<Date>
      Returns:
      "DateStringValidator"
    • doSetValue

      protected void doSetValue()
      Sets the value of the field from data in the parser.
      Specified by:
      doSetValue in class Field<Date>
    • toString

      public String toString()
      returns a String representation
      Overrides:
      toString in class Field<Date>
      Returns:
      a String representation