Class RegistrySerializer
java.lang.Object
org.nuxeo.connect.update.xml.XmlWriter
org.nuxeo.connect.update.task.update.RegistrySerializer
public class RegistrySerializer
extends org.nuxeo.connect.update.xml.XmlWriter
- Author:
- Bogdan Stefanescu
-
Field Summary
Fields inherited from class org.nuxeo.connect.update.xml.XmlWriter
depth, indent, sb, tab
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDe-serializes the given file into a Nuxeo packages registryprotected void
protected Entry
readEntryElement
(Element element) protected String
readKeyAttr
(Element element) protected String
readNameAttr
(Element element) protected String
readPathAttr
(Element element) protected Version
readVersionElement
(Element element) static void
Serializes the given registry into the given file.protected void
protected void
protected void
writeBaseVersion
(Version version) protected void
writeEntry
(Entry entry) protected void
writeVersion
(Version version) Methods inherited from class org.nuxeo.connect.update.xml.XmlWriter
attr, crlf, dec, element, end, end, getBuffer, inc, reset, start, startContent, text, toString, updateIndent, writeXmlDecl
-
Constructor Details
-
RegistrySerializer
public RegistrySerializer()- Since:
- 5.7
-
-
Method Details
-
store
Serializes the given registry into the given file.- Throws:
IOException
-
load
public static Map<String,Entry> load(File file) throws org.nuxeo.connect.update.PackageException, IOException De-serializes the given file into a Nuxeo packages registry- Returns:
- The Nuxeo packages registry described by the given file
- Throws:
org.nuxeo.connect.update.PackageException
IOException
-
read
protected Map<String,Entry> read(File file) throws org.nuxeo.connect.update.PackageException, IOException - Throws:
org.nuxeo.connect.update.PackageException
IOException
-
read
protected void read(Element element, Map<String, Entry> registry) throws org.nuxeo.connect.update.PackageException- Throws:
org.nuxeo.connect.update.PackageException
-
readEntryElement
- Throws:
org.nuxeo.connect.update.PackageException
-
readKeyAttr
- Throws:
org.nuxeo.connect.update.PackageException
-
readNameAttr
- Throws:
org.nuxeo.connect.update.PackageException
-
readPathAttr
- Throws:
org.nuxeo.connect.update.PackageException
-
readVersionElement
protected Version readVersionElement(Element element) throws org.nuxeo.connect.update.PackageException - Throws:
org.nuxeo.connect.update.PackageException
-
write
-
writeEntry
-
writeBaseVersion
-
writeVersion
-
write
- Parameters:
file
- Output file- Throws:
IOException
- Since:
- 5.7
-