Annotation Type UpdateSortOperation
-
@Target(PARAMETER) @Retention(RUNTIME) @Documented public @interface UpdateSortOperation
This annotation is used to helpSortPositionRequestHandlerMethodArgumentResolver
to correctly populate a newSortPositionRequest
.- Author:
- Nathan Moore (nathandmoore)
- See Also:
SortPositionRequestHandlerMethodArgumentResolver
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
afterIdName
The name of the parameter in the request to update the sort position of an entity that should be used to populate aSortPositionRequest's positionAfterContextId
.String
beforeIdName
The name of the parameter in the request to update the sort position of an entity that should be used to populate aSortPositionRequest's positionBeforeContextId
.String
updateIdName
The name of the path variable in theRequestMapping.path()
that should be used to populate aSortPositionRequest's updateContextId
.String
value
-
-
-
Element Detail
-
value
@AliasFor("updateIdName") String value
- See Also:
updateIdName()
- Default:
- "id"
-
-
-
updateIdName
@AliasFor("value") String updateIdName
The name of the path variable in theRequestMapping.path()
that should be used to populate aSortPositionRequest's updateContextId
. Example: If the an update sort request is made for a category's product:/categories/{id}/products/{categoryProductId}/admin-sort
, then theSortPositionRequest
method parameter on the endpoint should be annotated with@UpdateSortOperation("categoryProductId")
or@UpdateSortOperation(updateIdName = "categoryProductId")
.- Returns:
- The name of the path variable in the
RequestMapping.path()
that should be used to populate aSortPositionRequest's updateContextId
. - See Also:
SortPositionRequest.updateContextId
- Default:
- "id"
-
-
-
afterIdName
String afterIdName
The name of the parameter in the request to update the sort position of an entity that should be used to populate aSortPositionRequest's positionAfterContextId
. Example: If the an update sort request is made for a category and the parameter has a different name than the default:/categories/{id}/admin-sort?afterWhich={otherCategoryId}
, then theSortPositionRequest
method parameter on the endpoint should be annotated with@UpdateSortOperation(afterIdName = "afterWhich")
.- Returns:
- The name of the path variable in the
RequestMapping.path()
that should be used to populate aSortPositionRequest's positionAfterContextId
. - See Also:
SortPositionRequest.positionAfterContextId
- Default:
- "after"
-
-
-
beforeIdName
String beforeIdName
The name of the parameter in the request to update the sort position of an entity that should be used to populate aSortPositionRequest's positionBeforeContextId
. Example: If the an update sort request is made for a category and the parameter has a different name than the default:/categories/{id}/admin-sort?beforeWhich={otherCategoryId}
, then theSortPositionRequest
method parameter on the endpoint should be annotated with@UpdateSortOperation(beforeIdName = "beforeWhich")
.- Returns:
- The name of the path variable in the
RequestMapping.path()
that should be used to populate aSortPositionRequest's positionAfterContextId
. - See Also:
SortPositionRequest.positionAfterContextId
- Default:
- "before"
-
-