@ProviderType
public interface PackageRegistry
PackageManager and
JcrPackageManager. It defines storage independent methods to
register (upload), enumerate and remove packages. The installation lifecycle of the packages is provided via
ExecutionPlans.| Modifier and Type | Method and Description |
|---|---|
DependencyReport |
analyzeDependencies(PackageId id,
boolean onlyInstalled)
Creates a dependency report that lists the resolved and unresolved dependencies.
|
boolean |
contains(PackageId id)
Checks if this registry contains the package with the given id.
|
ExecutionPlanBuilder |
createExecutionPlan()
Creates a new execution plan builder.
|
RegisteredPackage |
open(PackageId id)
Opens the package with the given id.
|
java.util.Set<PackageId> |
packages()
Returns as set of all packages registered in this registry.
|
PackageId |
register(java.io.File file,
boolean replace)
Registers a package provided via a file.
|
PackageId |
register(java.io.InputStream in,
boolean replace)
Registers a package provided via an input stream.
|
PackageId |
registerExternal(java.io.File file,
boolean replace)
Registers a package provided via an external file.
|
void |
remove(PackageId id)
Removes the package from this registry.
|
PackageId |
resolve(Dependency dependency,
boolean onlyInstalled)
Tries to resolve the given dependency and returns the id of the package that matches the dependency filter best.
|
PackageId[] |
usage(PackageId id)
Returns the package ids of installed packages that depend on the given package.
|
boolean contains(@Nonnull
PackageId id)
throws java.io.IOException
id - the package id.true if the package is registered.java.io.IOException - if an I/O error occurrs.@Nonnull java.util.Set<PackageId> packages() throws java.io.IOException
java.io.IOException - if an I/O error occurrs.@Nullable RegisteredPackage open(@Nonnull PackageId id) throws java.io.IOException
id - the package idnull if it does not exists.java.io.IOException - if an I/O error occurrs.@Nonnull PackageId register(@Nonnull java.io.InputStream in, boolean replace) throws java.io.IOException, PackageExistsException
replace is set to false. otherwise the existing package is replaced.in - the input stream to the package datareplace - true if existing package should be replaced.java.io.IOException - if an I/O error occurrs.PackageExistsException - if the package exists and replace is false.@Nonnull PackageId register(@Nonnull java.io.File file, boolean replace) throws java.io.IOException, PackageExistsException
replace is set to false; otherwise the existing package is replaced.file - the file to the package datareplace - true if existing package should be replaced.java.io.IOException - if an I/O error occurrs.PackageExistsException - if the package exists and replace is false.@Nonnull PackageId registerExternal(@Nonnull java.io.File file, boolean replace) throws java.io.IOException, PackageExistsException
replace is set to false; otherwise the existing package is replaced.file - the file to the package data.replace - true if existing package should be replaced.java.io.IOException - if an I/O error occurrs.PackageExistsException - if the package exists and replace is false.void remove(@Nonnull
PackageId id)
throws java.io.IOException,
NoSuchPackageException
id - the id of the package to removejava.io.IOException - if an I/O error occurrs.NoSuchPackageException - if the package does not exist@Nonnull DependencyReport analyzeDependencies(@Nonnull PackageId id, boolean onlyInstalled) throws java.io.IOException, NoSuchPackageException
id - the package id.onlyInstalled - if true only installed packages are used for resolutionjava.io.IOException - if an error accessing the repository occurrsNoSuchPackageException - if the package with the given id does not exist.@Nullable PackageId resolve(@Nonnull Dependency dependency, boolean onlyInstalled) throws java.io.IOException
dependency - the dependency to resolve against.onlyInstalled - if true only installed packages are respected.nulljava.io.IOException - if an I/O error occurrs.@Nonnull PackageId[] usage(@Nonnull PackageId id) throws java.io.IOException
id - the package id to search forjava.io.IOException - if an I/O error occurs.@Nonnull ExecutionPlanBuilder createExecutionPlan()
Copyright © 2010 - 2023 Adobe. All Rights Reserved