Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@MatrixParam should not inherit values #8

Open
glassfishrobot opened this issue Jan 19, 2009 · 7 comments
Open

@MatrixParam should not inherit values #8

glassfishrobot opened this issue Jan 19, 2009 · 7 comments
Assignees
Milestone

Comments

@glassfishrobot
Copy link

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)

Environment

Operating System: All
Platform: All

Affected Versions

[2.1]

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Reported by cowwoc@java.net

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Issue-Links:
is related to
JAX_RS_SPEC-201
relates to
JAX_RS_SPEC-29

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
mhadley said:
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.

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
@mpotociar said:
Deferring to future release.

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
cowwoc said:
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?

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JAX_RS_SPEC-3

@glassfishrobot
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants