org.cruxframework.crux.core.shared.rest.annotation
Annotation Type QueryParam


@Target(value={PARAMETER,METHOD})
@Retention(value=RUNTIME)
public @interface QueryParam

Used to map a REST method parameter to a query parameter on the HTTP request

See the following example:

 ..
 @GET
 @Path("test")
 public String testOperation(@QueryParam("param1") String value) {
    return null;
 }
 

The parameter value will be bound to the query "param1" parameter sent to the server.

Author:
Thiago da Rosa de Bustamante

Required Element Summary
 String value
          Defines the name of the HTTP query parameter whose value will be used to initialize the value of the annotated method argument, class field or bean property.
 

Element Detail

value

public abstract String value
Defines the name of the HTTP query parameter whose value will be used to initialize the value of the annotated method argument, class field or bean property. The name is specified in decoded form, any percent encoded literals within the value will not be decoded and will instead be treated as literal text. E.g. if the parameter name is "a b" then the value of the annotation is "a b", not "a+b" or "a%20b".



Copyright © 2014. All rights reserved.