Package com.sun.enterprise.module.impl
Class CookedLibRepository
- java.lang.Object
-
- com.sun.enterprise.module.impl.CookedLibRepository
-
- All Implemented Interfaces:
Repository
public abstract class CookedLibRepository extends java.lang.Object implements Repository
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String[]fileNamesprotected java.io.FilerootLocation
-
Constructor Summary
Constructors Constructor Description CookedLibRepository(java.lang.String installRoot)Creates a new instance of CookedLibRepository
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidadd(ModuleDefinition definition)Adds a new moduleModuleDefinitionfind(java.lang.String name, java.lang.String version)Finds and returns aDefaultModuleDefinitioninstance for a module given the name and version constraints.abstract java.util.List<ModuleDefinition>findAll()Returns a list of all modules available in this repositoryjava.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.URIgetLocation()Returns the repository locationjava.lang.StringgetName()Returns the repository nameabstract voidinitialize()Initialize the repository for use.voidshutdown()Shutdown the repository.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.sun.enterprise.module.Repository
addListener, getJarLocations, removeListener
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the repository name- Specified by:
getNamein interfaceRepository- Returns:
- repository name
-
getLocation
public java.net.URI getLocation()
Returns the repository location- Specified by:
getLocationin interfaceRepository- Returns:
- the URL for the repository location
-
find
public ModuleDefinition find(java.lang.String name, java.lang.String version)
Finds and returns aDefaultModuleDefinitioninstance for a module given the name and version constraints.- Specified by:
findin interfaceRepository- Parameters:
name- the requested module nameversion- the requestion module version- Returns:
- a
DefaultModuleDefinitionor null if not found in this repository.
-
findAll
public abstract java.util.List<ModuleDefinition> findAll()
Returns a list of all modules available in this repository- Specified by:
findAllin interfaceRepository- Returns:
- a list of available modules
-
findAll
public 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.- Specified by:
findAllin interfaceRepository- Parameters:
name- the requested module name
-
initialize
public abstract void initialize() throws java.io.IOExceptionInitialize the repository for use. This need to be called at least once before any find methods is invoked.- Specified by:
initializein interfaceRepository- Throws:
java.io.IOException- if an error occur accessing the repository
-
add
public void add(ModuleDefinition definition) throws java.io.IOException
Adds a new module- Throws:
java.io.IOException
-
shutdown
public void shutdown() throws java.io.IOExceptionShutdown the repository. After this call return, the find methods cannot be used until initialize() is called again.- Specified by:
shutdownin interfaceRepository- Throws:
java.io.IOException- if an error occur accessing the repository
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-