@Retention(value=RUNTIME)
@Target(value={METHOD,ANNOTATION_TYPE})
public static @interface Actions.Action
ActionRouter
. This annotation can also
be used on other annotations for creating aliases for semantic operations
(see Actions.Retrieve
).
This annotation has attributes for setting the action's name and HTTP verb used to execute the action.
If the action will be added to a root collection, the method in which the
annotation is applied should not include an argument annotated with
ID
.
If the action will be added to a nested collection, the method in which
the annotation is applied must include an argument annotated with the
type of the parent's ID via ParentId
.
If the action will be added to an individual item, the method in which
the annotation is applied must include an argument annotated with the
type of the resource's ID via ID
.
If one of the action parameters represents information obtained from the
HTTP request body, that parameter must be annotated with Body
.
The rest of the action parameters will be provided from the request using
the appropriate Provider
.
Modifier and Type | Required Element and Description |
---|---|
java.lang.String |
httpMethod
Returns the HTTP method for executing this action.
|
java.lang.String |
name
Returns the action's name.
|