Class AppSettings


  • public final class AppSettings
    extends Object
    • Method Detail

      • getInt

        public int getInt​(String key,
                          int defaultValue)
      • getBoolean

        public boolean getBoolean​(String key,
                                  boolean defaultValue)
      • getBaseURL

        public String getBaseURL()
        Get the application base URL.

        This method tries to calculate the base url from current http request. If the method is called outside of http request scope, it returns the value of application.base-url configuration setting.

        Returns:
        application base url
      • isProduction

        public boolean isProduction()
      • getInternalProperties

        public Map<String,​String> getInternalProperties()
        For internal use only.
        Returns:
        the internal properties store
      • getProperties

        public Map<String,​String> getProperties()
        For internal use only.
        Returns:
        the internal properties store
      • getPropertiesKeys

        public Set<String> getPropertiesKeys()
        Get all properties keys
        Returns:
        an unmodifiable Set of keys
      • getPropertiesKeysStartingWith

        public Set<String> getPropertiesKeysStartingWith​(String prefix)
        Get properties keys starting with the given prefix
        Returns:
        an unmodifiable Set of keys
      • getPropertiesStartingWith

        public Map<String,​String> getPropertiesStartingWith​(String prefix)
        Get properties where the key start with the given prefix
        Returns:
        an unmodifiable Map of matching properties