|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.module.Repository sun.module.repository.ExpandedJamRepository
public class ExpandedJamRepository
Represents a repository whose contents are .jam files that have been expanded
into their directory structure. The URL of each .jam that is given to
install
is used as a directory name. The expansion is done into
the directory given as source
when the repository is created.
Constructor Summary | |
---|---|
ExpandedJamRepository(Repository parent,
String name,
URL source)
Creates a new instance of ExpandedJamRepository. |
Method Summary | |
---|---|
List<ModuleDefinition> |
findModuleDefinitions(Query constraint)
Find all matching module definitions in the repository. |
void |
initialize(Map<String,String> config)
Initializes the repository instance using the supplied configuration. |
ModuleArchiveInfo |
install(URL u)
Installs a .jam file by expanding it into a set of files and directories. |
boolean |
isActive()
Returns whether or not the repository instance is active. |
boolean |
isReadOnly()
Returns whether or not this repository is read-only. |
List<ModuleArchiveInfo> |
list()
Returns an unmodifiable list of the installed module archives' information in the repository. |
void |
reload()
Reload the repository. |
void |
shutdown()
Shutdown the repository. |
boolean |
uninstall(ModuleArchiveInfo m)
Uninstall a module archive from the repository. |
Methods inherited from class java.module.Repository |
---|
equals, find, find, find, findAll, getBootstrapRepository, getModuleSystem, getName, getParent, getSourceLocation, getSystemRepository, hashCode, initialize, shutdownOnExit, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExpandedJamRepository(Repository parent, String name, URL source)
ModuleDefinition
in the source directory, it is installed.
parent
- Parent of this repositoryname
- the name of this repositorysource
- the source location of this repository, which must be a writable directory
IllegalArgumentException
- if the source
does not refer to a writable directory.Method Detail |
---|
public List<ModuleDefinition> findModuleDefinitions(Query constraint)
Repository
If this repository instance has not been initialized when this method is called, it will be initialized automatically by calling the initialize method with no argument.
findModuleDefinitions
in class Repository
constraint
- the constraint.
IllegalStateException
- if the repository instance has
not been initialized or has been shutdown.Repository.findModuleDefinitions(Query).
public ModuleArchiveInfo install(URL u) throws IOException
install
in class Repository
u
- URL naming a JAM file.
ModuleArchiveInfo
object that represents
the installed module archive.
IOException
- if moduleDef
does not refer to a file, or if
if there is a problem while expanding the.jam. In the latter case,
any files or directories resulting from partially incomplete expansion
are not removed.Repository.install(URL moduleDef)
public void initialize(Map<String,String> config) throws IOException
Repository
This method will not modify config
or save a reference to
it, but may save a clone.
initialize
in class Repository
config
- - config used to initialize the repository instance.
IOException
- if an I/O error occurs.public void shutdown() throws IOException
Repository
checkPermission
method with a
ModuleSystemPermission("shutdownRepository")
permission
to ensure it's ok to shutdown a repository.
shutdown
in class Repository
IOException
- if an I/O error occurs.public boolean isReadOnly()
Repository
isReadOnly
in class Repository
public void reload() throws IOException
Repository
If a security manager is present, this method calls the
security manager's checkPermission
method with
a ModuleSystemPermission("reloadRepository")
permission to ensure it's ok to reload module
definitions in a repository.
reload
in class Repository
IOException
- If an error occurs while reloading the
module definitions.public boolean uninstall(ModuleArchiveInfo m) throws IOException
Repository
If a security manager is present, this method calls the
security manager's checkPermission
method with
a ModuleSystemPermission("uninstallModuleArchive")
permission to ensure it's ok to uninstall a module
archive from a repository.
uninstall
in class Repository
m
- the module archive to be uninstalled.
IOException
- If an error occurs while uninstalling the module archive.public List<ModuleArchiveInfo> list()
Repository
If a security manager is present, this method calls the
security manager's checkPermission
method with
a ModuleSystemPermission("listModuleArchive")
permission to ensure it's ok to return the information of the
installed module archives in a repository.
list
in class Repository
public boolean isActive()
Repository
A repository instance is active if it has been initialized but has not been shutdown.
isActive
in class Repository
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |