org.wicketstuff.rest.contenthandling
Interface IObjectSerialDeserial<T>

All Known Implementing Classes:
TextualObjectSerialDeserial

public interface IObjectSerialDeserial<T>

General interface to implement object serializers/deserializers.

Author:
andrea del bene

Method Summary
<E> E
deserializeObject(T source, Class<E> targetClass, String mimeType)
          Extract an object instance from a given source object.
 T serializeObject(Object target, String mimeType)
          Returns a given representation of the target object.
 

Method Detail

serializeObject

T serializeObject(Object target,
                  String mimeType)
Returns a given representation of the target object.

Parameters:
targetObject - the object to convert to the given format.
mimeType - the target MIME type.
Returns:
the representation of the object.

deserializeObject

<E> E deserializeObject(T source,
                        Class<E> targetClass,
                        String mimeType)
Extract an object instance from a given source object.

Type Parameters:
T - the source object type.
Parameters:
source - the source object.
targetClass - the type of the returned object.
mimeType - the target MIME type.
Returns:
the extracted object.


Copyright © 2013–2014. All rights reserved.