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

Add methods to HierarchicalConfiguration to obtain sub configurations for child elements

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.9
    • 2.0
    • None
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment