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

public abstract class XmlStore<T> extends Object
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 Details

    • readObjects

      public List<T> readObjects() throws IOException
      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

      public void writeObjects(List<T> list) throws IOException
      Writes objects to the XML file.
      Parameters:
      list - the list of objects to write
      Throws:
      IOException - if writing fails