Class ConfigProperties


  • public class ConfigProperties
    extends java.lang.Object
    wrapper for configuration properties
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.HashMap<java.lang.String,​java.lang.String> properties  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean getBooleanValue​(java.lang.String name, boolean defaultValue)
      Returns the boolean value of specified property.
      int getIntValue​(java.lang.String name)
      Returns the integer value of specified property.
      int getIntValue​(java.lang.String name, int defaultValue)
      Returns the integer value of specified property.
      java.lang.String getStringValue​(java.lang.String name)
      Returns the string value of specified property.
      java.lang.String getStringValue​(java.lang.String name, java.lang.String defaultValue)
      Returns the string value of specified property.
      • Methods inherited from class java.lang.Object

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

      • properties

        private java.util.HashMap<java.lang.String,​java.lang.String> properties
    • Constructor Detail

      • ConfigProperties

        public ConfigProperties()
      • ConfigProperties

        public ConfigProperties​(PropertyConfig... configProperties)
      • ConfigProperties

        public ConfigProperties​(java.util.Collection<PropertyConfig> configProperties)
    • Method Detail

      • getStringValue

        public java.lang.String getStringValue​(java.lang.String name,
                                               java.lang.String defaultValue)
        Returns the string value of specified property.
        Parameters:
        name - property name.
        defaultValue - default value.
        Returns:
        the string property value or defaultValue if the property is missing.
      • getStringValue

        public java.lang.String getStringValue​(java.lang.String name)
        Returns the string value of specified property.
        Parameters:
        name - property name.
        Returns:
        the string property value.
        Throws:
        AuthConfigException - if the property is missing.
      • getIntValue

        public int getIntValue​(java.lang.String name,
                               int defaultValue)
        Returns the integer value of specified property.
        Parameters:
        name - property name.
        defaultValue - default value.
        Returns:
        the integer property value or defaultValue if the property is missing.
      • getIntValue

        public int getIntValue​(java.lang.String name)
        Returns the integer value of specified property.
        Parameters:
        name - property name.
        Returns:
        the integer property value.
        Throws:
        AuthConfigException - if the property is missing.
      • getBooleanValue

        public boolean getBooleanValue​(java.lang.String name,
                                       boolean defaultValue)
        Returns the boolean value of specified property.
        Parameters:
        name - property name.
        defaultValue - default value.
        Returns:
        the boolean property value or defaultValue if the property is missing.