public abstract class BaseResourceLocator extends Object implements ResourceLocator
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
protected String |
propertyFileLocation |
Modifier | Constructor and Description |
---|---|
protected |
BaseResourceLocator(String resourceName) |
Modifier and Type | Method and Description |
---|---|
protected String |
formatFileLocation(String fileLocation,
boolean skipValidation) |
protected URL |
getClassLoaderResource()
Load a given resource.
|
Properties |
getProperties()
The Properties present within the given resource.
|
String |
getResourceLocation()
Will return the location of the resource on the file system.
|
protected String |
getResourceLocationFromClassPath() |
protected String |
getResourceLocationFromSystemProperty()
Returns the location of the property resourceName on the filesystem, based off the location
of a system property, it is returned as a URL.toExternalForm();
|
String |
getResourceName()
The configured name of the resource
|
protected final org.slf4j.Logger logger
protected String propertyFileLocation
protected BaseResourceLocator(String resourceName)
protected String getResourceLocationFromSystemProperty()
protected String getResourceLocationFromClassPath()
protected URL getClassLoaderResource()
This method will try to load the resource using the following methods (in order):
public String getResourceName()
ResourceLocator
getResourceName
in interface ResourceLocator
public Properties getProperties()
ResourceLocator
getProperties
in interface ResourceLocator
public String getResourceLocation()
ResourceLocator
getResourceLocation
in interface ResourceLocator
Copyright © 2020 Atlassian. All rights reserved.