Class AlternativeDirectoryResourceLoader
java.lang.Object
com.atlassian.plugin.util.resource.AlternativeDirectoryResourceLoader
- All Implemented Interfaces:
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
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetResource(String path) Retrieve the URL of the resource from the directories.getResourceAsStream(String name) Load a given resource from the directories.
-
Field Details
-
PLUGIN_RESOURCE_DIRECTORIES
- See Also:
-
-
Constructor Details
-
AlternativeDirectoryResourceLoader
public AlternativeDirectoryResourceLoader()
-
-
Method Details
-
getResource
Retrieve the URL of the resource from the directories.- Specified by:
getResourcein interfaceAlternativeResourceLoader- 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
Load a given resource from the directories.- Specified by:
getResourceAsStreamin interfaceAlternativeResourceLoader- 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
- Returns:
- the current list of alternate resource directories
-