Annotation Interface UpdateSortOperation
This annotation is used to help
SortPositionRequestHandlerMethodArgumentResolver
to
correctly populate a new SortPositionRequest
.- Author:
- Nathan Moore (nathandmoore)
- See Also:
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionThe name of the parameter in the request to update the sort position of an entity that should be used to populate aSortPositionRequest's positionAfterContextId
.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
.The name of the path variable in theRequestMapping.path()
that should be used to populate aSortPositionRequest's updateContextId
.
-
Element Details
-
value
- See Also:
- Default:
- "id"
-
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 afterIdNameThe 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 beforeIdNameThe 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"
-