public class PreProcessingXStreamMarshaller extends XStreamMarshaller
AdaptrisMarshaller
that supports additional config pre-processors when
unmarshalling.In the adapter configuration file this class is aliased as xstream-marshaller-with-pre-processing which is the preferred alternative to the fully qualified classname when building your configuration.
AbstractMarshaller.Deserializer, AbstractMarshaller.Serializer
AdaptrisMarshaller.MarshalInputStream, AdaptrisMarshaller.MarshalOutputStream
instance
Constructor and Description |
---|
PreProcessingXStreamMarshaller() |
Modifier and Type | Method and Description |
---|---|
KeyValuePairSet |
getPreProcessorConfig() |
ConfigPreProcessorLoader |
getPreProcessorLoader() |
java.lang.String |
getPreProcessors() |
void |
setPreProcessorConfig(KeyValuePairSet preProcessorConfig) |
void |
setPreProcessorLoader(ConfigPreProcessorLoader loader) |
void |
setPreProcessors(java.lang.String preProcessorList) |
java.lang.Object |
unmarshal(java.io.File file)
Unmarshalls an
Object based on the passed file . |
java.lang.Object |
unmarshal(java.io.InputStream input)
Unmarshals an
Object based on the passed
InputStream . |
java.lang.Object |
unmarshal(java.io.Reader input)
Unmarshalls an
Object based on the passed Reader . |
java.lang.Object |
unmarshal(java.lang.String input)
Unmarshalls an
Object from the passed XML. |
java.lang.Object |
unmarshal(java.net.URL url)
Unmarshalls an
Object based on the passed file system
URL . |
java.lang.Object |
unmarshal(URLString url)
Unmarshals an
Object from the passed URLString
location. |
getInstance
marshal, marshal
connectToUrl, invokeDeserialize, invokeSerialize, marshal, marshal, marshal, marshal
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
uncheckedMarshal, uncheckedUnmarshal
public java.lang.Object unmarshal(java.io.Reader input) throws CoreException
AdaptrisMarshaller
Unmarshalls an Object
based on the passed Reader
.
unmarshal
in interface AdaptrisMarshaller
unmarshal
in class XStreamMarshallerImpl
input
- a Reader
with XML to unmarshalObject
CoreException
- wrapping any underlying Exception
public java.lang.Object unmarshal(java.lang.String input) throws CoreException
AdaptrisMarshaller
Unmarshalls an Object
from the passed XML.
unmarshal
in interface AdaptrisMarshaller
unmarshal
in class AbstractMarshaller
input
- the String
to unmarshalObject
CoreException
- wrapping any underlying Exception
AdaptrisMarshaller.unmarshal(java.lang.String)
public java.lang.Object unmarshal(java.io.File file) throws CoreException
AdaptrisMarshaller
Unmarshalls an Object
based on the passed file
.
unmarshal
in interface AdaptrisMarshaller
unmarshal
in class AbstractMarshaller
file
- a file containing XML to unmarshalObject
CoreException
- wrapping any underlying Exception
AdaptrisMarshaller.unmarshal(java.io.File)
public java.lang.Object unmarshal(java.net.URL url) throws CoreException
AdaptrisMarshaller
Unmarshalls an Object
based on the passed file system
URL
.
unmarshal
in interface AdaptrisMarshaller
unmarshal
in class AbstractMarshaller
url
- the file system location to read fromObject
CoreException
- wrapping any underlying Exception
AdaptrisMarshaller.unmarshal(java.net.URL)
public java.lang.Object unmarshal(URLString url) throws CoreException
AdaptrisMarshaller
Unmarshals an Object
from the passed URLString
location.
unmarshal
in interface AdaptrisMarshaller
unmarshal
in class AbstractMarshaller
url
- the location to unmarshal fromObject
CoreException
- wrapping any underlying Exception
spublic java.lang.Object unmarshal(java.io.InputStream input) throws CoreException
AdaptrisMarshaller
Unmarshals an Object
based on the passed
InputStream
.
unmarshal
in interface AdaptrisMarshaller
unmarshal
in class AbstractMarshaller
input
- an InputStream
of XML to unmarshalObject
CoreException
- wrapping any underlying Exception
public ConfigPreProcessorLoader getPreProcessorLoader()
public void setPreProcessorLoader(ConfigPreProcessorLoader loader)
public java.lang.String getPreProcessors()
public void setPreProcessors(java.lang.String preProcessorList)
public KeyValuePairSet getPreProcessorConfig()
public void setPreProcessorConfig(KeyValuePairSet preProcessorConfig)