Class DeploymentDescriptorIO


  • public class DeploymentDescriptorIO
    extends java.lang.Object
    XML based deployment descriptor IO manager to read and write descriptors. Underlying uses XStream for serialization with special class and field mapping for more readability of the produced XML output.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static DeploymentDescriptor fromXml​(java.io.InputStream inputStream)
      Reads XML data from given input stream and produces valid instance of DeploymentDescriptor
      static javax.xml.bind.JAXBContext getContext()  
      static java.lang.String toXml​(DeploymentDescriptor descriptor)
      Serializes descriptor instance to XML
      • Methods inherited from class java.lang.Object

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

      • DeploymentDescriptorIO

        public DeploymentDescriptorIO()
    • Method Detail

      • fromXml

        public static DeploymentDescriptor fromXml​(java.io.InputStream inputStream)
        Reads XML data from given input stream and produces valid instance of DeploymentDescriptor
        Parameters:
        inputStream - input stream that comes with xml data of the descriptor
        Returns:
        instance of the descriptor after deserialization
      • toXml

        public static java.lang.String toXml​(DeploymentDescriptor descriptor)
        Serializes descriptor instance to XML
        Parameters:
        descriptor - descriptor to be serialized
        Returns:
        xml representation of descriptor as string
      • getContext

        public static javax.xml.bind.JAXBContext getContext()
                                                     throws javax.xml.bind.JAXBException,
                                                            org.xml.sax.SAXException
        Throws:
        javax.xml.bind.JAXBException
        org.xml.sax.SAXException