com.atlassian.plugin.util.resource
Class AlternativeDirectoryResourceLoader
java.lang.Object
com.atlassian.plugin.util.resource.AlternativeDirectoryResourceLoader
- All Implemented Interfaces:
- AlternativeResourceLoader
public class AlternativeDirectoryResourceLoader
- extends java.lang.Object
- implements AlternativeResourceLoader
Loads resources from directories configured via the system property plugin.resource.directories, which should
be a comma-delimited list of file paths that contain resources to load.
- Since:
- 2.2.0
|
Method Summary |
java.net.URL |
getResource(java.lang.String path)
Retrieve the URL of the resource from the directories. |
java.io.InputStream |
getResourceAsStream(java.lang.String name)
Load a given resource from the directories. |
java.util.List<java.io.File> |
getResourceDirectories()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PLUGIN_RESOURCE_DIRECTORIES
public static final java.lang.String PLUGIN_RESOURCE_DIRECTORIES
- See Also:
- Constant Field Values
AlternativeDirectoryResourceLoader
public AlternativeDirectoryResourceLoader()
getResource
public java.net.URL getResource(java.lang.String path)
- Retrieve the URL of the resource from the directories.
- Specified by:
getResource in interface AlternativeResourceLoader
- Parameters:
path - the name of the resource to be loaded
- Returns:
- The URL to the resource, or null if the resource is not found
getResourceAsStream
public java.io.InputStream getResourceAsStream(java.lang.String name)
- Load a given resource from the directories.
- Specified by:
getResourceAsStream in interface AlternativeResourceLoader
- Parameters:
name - The name of the resource to be loaded.
- Returns:
- An InputStream for the resource, or null if the resource is not found.
getResourceDirectories
public java.util.List<java.io.File> getResourceDirectories()
Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.