Annotation Interface MetadataParam


@Target(PARAMETER) @Retention(RUNTIME) @Documented public @interface MetadataParam
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The default value to use as a fallback when the request parameter value is not provided or empty.
    boolean
    Whether the parameter is required.
    The name of the metadata parameter to bind to.
  • Element Details

    • value

      String value
      The name of the metadata parameter to bind to.
      Default:
      ""
    • required

      boolean required
      Whether the parameter is required.

      Default is true, leading to an exception thrown in case of the parameter missing in the request. Switch this to false if you prefer a null in case of the parameter missing.

      Alternatively, provide a defaultValue, which implicitly sets this flag to false.

      Default:
      true
    • defaultValue

      String defaultValue
      The default value to use as a fallback when the request parameter value is not provided or empty. Supplying a default value implicitly sets required() to false.
      Default:
      "\n\t\t\n\t\t\n\ue000\ue001\ue002\n\t\t\t\t\n"