Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.api.impl.converter
Class ValueConverter

java.lang.Object
  extended by org.nuxeo.ecm.core.api.impl.converter.ValueConverter
Direct Known Subclasses:
BlobConverter

public abstract class ValueConverter
extends Object

Converts input values into values suitable to be set to a typed object.

Converters are associated with a type.

Author:
Bogdan Stefanescu

Constructor Summary
ValueConverter()
           
 
Method Summary
static void addConvertor(String type, ValueConverter convertor)
           
abstract  Object convert(Object value)
           
static Object getValue(String type, Object value)
           
static void removeConvertor(String type)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueConverter

public ValueConverter()
Method Detail

convert

public abstract Object convert(Object value)
                        throws TypeException
Throws:
TypeException

addConvertor

public static void addConvertor(String type,
                                ValueConverter convertor)

removeConvertor

public static void removeConvertor(String type)

getValue

public static Object getValue(String type,
                              Object value)
                       throws TypeException
Throws:
TypeException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.