Class XmlObjectReader<T>

  • Type Parameters:
    T - type of the target object

    public class XmlObjectReader<T>
    extends java.lang.Object
    Author:
    Julien Ruaux
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XmlObjectReader

        public XmlObjectReader​(java.lang.Class<? extends T> itemType)
        Create a new XmlObjectReader 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