Uploaded image for project: 'Woden'
  1. Woden
  2. WODEN-176

Remove the setParentElement method from the API

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • M8
    • None
    • None

    Description

      Since WODEN-40, the Element API uses composition rather than aggregation. Elements have addXXXX methods that instantiate their child elements and set the parent element. It should no longer be necessary nor possible to set the parent element explicitly via the Woden API.

      The setParentElement method should be removed from the NestedElement interface (so it just retains a getParentElement method) and the setParentElement methods implemented in package org.apache.woden.internal.wsdl20 should be given default access (package private) so that they are only available to the addXXXX methods within the WSDL impl classes.

      The calls to setParentElement in the parseXXXX methods of BaseWSDLReader are redundant and should be removed. Some testcases also have redundant calls to setParentElement and those should be removed too. Providing the correct API programming model is used to instantiate objects (via the addXXXX methods), the parent element will always be initialised correctly.

      Attachments

        1. setParentElement_src_changes.patch
          16 kB
          John Alan William Kaputin
        2. setParentElement_test_changes.patch
          9 kB
          John Alan William Kaputin

        Activity

          People

            jkaputin John Alan William Kaputin
            jkaputin John Alan William Kaputin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: