Uploaded image for project: 'Commons Configuration'
  1. Commons Configuration
  2. CONFIGURATION-517

Add methods to HierarchicalConfiguration to obtain sub configurations for child elements

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 2.0
    • Component/s: None
    • Labels:
      None

      Description

      So far, there is no direct way for a hierarchical configuration to obtain all elements contained in a given section (i.e. the child elements of a specific key). This can be achieved by operating on a ConfigurationNode object directly, but this is a low-level API, and for further processing of the element's content it might be necessary to create a SubNodeConfiguration around the node again.

      Therefore, it makes sense to extend the API of HierarchicalConfiguration. A method can be added - similar to configurationsAt() - which expects a key, locates the corresponding node, and then creates SubNodeConfiguration objects for all direct children of this node.

      It would also be useful to provide a way to query a configuration for the name of its root element. This makes it easier to deal with dynamic configuration structures.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              oheger Oliver Heger
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: