Annotation Type EntityHttpParam


  • @Retention(RUNTIME)
    @Target(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)
    • Field Summary

      Fields 
      Modifier and Type Fields Description
      static String NULL  
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      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

      Optional Elements 
      Modifier and Type Optional Element Description
      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
    • Field Detail

      • NULL

        static final String NULL
    • Element Detail

      • value

        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

        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.="