Package net.solarnetwork.web.support
Class SimpleXmlHttpMessageConverter
java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<Object>
net.solarnetwork.web.support.SimpleXmlHttpMessageConverter
- All Implemented Interfaces:
org.springframework.http.converter.HttpMessageConverter<Object>
public class SimpleXmlHttpMessageConverter
extends org.springframework.http.converter.AbstractHttpMessageConverter<Object>
HttpMessageConverter that marshals objects into XML documents.- Version:
- 1.1
- Author:
- matt
-
Field Summary
FieldsFields inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the class names allowed for nesting.net.solarnetwork.codec.PropertySerializerRegistrarGet the property serializer registrar.Get the XML output factory.protected ObjectreadInternal(Class<? extends Object> clazz, org.springframework.http.HttpInputMessage inputMessage) voidsetClassNamesAllowedForNesting(Set<String> classNamesAllowedForNesting) Set the class names allowed for nesting.voidsetPropertySerializerRegistrar(net.solarnetwork.codec.PropertySerializerRegistrar propertySerializerRegistrar) Set the property serializer registrar.voidsetXmlOutputFactory(XMLOutputFactory xmlOutputFactory) Set the XML output factory.protected booleanprotected voidwriteInternal(Object t, org.springframework.http.HttpOutputMessage outputMessage) Methods inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
addDefaultHeaders, canRead, canRead, canWrite, canWrite, getContentLength, getDefaultCharset, getDefaultContentType, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, write
-
Field Details
-
DEFAULT_XML_CONTENT_TYPE
Default content type.- See Also:
-
-
Constructor Details
-
SimpleXmlHttpMessageConverter
public SimpleXmlHttpMessageConverter()Default constructor.
-
-
Method Details
-
supports
- Specified by:
supportsin classorg.springframework.http.converter.AbstractHttpMessageConverter<Object>
-
readInternal
protected Object readInternal(Class<? extends Object> clazz, org.springframework.http.HttpInputMessage inputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotReadableException - Specified by:
readInternalin classorg.springframework.http.converter.AbstractHttpMessageConverter<Object>- Throws:
IOExceptionorg.springframework.http.converter.HttpMessageNotReadableException
-
writeInternal
protected void writeInternal(Object t, org.springframework.http.HttpOutputMessage outputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotWritableException - Specified by:
writeInternalin classorg.springframework.http.converter.AbstractHttpMessageConverter<Object>- Throws:
IOExceptionorg.springframework.http.converter.HttpMessageNotWritableException
-
getClassNamesAllowedForNesting
Get the class names allowed for nesting.- Returns:
- the class names
-
setClassNamesAllowedForNesting
Set the class names allowed for nesting.- Parameters:
classNamesAllowedForNesting- the class names
-
setXmlOutputFactory
Set the XML output factory.- Parameters:
xmlOutputFactory- the factory to set
-
getXmlOutputFactory
Get the XML output factory.- Returns:
- the factory
-
getPropertySerializerRegistrar
public net.solarnetwork.codec.PropertySerializerRegistrar getPropertySerializerRegistrar()Get the property serializer registrar.- Returns:
- the registrar
-
setPropertySerializerRegistrar
public void setPropertySerializerRegistrar(net.solarnetwork.codec.PropertySerializerRegistrar propertySerializerRegistrar) Set the property serializer registrar.- Parameters:
propertySerializerRegistrar- the registrar to set
-