Class DefaultXStreamManager
java.lang.Object
com.atlassian.bamboo.persister.xstream.DefaultXStreamManager
- All Implemented Interfaces:
XStreamManager
Default implementation of
XStreamManager
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Internal class that maintains mappings from plugins to corresponding XStreams -
Constructor Summary
ConstructorDescriptionDefaultXStreamManager
(@NotNull com.atlassian.plugin.PluginAccessor pluginAccessor, @Nullable com.atlassian.plugin.event.PluginEventManager pluginEventManager, @NotNull XStreamFactory xStreamFactory) -
Method Summary
Modifier and TypeMethodDescriptionConvert the xml into a java Object instanceConvert XML serializedData into an object in the context of plugin referred to by pluginKey.static DefaultXStreamManager
getNonPluginAwareInstance
(XStreamFactory xStreamFactory) A non-plugin aware instance that will always use the same underlying XStream instance with default class loader.void
Convert the java object into its XML formvoid
toXML
(Object object, OutputStream outputStream) Convert the java object into its XML form and stream it to the output stream provided.
-
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
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
Description copied from interface:XStreamManager
Convert the xml into a java Object instance- Specified by:
fromXML
in interfaceXStreamManager
- Parameters:
xml
- The xml representation of the object- Returns:
- The object
-
fromXML
Description copied from interface:XStreamManager
Convert XML serializedData into an object in the context of plugin referred to by pluginKey.- Specified by:
fromXML
in interfaceXStreamManager
- Parameters:
pluginKey
- plugin key defining the plugin context of the marshalled classserializedData
- XML data- Returns:
- instance of the object represented by the serializedData
-
toXML
Description copied from interface:XStreamManager
Convert the java object into its XML form- Specified by:
toXML
in interfaceXStreamManager
- Parameters:
object
- The object- Returns:
- XML representation of the object
-
toXML
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 interfaceXStreamManager
- Parameters:
object
- The objectoutputStream
- stream to write object representation to.
-