Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Trivial Trivial
    • Resolution: Unresolved
    • Affects Version/s: 2.0
    • Fix Version/s: ice box
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      63

      Description

      Given: /images;offset=

      {offset}

      ;count=

      {count}/random;count={count}

      Where /images is implemented using one resource, and /random using a sub-resource

      If I declare @MatrixParam in the sub-resource random but the client does not
      specify the "count" parameter at all, I should get null (indicating the
      parameter was missing) instead of inheriting the value of count from /images.
      Currently there is no obvious way to detect the real value of count for /random.

      With respect to implementing the entire URL with a single Resource, it should be
      possible to get:

      1) The first, last value or some other convention, or
      2) A list of all values, or
      3) A mapping between path segments and the associated parameter values (similar
      to what we would get if we used a sub-resource)

        Issue Links

          Activity

          Hide
          mhadley added a comment -

          Changing the current behavior would introduce a backwards incompatibility. We could consider adding a
          new property to @MatrixParam to control inheritance but the default value would need to represent the
          current behavior. A workaround is to use UriInfo.getPathSegments() in the method body.

          Show
          mhadley added a comment - Changing the current behavior would introduce a backwards incompatibility. We could consider adding a new property to @MatrixParam to control inheritance but the default value would need to represent the current behavior. A workaround is to use UriInfo.getPathSegments() in the method body.
          Hide
          Marek Potociar added a comment -

          Deferring to future release.

          Show
          Marek Potociar added a comment - Deferring to future release.
          Hide
          cowwoc added a comment -

          Instead of adding a new property to @MatrixParam to control inheritance, leave the current method as-is and add a second method that returns #3 (a mapping between map segments and associated values). This will maintain backwards compatibility and allow us to test the approach in the Jersey namespace before promoting it to javax.ws.rs.

          Marek, what do you think?

          Show
          cowwoc added a comment - Instead of adding a new property to @MatrixParam to control inheritance, leave the current method as-is and add a second method that returns #3 (a mapping between map segments and associated values). This will maintain backwards compatibility and allow us to test the approach in the Jersey namespace before promoting it to javax.ws.rs. Marek, what do you think?

            People

            • Assignee:
              Unassigned
              Reporter:
              cowwoc
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: