Class DependenciesXmlStore

java.lang.Object
org.pgcodekeeper.core.xmlstore.XmlStore<PgLibrary>
org.pgcodekeeper.core.xmlstore.DependenciesXmlStore

public class DependenciesXmlStore extends XmlStore<PgLibrary>
XML store for managing database library dependencies. Handles reading and writing of library dependency configurations including library paths, names, privilege settings, and nested loading options.
Do not call writeObjects(List) on this class, doing that won't save additional library options.
Call writeDependencies(List, boolean) instead.
  • Field Details

  • Constructor Details

    • DependenciesXmlStore

      public DependenciesXmlStore(Path path)
      Creates a new dependencies XML store for the specified path.
      Parameters:
      path - the path to the dependencies XML file
  • Method Details

    • getXmlFile

      public Path getXmlFile()
    • readLoadNestedFlag

      public boolean readLoadNestedFlag() throws IOException
      Reads the load nested flag from the XML file.
      Returns:
      true if nested loading is enabled, false if disabled or file doesn't exist
      Throws:
      IOException - if reading fails
    • writeObjects

      public void writeObjects(List<PgLibrary> list)
      Do not call this method, use writeDependencies(List, boolean) instead.
      Overrides:
      writeObjects in class XmlStore<PgLibrary>
      Parameters:
      list - the list parameter (ignored)
    • writeDependencies

      public void writeDependencies(List<PgLibrary> dependencies, boolean loadNestedFlag) throws IOException
      Writes library dependencies to XML file with load nested flag.
      Parameters:
      dependencies - the list of library dependencies to write
      loadNestedFlag - whether to enable nested loading
      Throws:
      IOException - if writing fails