com.ibm.openpages.api.configuration

Interface IConfigProperties



  • public interface IConfigProperties
    Interface that gives access to configuration settings in OpenPages with Watson.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      java.lang.String getProperty(java.lang.String propertyName)
      Retrieves configuration setting specified by propertyName.
      java.lang.String getProperty(java.lang.String propertyName, java.lang.String defaultValue)
      Returns value of configuration setting.
      boolean propertyExists(java.lang.String propertyName)
      Verifies if a configuration setting exists.
    • Method Detail

      • getProperty

        java.lang.String getProperty(java.lang.String propertyName)
        Retrieves configuration setting specified by propertyName.

        Example:

        String propHost = configProps.getProperty("url.service.host");

        Parameters:
        propertyName - the key for the property
        Returns:
        value for the specified property
      • propertyExists

        boolean propertyExists(java.lang.String propertyName)
        Verifies if a configuration setting exists.

        Example:

        boolean propExists = configProps.propertyExists("url.service.host");

        Parameters:
        propertyName - name of configuration setting
        Returns:
        true or false. If return value is true, then setting exists.
      • getProperty

        java.lang.String getProperty(java.lang.String propertyName,
                                     java.lang.String defaultValue)
        Returns value of configuration setting. Returns default value if a value is not specified in the system configuration.

        Example:

        String propHost = configProps.getProperty("url.service.host", "localhost");

        Parameters:
        propertyName - name of configuration setting
        defaultValue - default value to return
        Returns:
        value

Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2020. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.