Package com.atlassian.jira.io
Class ClassPathResourceLoader
java.lang.Object
com.atlassian.jira.io.ClassPathResourceLoader
- All Implemented Interfaces:
ResourceLoader
@ParametersAreNonnullByDefault
public class ClassPathResourceLoader
extends Object
implements ResourceLoader
Resources Loader that is based on class loader.
- Since:
- v6.5
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.atlassian.fugue.Option<URL> getResource(com.atlassian.plugin.Plugin plugin, String resourcePath) Opens URL to given resource from plugin.io.atlassian.fugue.Option<URL> getResource(String resourcePath) Opens URL to given resource from JIRA Core.io.atlassian.fugue.Option<InputStream> getResourceAsStream(com.atlassian.plugin.Plugin plugin, String resourcePath) Opens stream to given resource from plugin.io.atlassian.fugue.Option<InputStream> getResourceAsStream(String resourcePath) Opens stream to given resource from JIRA Core.
-
Constructor Details
-
ClassPathResourceLoader
public ClassPathResourceLoader()
-
-
Method Details
-
getResourceAsStream
Description copied from interface:ResourceLoaderOpens stream to given resource from JIRA Core. SeeClass.getResourceAsStream(String)for exact semantics.- Specified by:
getResourceAsStreamin interfaceResourceLoader- Parameters:
resourcePath- path to resource- Returns:
- some of inputStream if resource exists none otherwise.
-
getResource
Description copied from interface:ResourceLoaderOpens URL to given resource from JIRA Core. SeeClass.getResource(String)for exact semantics.- Specified by:
getResourcein interfaceResourceLoader- Parameters:
resourcePath- path to resource- Returns:
- some of URL if resource exists none otherwise.
-
getResourceAsStream
public io.atlassian.fugue.Option<InputStream> getResourceAsStream(com.atlassian.plugin.Plugin plugin, String resourcePath) Description copied from interface:ResourceLoaderOpens stream to given resource from plugin. SeeClass.getResourceAsStream(String)for exact semantics.- Specified by:
getResourceAsStreamin interfaceResourceLoader- Parameters:
resourcePath- path to resource- Returns:
- some of inputStream if resource exists none otherwise.
-
getResource
public io.atlassian.fugue.Option<URL> getResource(com.atlassian.plugin.Plugin plugin, String resourcePath) Description copied from interface:ResourceLoaderOpens URL to given resource from plugin. SeeClass.getResource(String)for exact semantics.- Specified by:
getResourcein interfaceResourceLoader- Parameters:
resourcePath- path to resource- Returns:
- some of URL if resource exists none otherwise.
-