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 void
alias(String alias, Class aliasClass)
void
allowTypes(String[] toArray)
void
allowTypesByRegExp(String[] toArray)
void
allowTypesByWildcard(String[] toArray)
Object
fromXML(Reader reader)
Deserialize an object from an XML Reader.Object
fromXML(String xml)
Deserialize an object from an XML String.com.thoughtworks.xstream.XStream
getXStream()
Always try to return XStream111 till the time it is supported in Confluence.void
registerConverter(com.thoughtworks.xstream.converters.Converter converter, Integer integer)
void
setUpDefaultSecurity()
String
toXML(Object obj)
Serialize an object to a pretty-printed XML String.void
toXML(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:ConfluenceXStream
Serialize an object to a pretty-printed XML String.- Specified by:
toXML
in interfaceConfluenceXStream
-
toXML
public void toXML(Object obj, Writer writer)
Description copied from interface:ConfluenceXStream
Serialize an object to the given Writer as pretty-printed XML. The Writer will be flushed afterwards and in case of an exception.- Specified by:
toXML
in interfaceConfluenceXStream
-
fromXML
public Object fromXML(String xml)
Description copied from interface:ConfluenceXStream
Deserialize an object from an XML String.- Specified by:
fromXML
in interfaceConfluenceXStream
-
fromXML
public Object fromXML(Reader reader)
Description copied from interface:ConfluenceXStream
Deserialize an object from an XML Reader.- Specified by:
fromXML
in 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:
getXStream
in interfaceConfluenceXStreamInternal
- Returns:
- Stream's 1.1.1 storage compatible instance.
-
registerConverter
public void registerConverter(com.thoughtworks.xstream.converters.Converter converter, Integer integer)
- Specified by:
registerConverter
in interfaceConfluenceXStreamInternal
-
alias
public void alias(String alias, Class aliasClass)
- Specified by:
alias
in interfaceConfluenceXStreamInternal
-
setUpDefaultSecurity
public void setUpDefaultSecurity()
- Specified by:
setUpDefaultSecurity
in interfaceConfluenceXStreamInternal
-
allowTypes
public void allowTypes(String[] toArray)
- Specified by:
allowTypes
in interfaceConfluenceXStreamInternal
-
allowTypesByWildcard
public void allowTypesByWildcard(String[] toArray)
- Specified by:
allowTypesByWildcard
in interfaceConfluenceXStreamInternal
-
allowTypesByRegExp
public void allowTypesByRegExp(String[] toArray)
- Specified by:
allowTypesByRegExp
in interfaceConfluenceXStreamInternal
-
-