|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.wicketstuff.rest.contenthandling.serialdeserial.MultiFormatSerialDeserial
public class MultiFormatSerialDeserial
Object serializer/deserializer that supports multiple formats.
Constructor Summary | |
---|---|
MultiFormatSerialDeserial()
|
Method Summary | ||
---|---|---|
boolean |
isMimeTypeSupported(String mimeType)
Check if a given MIME type is handled. |
|
void |
objectToResponse(Object targetObject,
WebResponse response,
String mimeType)
Write the object in input to the response converting it to a given MIME type. |
|
void |
registerSerDeser(IWebSerialDeserial serialDeserial,
String mimeType)
Register a new serial/deserial for the given MIME type. |
|
|
requestToObject(WebRequest request,
Class<T> targetClass,
String mimeType)
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 |
Constructor Detail |
---|
public MultiFormatSerialDeserial()
Method Detail |
---|
public void objectToResponse(Object targetObject, WebResponse response, String mimeType)
IWebSerialDeserial
objectToResponse
in interface IWebSerialDeserial
targetObject
- the object instance to serialize to string.response
- the response object.mimeType
- the MIME type of the response.public <T> T requestToObject(WebRequest request, Class<T> targetClass, String mimeType)
IWebSerialDeserial
requestToObject
in interface IWebSerialDeserial
request
- the request object.targetClass
- the type of the object we want to extract.mimeType
- the MIME type of the request.
public void registerSerDeser(IWebSerialDeserial serialDeserial, String mimeType)
serialDeserial
- the serial/deserial to use with the given MIME type.mimeType
- the MIME type we want to handle with the given serial/deserial.public boolean isMimeTypeSupported(String mimeType)
IWebSerialDeserial
isMimeTypeSupported
in interface IWebSerialDeserial
mimeType
- the MIME type we want to check.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |