Package com.atlassian.sal.api
Interface ApplicationProperties
@PublicApi
public interface ApplicationProperties
Component for looking up application properties specific to their web interface
- Since:
- 2.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.since 2.10.getBaseUrl(UrlMode urlMode) Get the base URL of the current application, with respect to the givenUrlMode.Returns the display name for this application.Deprecated.since 4.1.0 use the specificgetLocalHomeDirectory()andgetSharedHomeDirectory()methodsReturns the exact ID of this application/platform, as defined in HAMS and used for licensing purposes.getPropertyValue(String key) Deprecated.As of SAL 2.7.
-
Field Details
-
PLATFORM_BAMBOO
- See Also:
-
PLATFORM_BITBUCKET
- See Also:
-
PLATFORM_CONFLUENCE
- See Also:
-
PLATFORM_CROWD
- See Also:
-
PLATFORM_FECRU
- See Also:
-
PLATFORM_JIRA
- See Also:
-
PLATFORM_STASH
- See Also:
-
-
Method Details
-
getBaseUrl
Deprecated.since 2.10. This implementation is application-specific, and unreliable for a cross product plugin. UsegetBaseUrl(UrlMode)instead.Get the base URL of the current application.- Returns:
- the current application's base URL
-
getBaseUrl
Get the base URL of the current application, with respect to the givenUrlMode. This varies as follows:- If
UrlMode.CANONICALreturn the configured base URL. - If
UrlMode.ABSOLUTEreturn either the base URL of a request in the current scope, or the configured base URL if there is no such request. - If
UrlMode.RELATIVEreturn either the context path of a request in the current scope, or the configured context path if there is no such request. - If
UrlMode.RELATIVE_CANONICALreturn the configured context path. - If
UrlMode.AUTOreturn either a relative URL if there is a request in the current scope, or the canonical URL if there is no such request.
- Parameters:
urlMode- the UrlMode to use.- Returns:
- the current application's base URL.
- If
-
getDisplayName
Returns the display name for this application.- Returns:
- the displayable name of the application
- See Also:
-
getPlatformId
Returns the exact ID of this application/platform, as defined in HAMS and used for licensing purposes.Return values include:
PLATFORM_BAMBOOPLATFORM_BITBUCKETPLATFORM_CONFLUENCEPLATFORM_CROWDPLATFORM_FECRUPLATFORM_JIRAPLATFORM_STASH
PLATFORM_FECRU) from this method.- Returns:
- the ID of this application/platform
- Since:
- 3.0
- See Also:
-
getVersion
- Returns:
- the version of the application
-
getBuildDate
- Returns:
- the build date of the application
-
getBuildNumber
- Returns:
- the build number of the application, must be parsable by
Long.parseLong(String)
-
getHomeDirectory
Deprecated.since 4.1.0 use the specificgetLocalHomeDirectory()andgetSharedHomeDirectory()methods- Returns:
- the home directory of the application or null if none is defined
-
getLocalHomeDirectory
- Returns:
- the home directory of the application or Optional.empty() if none is defined.
If in a clustered environment this directory will return the local home directory. If in a non-clustered environment this will return
the home directory as per equivalent of
getHomeDirectory(). - Since:
- 4.1.0
-
getPropertyValue
Deprecated.As of SAL 2.7.Get the value of an application property by its key.- Parameters:
key- The Key of the property to retrieve.- Returns:
- The value of the property or Null if the property does not exist
-
getApplicationFileEncoding
- Returns:
- the encoding that is used for storage of application files. eg 'UTF-8'
- Since:
- 4.4.0
-