org.nuxeo.ecm.webengine.forms.validation
Class TypeConvertor<T>
java.lang.Object
org.nuxeo.ecm.webengine.forms.validation.TypeConvertor<T>
public abstract class TypeConvertor<T>
- extends Object
- Author:
- Bogdan Stefanescu
BOOLEAN
public static final TypeConvertor<Boolean> BOOLEAN
INTEGER
public static final TypeConvertor<Integer> INTEGER
LONG
public static final TypeConvertor<Long> LONG
FLOAT
public static final TypeConvertor<Float> FLOAT
DOUBLE
public static final TypeConvertor<Double> DOUBLE
DATE
public static final TypeConvertor<Date> DATE
CLASS
public static final TypeConvertor<Class<?>> CLASS
TypeConvertor
public TypeConvertor()
getType
public abstract Class<?> getType()
convert
public abstract T convert(String value)
throws ValidationException
- Throws:
ValidationException
newArray
public Object[] newArray(int length)
getConvertor
public static <T> TypeConvertor<T> getConvertor(Class<T> type)
loadClass
public static Class<?> loadClass(String name)
throws Exception
- Throws:
Exception
parseDate
public static Date parseDate(String date)
- Parse the serialized string form into a java.util.Date
- Parameters:
date
- The serialized string form of the date
- Returns:
- The created java.util.Date
Copyright © 2011 Nuxeo SAS. All Rights Reserved.