Class ConfigurationUtil

  • All Implemented Interfaces:
    java.io.Serializable

    public final class ConfigurationUtil
    extends java.lang.Object
    implements java.io.Serializable
    Utility class used to load configuration parameters from webclient configuration. This class is provided for backwards-compatibility. WebClientConfiguration should be used instead.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String externalGetWebConfig​(javax.servlet.http.HttpSession session, java.lang.String paramName)
      This method is provided for backwards-compatibility.
      static int externalGetWebConfigInt​(javax.servlet.http.HttpSession session, java.lang.String paramName, int defaultValue)
      This method is provided for backwards-compatibility.
      static java.lang.String getContextPath()
      Get Context Path.
      static java.lang.String getHost()
      Get Host.
      static java.lang.String getWebConfig​(java.lang.String paramName)
      This method is provided for backwards-compatibility.
      static java.lang.String getWebConfig​(java.lang.String paramName, java.lang.String defaultValue)
      This method is provided for backwards-compatibility.
      static boolean getWebConfigBoolean​(java.lang.String paramName)
      This method is provided for backwards-compatibility.
      static boolean getWebConfigBoolean​(java.lang.String paramName, boolean defaultValue)
      This method is provided for backwards-compatibility.
      static int getWebConfigInt​(java.lang.String paramName)
      This method is provided for backwards-compatibility.
      static int getWebConfigInt​(java.lang.String paramName, int defaultValue)
      This method is provided for backwards-compatibility.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getWebConfig

        public static java.lang.String getWebConfig​(java.lang.String paramName)
        This method is provided for backwards-compatibility. The configuration values are read using WebClientConfiguration with ConfigurationSource.GLOBAL.
        Parameters:
        paramName - param-name
        Returns:
        param-value or null if the corresponding value does not exist.
      • getWebConfig

        public static java.lang.String getWebConfig​(java.lang.String paramName,
                                                    java.lang.String defaultValue)
        This method is provided for backwards-compatibility. The configuration values are read using WebClientConfiguration with ConfigurationSource.GLOBAL.
        Parameters:
        paramName - The name of the context-parameter to get the value from.
        defaultValue - The returned default value, if no context-paramter exists by the given name.
        Returns:
        The context-param value or the default value.
      • externalGetWebConfig

        public static java.lang.String externalGetWebConfig​(javax.servlet.http.HttpSession session,
                                                            java.lang.String paramName)
        This method is provided for backwards-compatibility. The configuration values are read using WebClientConfiguration with ConfigurationSource.GLOBAL.
        Parameters:
        session - the session
        paramName - the param name
        Returns:
        param-value or null if the corresponding value does not exist.
      • externalGetWebConfigInt

        public static int externalGetWebConfigInt​(javax.servlet.http.HttpSession session,
                                                  java.lang.String paramName,
                                                  int defaultValue)
        This method is provided for backwards-compatibility. The configuration values are read using WebClientConfiguration with ConfigurationSource.GLOBAL.
        Parameters:
        session - the session
        paramName - the param name
        defaultValue - the default value to return if context parameter does not exist
        Returns:
        param-value or the specified defaultValue if the corresponding value does not exist.
      • getContextPath

        public static java.lang.String getContextPath()
        Get Context Path.
        Returns:
        contextPath
      • getHost

        public static java.lang.String getHost()
        Get Host.
        Returns:
        host
      • getWebConfigBoolean

        public static boolean getWebConfigBoolean​(java.lang.String paramName)
        This method is provided for backwards-compatibility. The configuration values are read using WebClientConfiguration with ConfigurationSource.GLOBAL.
        Parameters:
        paramName - param-name
        Returns:
        param-value
      • getWebConfigBoolean

        public static boolean getWebConfigBoolean​(java.lang.String paramName,
                                                  boolean defaultValue)
        This method is provided for backwards-compatibility. The configuration values are read using WebClientConfiguration with ConfigurationSource.GLOBAL.
        Parameters:
        paramName - parameter name
        defaultValue - default value
        Returns:
        param-value as boolean or defaultValue if context-param does not exist.
      • getWebConfigInt

        public static int getWebConfigInt​(java.lang.String paramName)
        This method is provided for backwards-compatibility. The configuration values are read using WebClientConfiguration with ConfigurationSource.GLOBAL.
        Parameters:
        paramName - name of the param to get the int value of.
        Returns:
        int value of the given param-name. If a NumberFormatException is thrown this method returns -1.
      • getWebConfigInt

        public static int getWebConfigInt​(java.lang.String paramName,
                                          int defaultValue)
        This method is provided for backwards-compatibility. The configuration values are read using WebClientConfiguration with ConfigurationSource.GLOBAL.
        Parameters:
        paramName - name of the param to get the int value of.
        defaultValue - default value
        Returns:
        int value of the given param-name. If a NumberFormatException is thrown this method returns -1.