Interface RequestParamsResolver

All Known Implementing Classes:
DeleteParamsResolver, GetParamsResolver, PostParamsResolver, PutParamsResolver

public interface RequestParamsResolver
The RequestParamsResolver interface provides methods for resolving request parameters in the web context of a @RestController.
Since:
1.0
Author:
Blyzhnytsia Team
  • Method Details

    • getAnnotation

      Class<? extends Annotation> getAnnotation()
      Retrieves the annotation class associated with the resolver.
      Returns:
      The annotation class.
    • handleAnnotation

      void handleAnnotation(Object instance, Method method, String requestMappingPath, Map<String,List<RestControllerParams>> restControllerParamsMap)
      Handles the annotation on a method and processes the associated parameters.
      Parameters:
      instance - The instance of the controller.
      method - The method with the annotation.
      requestMappingPath - The path specified in an annotation.
      restControllerParamsMap - A map containing controller paths and associated parameters.
    • getMethodPath

      default String getMethodPath(String path)
      Extracts the method path from the provided path by removing path variables.
      Parameters:
      path - The original method path.
      Returns:
      The method path without path variables.
    • addSorted

      default void addSorted(RestControllerParams restControllerParams, List<RestControllerParams> methodParamsList)
      Adds a RestControllerParams object to the list in a sorted manner based on the presence of PathVariable.
      Parameters:
      restControllerParams - The RestControllerParams object to be added.
      methodParamsList - The list of RestControllerParams objects associated with a method.