com.sun.ws.rest.api
Annotation Type UriTemplate


@Inherited
@Target(value={TYPE,METHOD})
@Retention(value=RUNTIME)
public @interface UriTemplate

Identifies the URI path that a resource class or class method will serve requests for. All Web resource classes require an @UriTemplate annotation. Classes may also be annotated with @ConsumeMime and @ProduceMime to filter the requests they will receive. The container must honour annotations from the javax.annotation package. In particular, resource class instance lifecycle can be managed using the javax.annotation.PostConstruct and java.annotation.PreDestroy annotations and a class can obtain access to container context information using javax.annotation.Resource as specified in JSR 250.

See Also:
ConsumeMime, ProduceMime

Required Element Summary
 java.lang.String value
          Defines a URI template for the resource.
 

Element Detail

value

public abstract java.lang.String value
Defines a URI template for the resource. Requests to URIs that match the template will be served by the annotated class or class method. Embedded template variables are allowed and are of the form {name} where name is the template variable name. Paths are relative to the base URI of the container.

E.g.: @UriTemplate("widgets/{id}")