static private Optional mapRequestMethodToAllowedOperation()

in library/src/main/java/org/apache/fineract/cn/permittedfeignclient/service/ApplicationPermissionRequirementsService.java [117:136]


  static private Optional<AllowedOperation> mapRequestMethodToAllowedOperation(final RequestMethod requestMethod) {
    switch (requestMethod) {
      case GET:
        return Optional.of(AllowedOperation.READ);
      case HEAD:
        return Optional.of(AllowedOperation.READ);
      case POST:
        return Optional.of(AllowedOperation.CHANGE);
      case PUT:
        return Optional.of(AllowedOperation.CHANGE);
      case PATCH:
        return Optional.of(AllowedOperation.CHANGE);
      case DELETE:
        return Optional.of(AllowedOperation.DELETE);
      default:
      case OPTIONS:
      case TRACE:
        return Optional.empty();
    }
  }