Class EntityObjectsToXmlWriter
- java.lang.Object
-
- com.atlassian.confluence.impl.backuprestore.backup.container.EntityObjectsToXmlWriter
-
- All Implemented Interfaces:
AutoCloseable
public class EntityObjectsToXmlWriter extends Object implements AutoCloseable
Implementation of EntityObjectsWriter that coverts objects to XML stream (the same way as the legacy XML writer does). The only difference is that it provides better formatting. It does not support multi-threading, so for parallel converting, a few converters (with separate writers) should be instantiated.- Since:
- 7.20.0
-
-
Constructor Summary
Constructors Constructor Description EntityObjectsToXmlWriter(Writer writer, Instant currentTime)
EntityObjectsToXmlWriter(Writer writer, Instant currentTime, int characterLimit)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addClass(Class<?> clazz)
void
close()
static String
qualifier(String qualifiedName)
void
serialise(Collection<EntityObjectReadyForExport> objectsToSerialise)
Thread-safe serialisation of the objects collection.static String
unqualify(String qualifiedName)
static String
unqualify(String qualifiedName, String separator)
-
-
-
Constructor Detail
-
EntityObjectsToXmlWriter
public EntityObjectsToXmlWriter(Writer writer, Instant currentTime, int characterLimit) throws IOException
- Throws:
IOException
-
EntityObjectsToXmlWriter
public EntityObjectsToXmlWriter(Writer writer, Instant currentTime) throws IOException
- Throws:
IOException
-
-
Method Detail
-
serialise
public void serialise(Collection<EntityObjectReadyForExport> objectsToSerialise) throws IOException
Thread-safe serialisation of the objects collection.- Throws:
IOException
-
addClass
protected final void addClass(Class<?> clazz) throws IOException
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-
-