Package org.oddjob.arooa.json
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 Summary
Modifier and TypeMethodDescriptiongetChildConfigurations(String name) Get the child configuration(s) for a name.Get the names of child configurations.Get the element of this configuration.getText()Get the element text, if there is any.toConfiguration(SaveOperation saveMethod) Map to an ArooaConfiguration that can be parsed with anArooaParser.
-
Method Details
-
getElement
ArooaElement getElement()Get the element of this configuration.- Returns:
- An Element. Never Null.
-
getText
Get the element text, if there is any.- Returns:
- Optional Text.
-
getChildNames
Get the names of child configurations.- Returns:
- A set of names. May be empty but never null.
-
getChildConfigurations
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
Map to an ArooaConfiguration that can be parsed with anArooaParser.- Parameters:
saveMethod- Provide a way of saving changes to the configuration back.- Returns:
- A valid
ArooaConfiguration.
-