Interface XStreamManager

  • All Known Implementing Classes:
    DefaultXStreamManager

    @PublicApi
    public interface XStreamManager

    Common XStream persistence behaviour.

    This component also maintains XStreams capable of deserializing XMLs containing classes specific to plugins. To deserialize such XMLs, use DefaultXStreamManager.fromXML(String, String) and pass your plugin's key.

    • Method Detail

      • fromXML

        Object fromXML​(String xml)
        Convert the xml into a java Object instance
        Parameters:
        xml - The xml representation of the object
        Returns:
        The object
      • fromXML

        Object fromXML​(String pluginKey,
                       String serializedData)
        Convert XML serializedData into an object in the context of plugin referred to by pluginKey.
        Parameters:
        pluginKey - plugin key defining the plugin context of the marshalled class
        serializedData - XML data
        Returns:
        instance of the object represented by the serializedData
      • toXML

        String toXML​(Object object)
        Convert the java object into its XML form
        Parameters:
        object - The object
        Returns:
        XML representation of the object
      • toXML

        void toXML​(Object object,
                   OutputStream outputStream)
        Convert the java object into its XML form and stream it to the output stream provided.
        Parameters:
        object - The object
        outputStream - stream to write object representation to.