Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-1128

Eliminate AbstractIdentifierAwareJaxRsProvider

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Medium
    • Resolution: Done
    • None
    • 7.0.0
    • restconf-nb

    Description

      We are using this as a base class for Json/XmlNormalizedNodeBodyReader and Xml/JsonPatchBodyReader.

      In order to get the requisite information, we must rely on @Context-injected UriInfo and Request – which do not work on client-side anyway – and based on these and InstanceIdentifier's content we make a ton of assumptions about what context the NormalizedNodePayload is being read.

      Those assumptions are easily eliminating by the actual users in RestconfDataServiceImpl and RestconfOperationsServiceImpl actually driving the parsing process.

      This means that all users relying on NormalizedNodePayload being injected as an argument, like:

          public void invokeRpc(@Encoded @PathParam("identifier") final String identifier,
                  final NormalizedNodePayload payload, @Context final UriInfo uriInfo, @Suspended final AsyncResponse ar) {
          // ...
          }
      

      need to actually start with creating an InstanceIdentifierContext (from identifier) and pass the proper parameters to the appropriate parser.

      For dealing with @Consumes variance, we only have two sets of input types (JSON, XML), so providing specialized methods for the two types.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              rovarga Robert Varga
              rovarga Robert Varga
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: