@Target(value=PARAMETER) @Retention(value=RUNTIME) @Documented public @interface MetadataParam
| Modifier and Type | Optional Element and Description |
|---|---|
String |
defaultValue
The default value to use as a fallback when the request parameter value is not
provided or empty.
|
boolean |
required
Whether the parameter is required.
|
String |
value
The name of the metadata parameter to bind to.
|
public abstract String value
public abstract boolean 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.
public abstract String defaultValue
required() to
false.Copyright © 2010–2017. All rights reserved.