org.wicketstuff.rest.contenthandling.serialdeserial
Class TextualObjectSerialDeserial

java.lang.Object
  extended by org.wicketstuff.rest.contenthandling.serialdeserial.TextualObjectSerialDeserial
All Implemented Interfaces:
IObjectSerialDeserial<String>, IWebSerialDeserial

Deprecated. Use TextualWebSerialDeserial and IObjectSerialDeserial instead

@Deprecated
public abstract class TextualObjectSerialDeserial
extends Object
implements IWebSerialDeserial, IObjectSerialDeserial<String>

Abstract object serializer/deserializer that works with textual formats.

Author:
andrea del bene

Constructor Summary
TextualObjectSerialDeserial(String charset, String mimeType)
          Deprecated. Instantiates a new textual object serial deserial.
 
Method Summary
 String getCharset()
          Deprecated. Gets the supported charset.
 IObjectSerialDeserial<String> getIObjectSerialDeserial(String mimeType)
          Deprecated. Returns the IObjectSerialDeserial for the specific MIME type
 String getMimeType()
          Deprecated. Gets the mime type.
 boolean isMimeTypeSupported(String mimeType)
          Deprecated. Check if a given MIME type is handled.
 void objectToResponse(Object targetObject, WebResponse response, String mimeType)
          Deprecated. Write the object in input to the response converting it to a given MIME type.
<T> T
requestToObject(WebRequest request, Class<T> targetClass, String mimeType)
          Deprecated. Extract an instance of argClass form the request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.wicketstuff.rest.contenthandling.IObjectSerialDeserial
deserializeObject, serializeObject
 

Constructor Detail

TextualObjectSerialDeserial

public TextualObjectSerialDeserial(String charset,
                                   String mimeType)
Deprecated. 
Instantiates a new textual object serial deserial.

Parameters:
charset - the charset
mimeType - the mime type
Method Detail

objectToResponse

public void objectToResponse(Object targetObject,
                             WebResponse response,
                             String mimeType)
Deprecated. 
Description copied from interface: IWebSerialDeserial
Write the object in input to the response converting it to a given MIME type.

Specified by:
objectToResponse in interface IWebSerialDeserial
Parameters:
targetObject - the object instance to serialize to string.
response - the response object.
mimeType - the MIME type of the response.

requestToObject

public <T> T requestToObject(WebRequest request,
                             Class<T> targetClass,
                             String mimeType)
Deprecated. 
Description copied from interface: IWebSerialDeserial
Extract an instance of argClass form the request.

Specified by:
requestToObject in interface IWebSerialDeserial
Parameters:
request - the request object.
targetClass - the type of the object we want to extract.
mimeType - the MIME type of the request.
Returns:
the object extracted from the request.

isMimeTypeSupported

public final boolean isMimeTypeSupported(String mimeType)
Deprecated. 
Description copied from interface: IWebSerialDeserial
Check if a given MIME type is handled.

Specified by:
isMimeTypeSupported in interface IWebSerialDeserial
Parameters:
mimeType - the MIME type we want to check.
Returns:
true if the MIME type is supported, false otherwise.

getIObjectSerialDeserial

public IObjectSerialDeserial<String> getIObjectSerialDeserial(String mimeType)
Deprecated. 
Description copied from interface: IWebSerialDeserial
Returns the IObjectSerialDeserial for the specific MIME type

Specified by:
getIObjectSerialDeserial in interface IWebSerialDeserial
Returns:
the appropriate IObjectSerialDeserial.

getCharset

public String getCharset()
Deprecated. 
Gets the supported charset.

Returns:
the supported charset

getMimeType

public String getMimeType()
Deprecated. 
Gets the mime type.

Returns:
the mime type


Copyright © 2013–2014. All rights reserved.