|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value={PARAMETER,METHOD,FIELD}) @Retention(value=RUNTIME) public @interface PathParam
Binds the value of a URI template parameter or a path segment
containing the template parameter to a resource method parameter, resource
class field, or resource class
bean property. The value is URL decoded unless this
is disabled using the Encoded
annotation.
A default value can be specified using the DefaultValue
annotation.
PathSegment
, the value will be a PathSegment
corresponding to the path segment that contains the named template parameter.
See UriInfo
for a means of retrieving all request
path segments.valueOf
that accepts a single
String argument (see, for example, Integer.valueOf(String)
).
Because injection occurs at object creation time, use of this annotation on resource class fields and bean properties is only supported for the default per-request resource class lifecycle. Resource classes using other lifecycles should only use this annotation on resource method parameters.
Encoded
,
DefaultValue
,
PathSegment
,
UriInfo
Required Element Summary | |
---|---|
java.lang.String |
value
Defines the name of the URI template parameter who value will be used to initialize the value of the annotated method parameter, class field or property. |
Element Detail |
---|
public abstract java.lang.String value
E.g. a class annotated with: @Path("widgets/{id}")
can have methods annotated with a HTTP method annotation whose arguments are annotated
with @PathParam("id")
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |