|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.excalibur.extension.PackageManager
Basic Implementation Of PackageManager Interface used to manage "Optional Packages" (formerly known as "Standard Extensions"). The "Optional Packages" are stored on file system in a number of directories.
PackageRepository
Constructor Summary | |
PackageManager(PackageRepository repository)
Construct a PackageManager for a repositories. |
Method Summary | |
OptionalPackage |
getOptionalPackage(Extension extension)
Return the OptionalPackage that provides specified
Extension . |
OptionalPackage[] |
scanDependencies(Extension[] required,
Extension[] available)
Build a list of dependencies based on specified Extension . |
void |
scanDependencies(Extension[] required,
Extension[] available,
java.util.List dependencies,
java.util.List unsatisfied)
Build a list of dependencies based on specified Extension s. |
OptionalPackage[] |
scanDependencies(Extension required,
Extension[] available)
Build a list of dependencies based on specified Extension s. |
void |
scanDependencies(Extension required,
Extension[] available,
java.util.List dependencies,
java.util.List unsatisfied)
Build a list of dependencies based on specified Extension . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PackageManager(PackageRepository repository)
repository
- the repository to use in PackageManagerMethod Detail |
public OptionalPackage getOptionalPackage(Extension extension)
OptionalPackage
that provides specified
Extension
. If the specified Extension
can not be found then null
is returned. If there is
multiple implementations that satisfy Extension
,
then an OptionalPackage
returned is based on the
following heristic;
Return the first Optional Package. (This heuristic will be replaced in time).
extension
- Description of the extension that needs to be provided by
optional packageOptionalPackage
,
Extension
public OptionalPackage[] scanDependencies(Extension required, Extension[] available) throws UnsatisfiedExtensionException
Extension
s.
Each specified Extension
is expected to be a required extension
of another "Optional Package".
If the required Extension
can not be found locally then
an UnsatisfiedPackageException is thrown. if an OptionalPackage
is found locally that satisfies specified required Extension
then it is returned in the array of OptionalPackages. scanDependencies() is then recursively
called on all of the candidates required extensions.
required
- the array of required Extensions.available
- the array of Extensions already available to caller.UnsatisfiedPackageException
- if unable to satisfy all extensionsscanDependencies(org.apache.avalon.excalibur.extension.Extension, org.apache.avalon.excalibur.extension.Extension[])
public OptionalPackage[] scanDependencies(Extension[] required, Extension[] available) throws UnsatisfiedExtensionException
Extension
.
The specified Extension
is expected to be a required extension
of another "Optional Package".
If the required Extension
can not be found locally then
an UnsatisfiedPackageException is thrown. if an OptionalPackage
is found locally that satisfies specified required Extension
then it is returned in the array of OptionalPackages. scanDependencies() is then recursively
called on all of the candidates required extensions.
required
- the array of required Extensions.available
- the array of Extensions already available to caller.UnsatisfiedPackageException
- if unable to satisfy all extensionsscanDependencies(org.apache.avalon.excalibur.extension.Extension, org.apache.avalon.excalibur.extension.Extension[])
public void scanDependencies(Extension[] required, Extension[] available, java.util.List dependencies, java.util.List unsatisfied)
Extension
s.
Each specified Extension
is expected to be a required extension
of another "Optional Package".
If the required Extension
can not be found locally then
it is placed in list of unsatisfied Extensions. If a candidate Extension
is found locally that satisfies specified required Extension
then it is added to list of dependencies. scanDependencies() is then recursively
called on all of the candidates required extensions.
required
- the array of required Extensions.available
- the array of Extensions already available to caller.dependencies
- the list of dependencies.unsatisfied
- the list of unsatisfied (ie non-local) dependencies.scanDependencies(org.apache.avalon.excalibur.extension.Extension, org.apache.avalon.excalibur.extension.Extension[])
public void scanDependencies(Extension required, Extension[] available, java.util.List dependencies, java.util.List unsatisfied)
Extension
.
The specified Extension
is expected to be a required extension
of another "Optional Package".
If the required Extension
can not be found locally then
it is placed in list of unsatisfied Extensions. If a candidate OptionalPackage
is found locally that satisfies specified required Extension
then it is added to list of dependencies. scanDependencies() is then recursively
called on all of the candidates required extensions.
required
- the required Extension.available
- the array of Extensions already available to caller.dependencies
- the list of OptionalPackages required to satisfy extension.unsatisfied
- the list of unsatisfied (ie non-local) dependencies.scanDependencies(org.apache.avalon.excalibur.extension.Extension, org.apache.avalon.excalibur.extension.Extension[])
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |