Class BaseResourceLocator
java.lang.Object
com.atlassian.crowd.service.client.BaseResourceLocator
- All Implemented Interfaces:
ResourceLocator
- Direct Known Subclasses:
ClientResourceLocator
,ConsoleResourceLocator
Abstract class with a few methods that will help locate a given resource
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
formatFileLocation
(String fileLocation, boolean skipValidation) protected URL
Load a given resource.The Properties present within the given resource.Will return the location of the resource on the file system.protected String
protected String
Returns the location of the propertyresourceName
on the filesystem, based off the location of a system property, it is returned as a URL.toExternalForm();The configured name of the resource
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
propertyFileLocation
-
-
Constructor Details
-
BaseResourceLocator
-
-
Method Details
-
getResourceLocationFromSystemProperty
Returns the location of the propertyresourceName
on the filesystem, based off the location of a system property, it is returned as a URL.toExternalForm();- Returns:
- location of the resource
-
formatFileLocation
-
getResourceLocationFromClassPath
-
getClassLoaderResource
Load a given resource.This method will try to load the resource using the following methods (in order):
- Returns:
- URL of the class loader resource
-
getResourceName
Description copied from interface:ResourceLocator
The configured name of the resource- Specified by:
getResourceName
in interfaceResourceLocator
- Returns:
- name of resource
-
getProperties
Description copied from interface:ResourceLocator
The Properties present within the given resource.- Specified by:
getProperties
in interfaceResourceLocator
- Returns:
- Properties or null if no properties exist
-
getResourceLocation
Description copied from interface:ResourceLocator
Will return the location of the resource on the file system. This will be in URI format similar to "file:/crowd/temp/crowd.properties"- Specified by:
getResourceLocation
in interfaceResourceLocator
- Returns:
- location of the resource
-