org.milyn.javabean.decoders
Class DateDecoder

java.lang.Object
  extended by org.milyn.javabean.decoders.LocaleAwareDateDecoder
      extended by org.milyn.javabean.decoders.DateDecoder
All Implemented Interfaces:
ContentHandler, DataDecoder
Direct Known Subclasses:
SqlDateDecoder, SqlTimeDecoder

@DecodeType(value=java.util.Date.class)
public class DateDecoder
extends LocaleAwareDateDecoder
implements DataDecoder

Date data decoder.

Decodes the supplied string into a Date value based on the supplied "format" parameter, or the default (see below).

The default date format used is "yyyy-MM-dd'T'HH:mm:ss" (see SimpleDateFormat). This format is based on the ISO 8601 standard as used by the XML Schema type "dateTime".

This decoder is synchronized on its underlying SimpleDateFormat instance.

Author:
tom.fennelly@gmail.com
See Also:
LocaleAwareDateDecoder

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.milyn.javabean.DataDecoder
DataDecoder.Factory
 
Field Summary
 
Fields inherited from class org.milyn.javabean.decoders.LocaleAwareDateDecoder
decoder, DEFAULT_DATE_FORMAT, format, FORMAT, LOCALE_COUNTRY_CODE, LOCALE_LANGUAGE_CODE, VERIFY_LOCALE
 
Constructor Summary
DateDecoder()
           
 
Method Summary
 Object decode(String data)
          Decode the supplied String data into a new Object data instance.
 
Methods inherited from class org.milyn.javabean.decoders.LocaleAwareDateDecoder
getLocale, isLocalInstalled, setConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateDecoder

public DateDecoder()
Method Detail

decode

public Object decode(String data)
              throws DataDecodeException
Description copied from interface: DataDecoder
Decode the supplied String data into a new Object data instance.

Specified by:
decode in interface DataDecoder
Parameters:
data - Data to be decoded.
Returns:
Decoded data Object.
Throws:
DataDecodeException - Error decoding data.


Copyright © 2008. All Rights Reserved.