com.atlassian.bamboo.persister.xstream
Class XStreamManager

java.lang.Object
  extended by com.atlassian.bamboo.persister.xstream.XStreamManager

public class XStreamManager
extends java.lang.Object

Common XStream persistence behaviour


Field Summary
protected  com.thoughtworks.xstream.XStream myXstream
           
 
Constructor Summary
XStreamManager()
          Initialise with all the Bamboo xml aliases - to make the XML easier to read and improve the refactoring...
 
Method Summary
 java.lang.Object fromXML(java.lang.String xml)
          Convert the xml into a java Object instance
 com.thoughtworks.xstream.converters.Converter getDefaultConverter()
           
protected  void init()
           
 void registerClassAlias(java.lang.String xmlTag, java.lang.Class tagClass)
          Register an the given xmlTag as an alias for persisting the given tagClass.
 void registerConverter(com.thoughtworks.xstream.converters.Converter converter)
           
 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

myXstream

protected com.thoughtworks.xstream.XStream myXstream
Constructor Detail

XStreamManager

public XStreamManager()
Initialise with all the Bamboo xml aliases - to make the XML easier to read and improve the refactoring...

Method Detail

init

protected void init()

registerClassAlias

public void registerClassAlias(java.lang.String xmlTag,
                               java.lang.Class tagClass)
Register an the given xmlTag as an alias for persisting the given tagClass.

Parameters:
xmlTag - The xml tag name
tagClass - The class represented by the tag

getDefaultConverter

public com.thoughtworks.xstream.converters.Converter getDefaultConverter()

registerConverter

public void registerConverter(com.thoughtworks.xstream.converters.Converter converter)

fromXML

public java.lang.Object fromXML(java.lang.String xml)
Convert the xml into a java Object instance

Parameters:
xml - The xml representation of the object
Returns:
The object

toXML

public java.lang.String toXML(java.lang.Object object)
Convert the java object into its XML form

Parameters:
object - The object
Returns:
XML representation of the object


Copyright © 2011 Atlassian. All Rights Reserved.