Package org.actioncontroller.values
Annotation Type SessionParameter
-
@Retention(RUNTIME) @Target(PARAMETER) public @interface SessionParameter
Maps the parameter to the specified servlet session. If the session parameter is missing, aborts the request with 401 Unauthorized, unless the parameter type is Optional or createIfMissing is set. If the parameter type is Consumer, calling parameter.accept() sets the session attribute instead of returning it- See Also:
HttpParameterMapping
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleancreateIfMissingIf true, the default constructor is used to create a new object if none existsbooleaninvalidateIf true and used with Consumer, callingConsumer.accept(T)will invalidate the current session and create a new one.StringvalueDefaults to the class name of the parameter (removing Consumer or Optional parts of the type)
-
-
-
Element Detail
-
value
String value
Defaults to the class name of the parameter (removing Consumer or Optional parts of the type)- Default:
- ""
-
-
-
invalidate
boolean invalidate
If true and used with Consumer, callingConsumer.accept(T)will invalidate the current session and create a new one. If true and set with createIfMissing, it will invalidate the session if it created a new one- Default:
- false
-
-