Class PropertiesConfigurationHelper

    • Constructor Detail

      • PropertiesConfigurationHelper

        public PropertiesConfigurationHelper​(Properties properties)
        Builds a new dedicated instance from a specific Properties object.
        Parameters:
        properties - the Properties to be maintained by this helper
    • Method Detail

      • getAsString

        public String getAsString()
        Description copied from interface: ConfigurationDataRetriever
        Returns a string representation of the bean used by this data retriever, typically for manual handling and/or troubleshooting purposes.
        Returns:
        a string representation of the configuration bean (Note: it can be null if the Configuration is marked as optional)
      • get

        public Object get​(String key)
        Description copied from interface: ConfigurationDataRetriever
        Returns the object associated with the specified key.

        Notes:

        • The actual return type may vary depending on the underlying implementation
        • On a JSON implementation, the return will usually be an array
        Parameters:
        key - the object key (some implementations may also accept a path expression, e.g: JSONPath)
        Returns:
        the object object associated with the specified key. Depending on the actual implementation, the result may be either null or an empty array if the specified key is not found
      • getString

        public String getString​(String key)
        Description copied from interface: ConfigurationDataRetriever
        Returns the String object associated with the specified key.
        Parameters:
        key - the object key (some implementations may also accept a path expression, e.g: JSONPath)
        Returns:
        the String object associated with the specified key; null if not found
      • getMandatoryString

        public String getMandatoryString​(String key)
        Description copied from interface: ConfigurationDataRetriever
        Returns the String object associated with the specified key, throwing an exception if not found.
        Parameters:
        key - the object key (some implementations may also accept a path expression, e.g: JSONPath)
        Returns:
        the String object associated with the specified key; never null