public interface ResourceManager
ResourceManager
queries registered
ResourceResolver
to find resources.Modifier and Type | Method and Description |
---|---|
void |
addResourceResolver(ResourceResolver resolver)
Add a
ResourceResolver . |
InputStream |
getResourceAsStream(String name)
Open stream to resource.
|
List<ResourceResolver> |
getResourceResolvers()
Get all the currently registered resolvers.
|
void |
removeResourceResolver(ResourceResolver resolver)
Remove a
ResourceResolver . |
<T> T |
resolveResource(String name,
Class<T> type)
Resolve a resource.
|
<T> T |
resolveResource(String name,
Class<T> type,
List<ResourceResolver> resolvers)
Resolve a resource with via a specified list of resovlers.
|
<T> T resolveResource(String name, Class<T> type)
ResourceResovler
objects until one
manages to resolve the resourcename
- name of resource to resolve.type
- type of resource to resolve.<T> T resolveResource(String name, Class<T> type, List<ResourceResolver> resolvers)
name
- name of resource to resolve.type
- type of resource to resolve.resolvers
- list of ResourceResolvers to search.
InputStream getResourceAsStream(String name)
name
- name of resource to resolve.void addResourceResolver(ResourceResolver resolver)
ResourceResolver
. The newly added resolver
is added at the head of the list so the most recently added
will be queried first.resolver
- the ResourceResolver
to
add. Duplicates will be ignored.void removeResourceResolver(ResourceResolver resolver)
ResourceResolver
.resolver
- the ResourceResolver
to remove.
If not previously registered, it is ignored.List<ResourceResolver> getResourceResolvers()
Copyright © 2016 JBoss by Red Hat. All rights reserved.