The @UnmatchedPath annotation was intended to be used to provide
access to the unmatched part of a URI path thus:
@UriTemplate("folders")
public class Path {
@HttpMethod(GET)
public Response getContent(@UnmatchedPath String path) {
...
}
}
On further thought we think a cleaner and more intuitive solution
would be to add a property to UriTemplate that would enable
"greedy" (can anyone think of a better word) matching for a
terminating URI template parameter. E.g.
@UriTemplate(value="folders/{path}" greedy=true)
public class Path {
@HttpMethod(GET)
public Response getContent(@UriParam("path") String path) {
...
}
}
Using the above and a request for folders/foo/bar, the value of path
would be "foo/bar".
Thoughts, comments ?
Marc.
---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.