Interface ConfigurationTree


public interface ConfigurationTree
A generic form of a Configuration. This is an intermediate configuration particularly suited to moving to and from a JSON configuration.

Child configurations are grouped by names. Names would be the property names in the typical Arooa configuration:

  • Method Details

    • getElement

      ArooaElement getElement()
      Get the element of this configuration.
      Returns:
      An Element. Never Null.
    • getText

      Optional<String> getText()
      Get the element text, if there is any.
      Returns:
      Optional Text.
    • getChildNames

      Set<String> getChildNames()
      Get the names of child configurations.
      Returns:
      A set of names. May be empty but never null.
    • getChildConfigurations

      List<ConfigurationTree> getChildConfigurations(String name)
      Get the child configuration(s) for a name.
      Parameters:
      name - The name of the child(ren)
      Returns:
      If the name exists then a list of at least one configuration otherwise null.
    • toConfiguration

      ArooaConfiguration toConfiguration(SaveOperation saveMethod)
      Map to an ArooaConfiguration that can be parsed with an ArooaParser.
      Parameters:
      saveMethod - Provide a way of saving changes to the configuration back.
      Returns:
      A valid ArooaConfiguration.