Nuxeo Enterprise Platform 5.4

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 java.lang.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(java.lang.String type, ValueConverter convertor)
           
abstract  java.lang.Object convert(java.lang.Object value)
           
static java.lang.Object getValue(java.lang.String type, java.lang.Object value)
           
static void removeConvertor(java.lang.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 java.lang.Object convert(java.lang.Object value)
                                  throws TypeException
Throws:
TypeException

addConvertor

public static void addConvertor(java.lang.String type,
                                ValueConverter convertor)

removeConvertor

public static void removeConvertor(java.lang.String type)

getValue

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

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.