com.atlassian.bamboo.persister.xstream
Class DefaultXStreamManager

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

public class DefaultXStreamManager
extends java.lang.Object
implements XStreamManager

Default implementation of XStreamManager.


Nested Class Summary
static class DefaultXStreamManager.PluginXStreams
          Internal class that maintains mappings from plugins to corresponding XStreams
 
Field Summary
protected  com.thoughtworks.xstream.XStream global
           
 
Constructor Summary
DefaultXStreamManager(com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.plugin.event.PluginEventManager pluginEventManager)
           
DefaultXStreamManager(com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.plugin.event.PluginEventManager pluginEventManager, XStreamFactory factory)
           
 
Method Summary
 java.lang.Object fromXML(java.lang.String xml)
          Convert the xml into a java Object instance
 java.lang.Object fromXML(java.lang.String pluginKey, java.lang.String serializedData)
          Convert XML serializedData into an object in the context of plugin referred to by pluginKey.
static DefaultXStreamManager getNonPluginAwareInstance()
          A non-plugin aware instance that will always use the same underlying XStream instance with default class loader.
 java.lang.String toXML(java.lang.Object object)
          Convert the java object into its XML form
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

global

protected final com.thoughtworks.xstream.XStream global
Constructor Detail

DefaultXStreamManager

public DefaultXStreamManager(@NotNull
                             com.atlassian.plugin.PluginAccessor pluginAccessor,
                             @Nullable
                             com.atlassian.plugin.event.PluginEventManager pluginEventManager,
                             @NotNull
                             XStreamFactory factory)

DefaultXStreamManager

public DefaultXStreamManager(com.atlassian.plugin.PluginAccessor pluginAccessor,
                             com.atlassian.plugin.event.PluginEventManager pluginEventManager)
Method Detail

getNonPluginAwareInstance

public static DefaultXStreamManager getNonPluginAwareInstance()
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.

fromXML

public java.lang.Object fromXML(java.lang.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 java.lang.Object fromXML(java.lang.String pluginKey,
                                java.lang.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 java.lang.String toXML(java.lang.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


Copyright © 2012 Atlassian. All Rights Reserved.