Package org.pgcodekeeper.core.xmlstore
Class XmlStore<T>
java.lang.Object
org.pgcodekeeper.core.xmlstore.XmlStore<T>
- Type Parameters:
T- the type of objects stored in this XML store
- Direct Known Subclasses:
DependenciesXmlStore
Abstract base class for XML-based object storage and retrieval.
Provides common functionality for reading and writing collections of objects
to XML files with proper validation and error handling.
-
Method Summary
Modifier and TypeMethodDescriptionReads all objects from the XML file.voidwriteObjects(List<T> list) Writes objects to the XML file.
-
Method Details
-
readObjects
Reads all objects from the XML file.- Returns:
- list of objects read from XML, empty list if file doesn't exist
- Throws:
IOException- if reading fails
-
writeObjects
Writes objects to the XML file.- Parameters:
list- the list of objects to write- Throws:
IOException- if writing fails
-