public class TextualWebSerialDeserial extends Object implements IWebSerialDeserial
Constructor and Description |
---|
TextualWebSerialDeserial(String charset,
String mimeType,
IObjectSerialDeserial<String> objectSerialDeserial) |
Modifier and Type | Method and Description |
---|---|
String |
getCharset() |
IObjectSerialDeserial<?> |
getIObjectSerialDeserial(String mimeType)
Returns the
IObjectSerialDeserial for the specific MIME type |
String |
getMimeType() |
IObjectSerialDeserial<String> |
getObjectSerialDeserial() |
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.
|
<T> T |
requestToObject(org.apache.wicket.request.http.WebRequest request,
Class<T> argClass,
String mimeType)
Extract an instance of argClass form the request.
|
public TextualWebSerialDeserial(String charset, String mimeType, IObjectSerialDeserial<String> objectSerialDeserial)
public void objectToResponse(Object targetObject, org.apache.wicket.request.http.WebResponse response, String mimeType) throws org.apache.wicket.WicketRuntimeException
IWebSerialDeserial
objectToResponse
in interface IWebSerialDeserial
targetObject
- the object instance to serialize to string.response
- the response object.mimeType
- the MIME type of the response.org.apache.wicket.WicketRuntimeException
public <T> T requestToObject(org.apache.wicket.request.http.WebRequest request, Class<T> argClass, String mimeType) throws org.apache.wicket.WicketRuntimeException
IWebSerialDeserial
requestToObject
in interface IWebSerialDeserial
request
- the request object.argClass
- the type of the object we want to extract.mimeType
- the MIME type of the request.org.apache.wicket.WicketRuntimeException
public final 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
public String getCharset()
public String getMimeType()
public IObjectSerialDeserial<String> getObjectSerialDeserial()
Copyright © 2015. All rights reserved.