|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.common.resource.ResourceProvider
public abstract class ResourceProvider
BaseClass for various types of ResourceProviders: E.g.: - FileResourceProvider - ClassPathResourceProvider - HttpResourceProvider - DatabaseResourceProvider Multiple ResourceProviders are used by a ResourceResolver to resolve a resource name and load a resource requested by the ResourceManager.
| Field Summary | |
|---|---|
static java.lang.String |
PROTOCOL_PREFIX_SEPARATOR
|
protected org.springframework.core.io.ResourceLoader |
resourceLoader
Resource loader used by this provider |
| Constructor Summary | |
|---|---|
protected |
ResourceProvider(int priority,
org.springframework.core.io.ResourceLoader resourceLoader)
Constructor. |
| Method Summary | |
|---|---|
java.lang.String |
applyPrefix(java.lang.String resourceLocation)
Applies the protocl prefix to the given resource location. |
java.lang.String |
getPrefix()
Protocol prefix of this provider |
int |
getPriority()
Gets the priority of this provider; small numbers will be tried before larger numbers. |
abstract org.springframework.core.io.Resource |
getResource(java.lang.String resourceLocation)
Gets a resource. |
org.springframework.core.io.ResourceLoader |
getResourceLoader()
Gets the resource loader used by this provider. |
boolean |
hasPrefix(java.lang.String resourceLocation)
Checks if a resourceName is prefixed with a protocol. |
void |
setPriority(int priority)
Sets the priority of this provider; small numbers will be tried before larger numbers. |
void |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
Sets the resource loader used by this provider. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PROTOCOL_PREFIX_SEPARATOR
protected org.springframework.core.io.ResourceLoader resourceLoader
| Constructor Detail |
|---|
protected ResourceProvider(int priority,
org.springframework.core.io.ResourceLoader resourceLoader)
priority - Priority of the providerresourceLoader - Resource loader| Method Detail |
|---|
public abstract org.springframework.core.io.Resource getResource(java.lang.String resourceLocation)
throws ResourceMgrException
resourceLocation - Resource location
ResourceMgrException - If the provider is unable to find the specified resourcepublic java.lang.String getPrefix()
public boolean hasPrefix(java.lang.String resourceLocation)
resourceLocation - Spring framework-style resource location
public java.lang.String applyPrefix(java.lang.String resourceLocation)
resourceLocation - Resource
public org.springframework.core.io.ResourceLoader getResourceLoader()
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
public int getPriority()
public void setPriority(int priority)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||