public final class LocalRepoLoaderImpl extends java.lang.Object implements LocalRepoLoader
LocalPackages under a given path based on package.xml
files.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PACKAGE_XML_FN
The name of the package metadata file we can read.
|
| Constructor and Description |
|---|
LocalRepoLoaderImpl(java.io.File root,
RepoManager manager,
FallbackLocalRepoLoader fallback,
FileOp fop)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getLatestPackageUpdateTime()
Gets the update timestamp of the most-recently updated installed package.
|
byte[] |
getLocalPackagesHash()
Gets a hash of the known (suspected) package directories.
|
java.util.Map<java.lang.String,LocalPackage> |
getPackages(ProgressIndicator progress)
Gets our packages, loading them if necessary.
|
public static final java.lang.String PACKAGE_XML_FN
public LocalRepoLoaderImpl(@NonNull
java.io.File root,
@NonNull
RepoManager manager,
@Nullable
FallbackLocalRepoLoader fallback,
@NonNull
FileOp fop)
root - The root directory under which we'll look for packages.manager - A RepoManager, notably containing the SchemaModules we'll use for
reading and writing LocalPackagesfallback - The FallbackLocalRepoLoader we'll use if we can't find a package in a
directory.fop - The FileOp to use for file operations. Should be
FileOpUtils.create() for normal operation.@Nullable public byte[] getLocalPackagesHash()
getLocalPackagesHash in interface LocalRepoLoaderpublic long getLatestPackageUpdateTime()
package.xml file.getLatestPackageUpdateTime in interface LocalRepoLoader@NonNull public java.util.Map<java.lang.String,LocalPackage> getPackages(@NonNull ProgressIndicator progress)
LocalRepoLoadergetPackages in interface LocalRepoLoaderprogress - A ProgressIndicator used to show progress (unimplemented) and
logging.LocalPackage, containing all the packages found in
the given root.