java.lang.Object
cloud.piranha.resource.DefaultResourceManager
- All Implemented Interfaces:
ResourceManager
The default ResourceManager.
- Author:
- Manfred Riem ([email protected])
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addResource(Resource resource)
Add resource.Returns all the locations for this resource manager.getResource(String location)
Get the resource URL.getResourceAsStream(String location)
Get the resource as a stream.Returns all the locations for this resource manager.getResources(String location)
Get the resources.
-
Constructor Details
-
DefaultResourceManager
public DefaultResourceManager()
-
-
Method Details
-
addResource
Add resource.- Specified by:
addResource
in interfaceResourceManager
- Parameters:
resource
- the resource.
-
getResource
Get the resource URL.- Specified by:
getResource
in interfaceResourceManager
- Parameters:
location
- the location.- Returns:
- the URL, or null if not found.
- Throws:
MalformedURLException
- when the location URL is malformed.
-
getResources
Get the resources.- Specified by:
getResources
in interfaceResourceManager
- Parameters:
location
- the location.- Returns:
- the collection with the resources.
- Throws:
MalformedURLException
- when the location URL is malformed.
-
getResourceAsStream
Get the resource as a stream.- Specified by:
getResourceAsStream
in interfaceResourceManager
- Parameters:
location
- the location.- Returns:
- the input stream, or null if not found.
-
getAllLocations
Description copied from interface:ResourceManager
Returns all the locations for this resource manager.- Specified by:
getAllLocations
in interfaceResourceManager
- Returns:
- all the locations for this resource manager
-
getResourceList
Description copied from interface:ResourceManager
Returns all the locations for this resource manager.- Specified by:
getResourceList
in interfaceResourceManager
- Returns:
- all the locations for this resource manager
-