Class ConfluenceXStreamImpl
- java.lang.Object
-
- com.atlassian.confluence.impl.xstream.ConfluenceXStreamImpl
-
- All Implemented Interfaces:
ConfluenceXStream,ConfluenceXStreamInternal
@Internal public class ConfluenceXStreamImpl extends Object implements ConfluenceXStreamInternal
Default Confluence XStream implementation which adds an XStream 1.1.1 storage compatibility layer.- Since:
- 7.10.0
-
-
Constructor Summary
Constructors Constructor Description ConfluenceXStreamImpl(com.thoughtworks.xstream.XStream xStreamPrimary, com.thoughtworks.xstream.XStream xStreamSecondary)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidalias(String alias, Class aliasClass)voidallowTypes(String[] toArray)voidallowTypesByRegExp(String[] toArray)voidallowTypesByWildcard(String[] toArray)ObjectfromXML(Reader reader)Deserialize an object from an XML Reader.ObjectfromXML(String xml)Deserialize an object from an XML String.com.thoughtworks.xstream.XStreamgetXStream()Always try to return XStream111 till the time it is supported in Confluence.voidregisterConverter(com.thoughtworks.xstream.converters.Converter converter, Integer integer)voidsetUpDefaultSecurity()StringtoXML(Object obj)Serialize an object to a pretty-printed XML String.voidtoXML(Object obj, Writer writer)Serialize an object to the given Writer as pretty-printed XML.
-
-
-
Method Detail
-
toXML
public String toXML(Object obj)
Description copied from interface:ConfluenceXStreamSerialize an object to a pretty-printed XML String.- Specified by:
toXMLin interfaceConfluenceXStream
-
toXML
public void toXML(Object obj, Writer writer)
Description copied from interface:ConfluenceXStreamSerialize an object to the given Writer as pretty-printed XML. The Writer will be flushed afterwards and in case of an exception.- Specified by:
toXMLin interfaceConfluenceXStream
-
fromXML
public Object fromXML(String xml)
Description copied from interface:ConfluenceXStreamDeserialize an object from an XML String.- Specified by:
fromXMLin interfaceConfluenceXStream
-
fromXML
public Object fromXML(Reader reader)
Description copied from interface:ConfluenceXStreamDeserialize an object from an XML Reader.- Specified by:
fromXMLin interfaceConfluenceXStream
-
getXStream
public com.thoughtworks.xstream.XStream getXStream()
Always try to return XStream111 till the time it is supported in Confluence. This helps plugin developer to have Confluence backed XStream with backward compatibility.- Specified by:
getXStreamin interfaceConfluenceXStreamInternal- Returns:
- Stream's 1.1.1 storage compatible instance.
-
registerConverter
public void registerConverter(com.thoughtworks.xstream.converters.Converter converter, Integer integer)- Specified by:
registerConverterin interfaceConfluenceXStreamInternal
-
alias
public void alias(String alias, Class aliasClass)
- Specified by:
aliasin interfaceConfluenceXStreamInternal
-
setUpDefaultSecurity
public void setUpDefaultSecurity()
- Specified by:
setUpDefaultSecurityin interfaceConfluenceXStreamInternal
-
allowTypes
public void allowTypes(String[] toArray)
- Specified by:
allowTypesin interfaceConfluenceXStreamInternal
-
allowTypesByWildcard
public void allowTypesByWildcard(String[] toArray)
- Specified by:
allowTypesByWildcardin interfaceConfluenceXStreamInternal
-
allowTypesByRegExp
public void allowTypesByRegExp(String[] toArray)
- Specified by:
allowTypesByRegExpin interfaceConfluenceXStreamInternal
-
-