Annotation Interface UpdateSortOperation


@Target(PARAMETER) @Retention(RUNTIME) @Documented public @interface UpdateSortOperation
This annotation is used to help SortPositionRequestHandlerMethodArgumentResolver to correctly populate a new SortPositionRequest.
Author:
Nathan Moore (nathandmoore)
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of the parameter in the request to update the sort position of an entity that should be used to populate a SortPositionRequest's positionAfterContextId.
    The name of the parameter in the request to update the sort position of an entity that should be used to populate a SortPositionRequest's positionBeforeContextId.
    The name of the path variable in the RequestMapping.path() that should be used to populate a SortPositionRequest's updateContextId.
     
  • Element Details

    • value

      @AliasFor("updateIdName") String value
      See Also:
      Default:
      "id"
    • updateIdName

      @AliasFor("value") String updateIdName
      The name of the path variable in the RequestMapping.path() that should be used to populate a SortPositionRequest's updateContextId. Example: If the an update sort request is made for a category's product: /categories/{id}/products/{categoryProductId}/admin-sort, then the SortPositionRequest 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 a SortPositionRequest'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 a SortPositionRequest'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 the SortPositionRequest 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 a SortPositionRequest'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 a SortPositionRequest'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 the SortPositionRequest 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 a SortPositionRequest's positionAfterContextId.
      See Also:
      • SortPositionRequest.positionAfterContextId
      Default:
      "before"