Uploaded image for project: 'mod-password-validator'
  1. mod-password-validator
  2. MODPWD-56

Support CQL queries when getting list of validation rules

    XMLWordPrintable

Details

    • eHoldings Sprint 129
    • 1
    • Spitfire

    Description

      Purpose/Overview:
      Before migration to Spring

      GET /tenant/rules
      

      supported CQL queries (github) with query parameter:

      @Override
        public void getTenantRules(int offset, int limit, String query, Map<String, String> okapiHeaders,
                                   Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {
          try {
            validatorRegistryService.getAllTenantRules(tenantId, limit, offset, query, reply -> {
              if (reply.succeeded()) {
                RuleCollection rules = reply.result().mapTo(RuleCollection.class);
                asyncResultHandler.handle(
                  Future.succeededFuture(GetTenantRulesResponse.respond200WithApplicationJson(rules)));
              } else {
                String message = "Failed to get all tenant rules";
                logger.error(message, reply.cause());
                asyncResultHandler.handle(
                  Future.succeededFuture(GetTenantRulesResponse.respond500WithTextPlain(message)));
              }
            });
          } catch (Exception e) {
            logger.error("Error running on verticle for getTenantRules: " + e.getMessage(), e);
            asyncResultHandler.handle(Future.succeededFuture(
              GetTenantRulesResponse.respond500WithTextPlain(Response.Status.INTERNAL_SERVER_ERROR.getReasonPhrase())));
          }
        }
      

      In spring version this capability has not been implemented because of absence of standard mechanism in folio spring library. Once the mechanism is available in the library querying by CQL should be restored for the above mentioned method.

      TODO: add dependency to FOLSPRINGB ticket for CQL support

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                viacheslav_kolesnyk Viacheslav Kolesnyk
                dmtkachenko Dmytro Tkachenko
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases