Package org.pgcodekeeper.core.loader
Class LibraryLoader
java.lang.Object
org.pgcodekeeper.core.loader.DatabaseLoader
org.pgcodekeeper.core.loader.LibraryLoader
Database loader for external libraries and dependencies.
Loads database schemas from library sources including JAR files, directories, and XML dependency definitions.
Supports nested library loading and prevents circular dependencies.
-
Constructor Summary
ConstructorsConstructorDescriptionLibraryLoader(AbstractDatabase database, Path metaPath, List<Object> errors) Creates a new library loader with empty loaded paths set.LibraryLoader(AbstractDatabase database, Path metaPath, List<Object> errors, Set<String> loadedPaths) Creates a new library loader with specified loaded paths set. -
Method Summary
Modifier and TypeMethodDescriptionload()Not supported operation for library loader.voidloadLibraries(ISettings settings, boolean isIgnorePrivileges, Collection<String> paths) Loads libraries from the specified collection of paths.voidloadXml(DependenciesXmlStore xmlStore, ISettings settings) Loads libraries from XML dependency store configuration.Methods inherited from class org.pgcodekeeper.core.loader.DatabaseLoader
createDb, getErrors, loadAndAnalyze
-
Constructor Details
-
LibraryLoader
Creates a new library loader with empty loaded paths set.- Parameters:
database- the target database to load libraries intometaPath- path to metadata directoryerrors- list to collect loading errors
-
LibraryLoader
public LibraryLoader(AbstractDatabase database, Path metaPath, List<Object> errors, Set<String> loadedPaths) Creates a new library loader with specified loaded paths set.- Parameters:
database- the target database to load libraries intometaPath- path to metadata directoryerrors- list to collect loading errorsloadedPaths- set of already loaded library paths to prevent circular dependencies
-
-
Method Details
-
load
Not supported operation for library loader.- Specified by:
loadin classDatabaseLoader- Returns:
- the loaded database schema
- Throws:
IllegalStateException- always, as this operation is not supportedIOException- if database loading failsInterruptedException- if the loading process is interrupted
-
loadLibraries
public void loadLibraries(ISettings settings, boolean isIgnorePrivileges, Collection<String> paths) throws InterruptedException, IOException Loads libraries from the specified collection of paths.- Parameters:
settings- loader settings and configurationisIgnorePrivileges- whether to ignore privileges during loadingpaths- collection of library paths to load- Throws:
InterruptedException- if loading is interruptedIOException- if library loading fails
-
loadXml
public void loadXml(DependenciesXmlStore xmlStore, ISettings settings) throws InterruptedException, IOException Loads libraries from XML dependency store configuration.- Parameters:
xmlStore- the XML store containing dependency definitionssettings- loader settings and configuration- Throws:
InterruptedException- if loading is interruptedIOException- if XML loading fails
-