Interface Configuration

    • Method Detail

      • getProperties

        String[] getProperties()
        Returns all the defined configuration properties.
        Returns:
        list of defined properties.
      • defineProperty

        boolean defineProperty​(String propertyName)
        Checks whether a property is defined or not in configuration.
        Parameters:
        propertyName - name of property to check.
        Returns:
        true if defined, false otherwise.
      • getProperty

        String getProperty​(String propertyName,
                           String defaultValue)
        Returns the value of a specified property, of the default value if property is not defined.
        Parameters:
        propertyName - name of property
        defaultValue - default value if not found.
        Returns:
        the value associated to propertyName.
      • getPropertyOrFail

        String getPropertyOrFail​(String propertyName)
        Returns the value of the specified propertyName or raises an exception if propertyName is not defined.
        Parameters:
        propertyName - name of property to be returned.
        Returns:
        property value.
        Throws:
        IllegalArgumentException - if the property name is not defined or the found property value is blank or empty.
      • getPropertyIntOrFail

        int getPropertyIntOrFail​(String propertyName)
        Returns the Integer value of the specified propertyName or raises an exception if propertyName is not defined.
        Parameters:
        propertyName - name of property to be returned.
        Returns:
        property value.
        Throws:
        NullPointerException - if the property name is not defined.
        IllegalArgumentException - if the found property value is blank or empty.
        NumberFormatException - if the found property value is not a valid Integer.
      • getFlagProperty

        boolean getFlagProperty​(String propertyName)
        Returns the value of a flag property. Such properties can assume only two values:
        • on if flag is active (true is returned).
        • off if flag is inactive (false is returned).
        Parameters:
        propertyName - name of property flag.
        Returns:
        true for on, false for off.
        Throws:
        IllegalArgumentException - if the propertyName is not declared.
      • getConfigurationDump

        String getConfigurationDump()
        Returns a human readable string containing the configuration dump.
        Returns:
        a string describing the configuration options.