public abstract class CookedLibRepository extends Object implements Repository
Modifier and Type | Field and Description |
---|---|
protected String[] |
fileNames |
protected File |
rootLocation |
Constructor and Description |
---|
CookedLibRepository(String installRoot)
Creates a new instance of CookedLibRepository
|
Modifier and Type | Method and Description |
---|---|
void |
add(ModuleDefinition definition)
Adds a new module
|
ModuleDefinition |
find(String name,
String version)
Finds and returns a
DefaultModuleDefinition instance
for a module given the name and version constraints. |
abstract List<ModuleDefinition> |
findAll()
Returns a list of all modules available in this repository
|
List<ModuleDefinition> |
findAll(String name)
Finds and returns a list of all the available versions of a
module given its name.
|
URI |
getLocation()
Returns the repository location
|
String |
getName()
Returns the repository name
|
abstract void |
initialize()
Initialize the repository for use.
|
void |
shutdown()
Shutdown the repository.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, getJarLocations, removeListener
public CookedLibRepository(String installRoot)
public String getName()
getName
in interface Repository
public URI getLocation()
getLocation
in interface Repository
public ModuleDefinition find(String name, String version)
DefaultModuleDefinition
instance
for a module given the name and version constraints.find
in interface Repository
name
- the requested module nameversion
- the requestion module versionDefaultModuleDefinition
or null if not found
in this repository.public abstract List<ModuleDefinition> findAll()
findAll
in interface Repository
public List<ModuleDefinition> findAll(String name)
findAll
in interface Repository
name
- the requested module namepublic abstract void initialize() throws IOException
initialize
in interface Repository
IOException
- if an error occur accessing the repositorypublic void add(ModuleDefinition definition) throws IOException
IOException
public void shutdown() throws IOException
shutdown
in interface Repository
IOException
- if an error occur accessing the repositoryCopyright © 2009–2023 Oracle Corporation. All rights reserved.