Class BeanConfigurationHelper<T>

    • Constructor Detail

      • BeanConfigurationHelper

        public BeanConfigurationHelper​(T source)
        Builds a new Configuration Helper instance with a specific source.
        Parameters:
        source - the source bean, mainly for exception/reporting purposes
    • 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 - not used since this method implementation is a "no-op"
        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
        Throws:
        ConfigurationException - always, since the data for this type of helper should be retrieved by the user-defined bean
      • getString

        public String getString​(String key)
        Description copied from interface: ConfigurationDataRetriever
        Returns the String object associated with the specified key.
        Parameters:
        key - not used since this method implementation is a "no-op"
        Returns:
        the String object associated with the specified key; null if not found
        Throws:
        ConfigurationException - always, since the data for this type of helper should be retrieved by the user-defined bean
      • 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 - not used since this method implementation is a "no-op"
        Returns:
        the String object associated with the specified key; never null
        Throws:
        ConfigurationException - always, since the data for this type of helper should be retrieved by the user-defined bean