|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.common.resource.ResourceProvider
org.openbp.common.resource.FileResourceProvider
public class FileResourceProvider
Provides access to file system-based resources. Resources are retrieved from the file system from a resource directory. A Spring ResourceLoader is used to retrieve file resources. Multiple FileResourceProviders-Obects can be registered with a common ResourceResolver. This is used by the ResourceResolver to implement a "match-first" strategy, where multiple sources for resources can be configured (with multiple ResourceProviders) and the first match is returned.
| Field Summary |
|---|
| Fields inherited from class org.openbp.common.resource.ResourceProvider |
|---|
PROTOCOL_PREFIX_SEPARATOR, resourceLoader |
| Constructor Summary | |
|---|---|
FileResourceProvider(int priority,
org.springframework.core.io.ResourceLoader loader,
java.lang.String resourceDir)
Constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
getPrefix()
Protocol prefix of this provider |
org.springframework.core.io.Resource |
getResource(java.lang.String resourceLocation)
file based resources are first matched with the root dir name |
java.lang.String |
getResourceDir()
Gets the directory to load the resource files from. |
void |
setResourceDir(java.lang.String resourceDir)
Sets the directory to load the resource files from. |
java.lang.String |
toString()
|
| Methods inherited from class org.openbp.common.resource.ResourceProvider |
|---|
applyPrefix, getPriority, getResourceLoader, hasPrefix, setPriority, setResourceLoader |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileResourceProvider(int priority,
org.springframework.core.io.ResourceLoader loader,
java.lang.String resourceDir)
priority - Priority of the providerloader - LoaderresourceDir - Resource dir| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Object
public org.springframework.core.io.Resource getResource(java.lang.String resourceLocation)
throws ResourceMgrException
getResource in class ResourceProviderresourceLocation - Resource location
ResourceMgrException - If the provider is unable to find the specified resourcepublic java.lang.String getPrefix()
ResourceProvider
getPrefix in class ResourceProviderpublic java.lang.String getResourceDir()
public void setResourceDir(java.lang.String resourceDir)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||