org.sakaiproject.entitybroker.entityprovider.annotations
Annotation Type EntityHttpParam


@Retention(value=RUNTIME)
@Target(value=PARAMETER)
public @interface EntityHttpParam

This annotation indicates that this method parameter should be replaced by the value in the HTTP query parameter, header, or form parameter whose name matches the name set in the annotation
Binds the value(s) of a HTTP query parameter to a resource method parameter. A default value can be specified for this annotation.

The type T of the annotated parameter, field, or property must either:
1. Be a primitive type
2. Have a constructor that accepts a single String argument
3. Have a static method named valueOf that accepts a single String argument (see, for example, Integer.valueOf(String))
4. Be List, Set or SortedSet, where T satisfies 2 or 3 above. The resulting collection is read-only.

If the type is not one of those listed in 4 above then the first value (lexically) of the parameter is used.

Author:
Aaron Zeckoski (azeckoski @ gmail.com)

Required Element Summary
 String value
          Defines the name of the HTTP query parameter, header, or form parameter whose value will be used to initialize the value of the annotated method argument
 
Optional Element Summary
 String deflt
          Defines the default value for this parameter (the value to use when no value is found in the request), by default the method parameter will be set to null if this is not set
 

Element Detail

value

public abstract String value
Defines the name of the HTTP query parameter, header, or form parameter whose value will be used to initialize the value of the annotated method argument

Returns:
the name of the parameter

deflt

public abstract String deflt
Defines the default value for this parameter (the value to use when no value is found in the request), by default the method parameter will be set to null if this is not set

Returns:
the default value to use (will be converted as needed)
Default:
"?.NULL.="


Copyright © 2007-2013 Sakai Project. All Rights Reserved.