|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.extension.manager.impl.DefaultExtensionManager
Interface used to contain "Optional Packages" (formerly known as "Standard Extensions"). It is assumed that each "Optional Package" is represented by a single file on the file system. This Repository searches a path to find the Optional Packages.
OptionalPackage
,
ExtensionManager
Field Summary |
Fields inherited from interface org.apache.avalon.extension.manager.ExtensionManager |
ROLE |
Constructor Summary | |
DefaultExtensionManager()
Construct a package repository with no path specified. |
|
DefaultExtensionManager(File[] path)
Construct a package repository with path. |
Method Summary | |
protected void |
addPathElements(File[] path)
Add path elements to repository search path |
protected void |
addPathElements(String pathString)
Add path elements to repository search path. |
protected void |
addPathElements(String[] pathElements)
Add path elements to repository search path |
protected void |
cacheOptionalPackage(OptionalPackage optionalPackage)
Add OptionalPackage to internal cache of Optional Packages. |
protected void |
clearCache()
Clear internal cache of optional packages. |
protected void |
debug(String message)
Output a debug message for repository. |
protected OptionalPackage[] |
getAllOptionalPackages()
Return all the OptionalPackages stored in ExtensionManager. |
OptionalPackage[] |
getOptionalPackages(Extension extension)
Return all the OptionalPackage s that satisfy specified
Extension . |
File[] |
getPaths()
Return an array of path elements where each element in array represents a directory in which the ExtensionManager will look for Extensions. |
protected void |
scanPath()
Scan the path for this repository and reload all the "Optional Packages" found in the path. |
protected void |
setPath(File[] path)
Set the path for the Repository. |
protected void |
setPath(String pathString)
Set the path for the Repository. |
protected void |
setPath(String[] pathElements)
Set the path for the Repository. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultExtensionManager()
public DefaultExtensionManager(File[] path)
path
- The set of directories in which to look for Optional PackagesMethod Detail |
public File[] getPaths()
public OptionalPackage[] getOptionalPackages(Extension extension)
OptionalPackage
s that satisfy specified
Extension
. It is expected that this Extension
object will be one retrieved via getLocalExtension() method. If the
specified Extension
is not local then null
is returned.
getOptionalPackages
in interface ExtensionManager
extension
- the extension to search for
OptionalPackage
,
Extension
protected OptionalPackage[] getAllOptionalPackages()
protected void addPathElements(String[] pathElements)
pathElements
- the path elements to add to repository search pathprotected void addPathElements(File[] path)
path
- the path elements to add to repository search pathprotected void addPathElements(String pathString)
pathString
- the path elements to add to repository search pathprotected void setPath(String pathString)
pathString
- the list of directories in which to searchprotected void setPath(String[] pathElements)
pathElements
- the list of directories in which to searchprotected void setPath(File[] path)
path
- the list of directories in which to searchprotected final void scanPath()
protected final void clearCache()
protected final void cacheOptionalPackage(OptionalPackage optionalPackage)
optionalPackage
- the OptionalPackage to be added to repositoryprotected void debug(String message)
message
- the debug message
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |