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


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

Default value for a REST method parameter.

See the following example:

 ..
 @GET
 @Path("test")
 public String testOperation(@CookieParam("cookieName") @DefaultValue("default") String value) {
    return null;
 }
 

The value "default" will be passed to the value parameter when the cookie cookieName is not present on the HTTP request.

Author:
Thiago da Rosa de Bustamante

Required Element Summary
 String value
          The default value.
 

Element Detail

value

public abstract String value
The default value.



Copyright © 2015. All rights reserved.