Interface ConfigurableResource

    • Method Detail

      • getConfigParameterValue

        Object getConfigParameterValue​(String aParamName)
        Looks up the value of a configuration parameter. This method will only return the value of a parameter that is not defined in any group.

        This method returns null if the parameter is optional and has not been assigned a value. (For mandatory parameters, an exception is thrown during initialization if no value has been assigned.) This method also returns null if there is no declared configuration parameter with the specified name.

        Parameters:
        aParamName - the name of a parameter that is not in any group
        Returns:
        the value of the parameter with name aParamName, null is either the parameter does not exist or it has not been assigned a value.
      • getConfigParameterValue

        Object getConfigParameterValue​(String aGroupName,
                                       String aParamName)
        Looks up the value of a configuration parameter in a group. If the parameter has no value assigned within the group, fallback strategies will be followed.

        This method returns null if the parameter is optional and has not been assigned a value. (For mandatory parameters, an exception is thrown during initialization if no value has been assigned.) This method also returns null if there is no declared configuration parameter with the specified name.

        Parameters:
        aGroupName - the name of a configuration group. If the group name is null, this method will return the same value as getParameterValue(String).
        aParamName - the name of a parameter in the group
        Returns:
        the value of the parameter in group aGroupName with name aParamName,,null is either the parameter does not exist or it has not been assigned a value.
      • setConfigParameterValue

        void setConfigParameterValue​(String aParamName,
                                     Object aValue)
        Sets the value of a configuration parameter. This only works for a parameter that is not defined in any group. Note that there is no guarantee that the change will take effect until reconfigure() is called.
        Parameters:
        aParamName - the name of a parameter that is not in any group
        aValue - the value to assign to the parameter
      • setConfigParameterValue

        void setConfigParameterValue​(String aGroupName,
                                     String aParamName,
                                     Object aValue)
        Sets the value of a configuration parameter in a group. Note that there is no guarantee that the change will take effect until reconfigure() is called.
        Parameters:
        aGroupName - the name of a configuration group. If this parameter is null, this method will have the same effect as setParameterValue(String,Object).
        aParamName - the name of a parameter in the group
        aValue - the value to assign to the parameter.