Class BaseResourceLocator
java.lang.Object
com.atlassian.crowd.service.client.BaseResourceLocator
- All Implemented Interfaces:
ResourceLocator
- Direct Known Subclasses:
ClientResourceLocator
Abstract class with a few methods that will help locate a given resource
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringformatFileLocation(String fileLocation, boolean skipValidation) protected URLLoad a given resource.The Properties present within the given resource.Will return the location of the resource on the file system.protected Stringprotected StringReturns the location of the propertyresourceNameon 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 propertyresourceNameon 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:ResourceLocatorThe configured name of the resource- Specified by:
getResourceNamein interfaceResourceLocator- Returns:
- name of resource
-
getProperties
Description copied from interface:ResourceLocatorThe Properties present within the given resource.- Specified by:
getPropertiesin interfaceResourceLocator- Returns:
- Properties or null if no properties exist
-
getResourceLocation
Description copied from interface:ResourceLocatorWill 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:
getResourceLocationin interfaceResourceLocator- Returns:
- location of the resource
-