public class DefaultXStreamManager extends Object implements XStreamManager
XStreamManager
.Modifier and Type | Class and Description |
---|---|
static class |
DefaultXStreamManager.PluginXStreams
Internal class that maintains mappings from plugins to corresponding XStreams
|
Constructor and Description |
---|
DefaultXStreamManager(com.atlassian.plugin.PluginAccessor pluginAccessor,
com.atlassian.plugin.event.PluginEventManager pluginEventManager,
XStreamFactory xStreamFactory) |
Modifier and Type | Method and Description |
---|---|
Object |
fromXML(String xml)
Convert the xml into a java Object instance
|
Object |
fromXML(String pluginKey,
String serializedData)
Convert 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 |
postConstruct() |
String |
toXML(Object object)
Convert the java object into its XML form
|
void |
toXML(Object object,
OutputStream outputStream)
Convert the java object into its XML form and stream it to the output stream provided.
|
public DefaultXStreamManager(@NotNull com.atlassian.plugin.PluginAccessor pluginAccessor, @Nullable com.atlassian.plugin.event.PluginEventManager pluginEventManager, @NotNull XStreamFactory xStreamFactory)
public static DefaultXStreamManager getNonPluginAwareInstance(XStreamFactory xStreamFactory)
DefaultXStreamManager
.@PostConstruct public void postConstruct()
public Object fromXML(String xml)
XStreamManager
fromXML
in interface XStreamManager
xml
- The xml representation of the objectpublic Object fromXML(String pluginKey, String serializedData)
XStreamManager
fromXML
in interface XStreamManager
pluginKey
- plugin key defining the plugin context of the marshalled classserializedData
- XML datapublic String toXML(Object object)
XStreamManager
toXML
in interface XStreamManager
object
- The objectpublic void toXML(Object object, OutputStream outputStream)
XStreamManager
toXML
in interface XStreamManager
object
- The objectoutputStream
- stream to write object representation to.Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.