Class DateTimeValidator

  extended by project35.soa.validation.AbstractEditFieldValidationService
      extended by project35.soa.validation.DateTimeValidator
All Implemented Interfaces:, ServiceClass, EditFieldValidationService, FieldValidationService

public class DateTimeValidator
extends AbstractEditFieldValidationService

This validator checks if a String value is formatted according to the XML Schema dateTime format. This is done via a SimpleDateFormat object with the pattern "yyyy-MM-dd'T'hh:mm:ss". See for more information.

Copyright (c) 2008 Kevin Garwood for Project35. The original code was developed by Kai Runte for the University of Manchester. Revisions have been made for Project35, a project that is independent of that institution. This code is licensed under the Academic Free License version 3.0. The code attribution for the original code is included here:

Copyright (c) Kai Runte and University of Manchester 2007. All rights reserved. Licensed under the Academic Free License version 3.0. For more information on the terms and conditions, please see the file "LICENSE" that is included in this distribution.

Kai Runte
See Also:
SimpleDateFormat, Serialized Form

Field Summary
static java.text.SimpleDateFormat xmlDateTimeFormat
          The formatter that converts a Date object from and to the XML date type "dateTime".
Fields inherited from class project35.soa.validation.AbstractEditFieldValidationService
Constructor Summary
Method Summary
 java.util.ArrayList validate(Project35FormContext project35FormContext, java.lang.String value)
          checks that a field value matches a date-time format
Methods inherited from class project35.soa.validation.AbstractEditFieldValidationService
getFieldName, getInitialisationParameters, initialiseService, isEmpty, isFieldRequired, setFieldName, setRequiredField, validateRequiredField
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final java.text.SimpleDateFormat xmlDateTimeFormat
The formatter that converts a Date object from and to the XML date type "dateTime".

Constructor Detail


public DateTimeValidator()
Method Detail


public java.util.ArrayList validate(Project35FormContext project35FormContext,
                                    java.lang.String value)
checks that a field value matches a date-time format

Specified by:
validate in interface EditFieldValidationService
Specified by:
validate in class AbstractEditFieldValidationService
value -
collection of alerts that represent errors found from validation