project35.soa.validation
Class DateTimeValidator
java.lang.Object
project35.soa.validation.AbstractEditFieldValidationService
project35.soa.validation.DateTimeValidator
- All Implemented Interfaces:
- java.io.Serializable, 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
http://www.w3.org/TR/xmlschema-2/#dateTime
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.
- Version:
- 1.0
- Author:
- 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". |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
xmlDateTimeFormat
public static final java.text.SimpleDateFormat xmlDateTimeFormat
- The formatter that converts a Date object from and to the XML date type "dateTime".
DateTimeValidator
public DateTimeValidator()
validate
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
- Parameters:
value
-
- Returns:
- collection of alerts that represent errors found
from validation