Class DefaultXStreamManager

java.lang.Object
com.atlassian.bamboo.persister.xstream.DefaultXStreamManager
All Implemented Interfaces:
XStreamManager

public class DefaultXStreamManager extends Object implements XStreamManager
Default implementation of XStreamManager.
  • Constructor Details

    • DefaultXStreamManager

      public DefaultXStreamManager(@NotNull @NotNull com.atlassian.plugin.PluginAccessor pluginAccessor, @Nullable @Nullable com.atlassian.plugin.event.PluginEventManager pluginEventManager, @NotNull @NotNull XStreamFactory xStreamFactory)
  • Method Details

    • getNonPluginAwareInstance

      public static DefaultXStreamManager getNonPluginAwareInstance(XStreamFactory xStreamFactory)
      A non-plugin aware instance that will always use the same underlying XStream instance with default class loader.
      Returns:
      non-plugin aware instance of DefaultXStreamManager.
    • postConstruct

      @PostConstruct public void postConstruct()
    • fromXML

      public Object fromXML(String xml)
      Description copied from interface: XStreamManager
      Convert the xml into a java Object instance
      Specified by:
      fromXML in interface XStreamManager
      Parameters:
      xml - The xml representation of the object
      Returns:
      The object
    • fromXML

      public Object fromXML(String pluginKey, String serializedData)
      Description copied from interface: XStreamManager
      Convert XML serializedData into an object in the context of plugin referred to by pluginKey.
      Specified by:
      fromXML in interface XStreamManager
      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

      public String toXML(Object object)
      Description copied from interface: XStreamManager
      Convert the java object into its XML form
      Specified by:
      toXML in interface XStreamManager
      Parameters:
      object - The object
      Returns:
      XML representation of the object
    • toXML

      public void toXML(Object object, OutputStream outputStream)
      Description copied from interface: XStreamManager
      Convert the java object into its XML form and stream it to the output stream provided.
      Specified by:
      toXML in interface XStreamManager
      Parameters:
      object - The object
      outputStream - stream to write object representation to.