Interface ApplicationProperties


@PublicApi public interface ApplicationProperties
Component for looking up application properties specific to their web interface
Since:
2.0
  • Field Details

  • Method Details

    • getBaseUrl

      @Deprecated String getBaseUrl()
      Deprecated.
      since 2.10. This implementation is application-specific, and unreliable for a cross product plugin. Use getBaseUrl(UrlMode) instead.
      Get the base URL of the current application.
      Returns:
      the current application's base URL
    • getBaseUrl

      @Nonnull String getBaseUrl(UrlMode urlMode)
      Get the base URL of the current application, with respect to the given UrlMode. This varies as follows:
      • If UrlMode.CANONICAL return the configured base URL.
      • If UrlMode.ABSOLUTE return either the base URL of a request in the current scope, or the configured base URL if there is no such request.
      • If UrlMode.RELATIVE return 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_CANONICAL return the configured context path.
      • If UrlMode.AUTO return 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.
    • getDisplayName

      @Nonnull String getDisplayName()
      Returns the display name for this application.
      Returns:
      the displayable name of the application
      See Also:
    • getPlatformId

      @Nonnull String getPlatformId()
      Returns the exact ID of this application/platform, as defined in HAMS and used for licensing purposes.

      Return values include:

      Fisheye / Crucible is a snowflake in that they have two separate licenses with two separate application IDs ("fisheye" and "crucible"). For the purposes of having a single ID for the platform, FeCru will return "fisheye" (PLATFORM_FECRU) from this method.
      Returns:
      the ID of this application/platform
      Since:
      3.0
      See Also:
    • getVersion

      @Nonnull String getVersion()
      Returns:
      the version of the application
    • getBuildDate

      @Nonnull Date getBuildDate()
      Returns:
      the build date of the application
    • getBuildNumber

      @Nonnull String getBuildNumber()
      Returns:
      the build number of the application, must be parsable by Long.parseLong(String)
    • getHomeDirectory

      @Nullable @Deprecated File getHomeDirectory()
      Deprecated.
      since 4.1.0 use the specific getLocalHomeDirectory() and getSharedHomeDirectory() methods
      Returns:
      the home directory of the application or null if none is defined
    • getLocalHomeDirectory

      @Nonnull Optional<Path> 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
    • getSharedHomeDirectory

      @Nonnull Optional<Path> getSharedHomeDirectory()
      Returns:
      If the product supports clustering and a shared home has been defined this method will return the shared home directory. Otherwise this method should return Optional.empty().
      Since:
      4.1.0
    • getPropertyValue

      @Deprecated String getPropertyValue(String key)
      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

      @Nonnull String getApplicationFileEncoding()
      Returns:
      the encoding that is used for storage of application files. eg 'UTF-8'
      Since:
      4.4.0