public abstract class CookedLibRepository extends java.lang.Object implements Repository
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
fileNames |
protected java.io.File |
rootLocation |
Constructor and Description |
---|
CookedLibRepository(java.lang.String installRoot)
Creates a new instance of CookedLibRepository
|
Modifier and Type | Method and Description |
---|---|
void |
add(ModuleDefinition definition)
Adds a new module
|
ModuleDefinition |
find(java.lang.String name,
java.lang.String version)
Finds and returns a
DefaultModuleDefinition instance
for a module given the name and version constraints. |
abstract java.util.List<ModuleDefinition> |
findAll()
Returns a list of all modules available in this repository
|
java.util.List<ModuleDefinition> |
findAll(java.lang.String name)
Finds and returns a list of all the available versions of a
module given its name.
|
java.net.URI |
getLocation()
Returns the repository location
|
java.lang.String |
getName()
Returns the repository name
|
abstract void |
initialize()
Initialize the repository for use.
|
void |
shutdown()
Shutdown the repository.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, getJarLocations, removeListener
protected final java.io.File rootLocation
protected java.lang.String[] fileNames
public CookedLibRepository(java.lang.String installRoot)
public java.lang.String getName()
getName
in interface Repository
public java.net.URI getLocation()
getLocation
in interface Repository
public ModuleDefinition find(java.lang.String name, java.lang.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 java.util.List<ModuleDefinition> findAll()
findAll
in interface Repository
public java.util.List<ModuleDefinition> findAll(java.lang.String name)
findAll
in interface Repository
name
- the requested module namepublic abstract void initialize() throws java.io.IOException
initialize
in interface Repository
java.io.IOException
- if an error occur accessing the repositorypublic void add(ModuleDefinition definition) throws java.io.IOException
java.io.IOException
public void shutdown() throws java.io.IOException
shutdown
in interface Repository
java.io.IOException
- if an error occur accessing the repositorypublic java.lang.String toString()
toString
in class java.lang.Object