Package com.redis.riot.core.resource
Class XmlObjectReader<T>
- java.lang.Object
-
- com.redis.riot.core.resource.XmlObjectReader<T>
-
- Type Parameters:
T
- type of the target object
public class XmlObjectReader<T> extends java.lang.Object
- Author:
- Julien Ruaux
-
-
Constructor Summary
Constructors Constructor Description XmlObjectReader(java.lang.Class<? extends T> itemType)
Create a newXmlObjectReader
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
open(org.springframework.core.io.Resource resource)
T
read()
void
setMapper(com.fasterxml.jackson.dataformat.xml.XmlMapper mapper)
Set the object mapper to use to map Xml objects to domain objects.
-
-
-
Constructor Detail
-
XmlObjectReader
public XmlObjectReader(java.lang.Class<? extends T> itemType)
Create a newXmlObjectReader
instance.- Parameters:
itemType
- the target item type
-
-
Method Detail
-
setMapper
public void setMapper(com.fasterxml.jackson.dataformat.xml.XmlMapper mapper)
Set the object mapper to use to map Xml objects to domain objects.- Parameters:
mapper
- the object mapper to use
-
open
public void open(org.springframework.core.io.Resource resource) throws java.lang.Exception
- Throws:
java.lang.Exception
-
read
@Nullable public T read() throws java.lang.Exception
- Throws:
java.lang.Exception
-
close
public void close() throws java.lang.Exception
- Throws:
java.lang.Exception
-
-