org.apache.cocoon.woody.datatype.convertor
Class MillisDateConvertor

java.lang.Object
  extended by org.apache.cocoon.woody.datatype.convertor.MillisDateConvertor
All Implemented Interfaces:
Convertor

public class MillisDateConvertor
extends Object
implements Convertor

A Convertor for Date objects which uses the number of milliseconds since January 1, 1970, 00:00:00 GMT as string representation.

Version:
CVS $Id: MillisDateConvertor.html 1304258 2012-03-23 10:09:27Z ilgrosso $

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.cocoon.woody.datatype.convertor.Convertor
Convertor.FormatCache
 
Constructor Summary
MillisDateConvertor()
           
 
Method Summary
 Object convertFromString(String value, Locale locale, Convertor.FormatCache formatCache)
          Converts string representation into the object of convertor's type.
 String convertToString(Object value, Locale locale, Convertor.FormatCache formatCache)
           
 Class getTypeClass()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MillisDateConvertor

public MillisDateConvertor()
Method Detail

convertFromString

public Object convertFromString(String value,
                                Locale locale,
                                Convertor.FormatCache formatCache)
Description copied from interface: Convertor
Converts string representation into the object of convertor's type. Returns null if conversion fails.

Specified by:
convertFromString in interface Convertor
formatCache - can be null if not needed

convertToString

public String convertToString(Object value,
                              Locale locale,
                              Convertor.FormatCache formatCache)
Specified by:
convertToString in interface Convertor

getTypeClass

public Class getTypeClass()
Specified by:
getTypeClass in interface Convertor


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.