public class MultiFormatSerialDeserial extends Object implements IWebSerialDeserial
Constructor and Description |
---|
MultiFormatSerialDeserial() |
Modifier and Type | Method and Description |
---|---|
IObjectSerialDeserial<?> |
getIObjectSerialDeserial(String mimeType)
Returns the
IObjectSerialDeserial for the specific MIME type |
boolean |
isMimeTypeSupported(String mimeType)
Check if a given MIME type is handled.
|
void |
objectToResponse(Object targetObject,
org.apache.wicket.request.http.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.
|
<T> T |
requestToObject(org.apache.wicket.request.http.WebRequest request,
Class<T> targetClass,
String mimeType)
Extract an instance of argClass form the request.
|
public void objectToResponse(Object targetObject, org.apache.wicket.request.http.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(org.apache.wicket.request.http.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.public IObjectSerialDeserial<?> getIObjectSerialDeserial(String mimeType)
IWebSerialDeserial
IObjectSerialDeserial
for the specific MIME typegetIObjectSerialDeserial
in interface IWebSerialDeserial
Copyright © 2015. All rights reserved.