@Test @RunWithCustomExecutor public void givenAccessContractsTestFindAllThenReturnEmpty() throws Exception { VitamThreadUtils.getVitamSession().setTenantId(TENANT_ID); final RequestResponseOK<AccessContractModel> accessContractModelList = accessContractService.findContracts(JsonHandler.createObjectNode()); assertThat(accessContractModelList.getResults()).isEmpty(); }
@Override public RequestResponseOK<AccessContractModel> findContracts(JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException { SanityChecker.checkJsonAll(queryDsl); try (DbRequestResult result = mongoAccess.findDocuments(queryDsl, FunctionalAdminCollections.ACCESS_CONTRACT)) { return result.getRequestResponseOK(queryDsl, AccessContract.class, AccessContractModel.class); } }
AccessContractImpl implements ContractService<AccessContractModel> { @Override public RequestResponseOK<AccessContractModel> findContracts(JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException { SanityChecker.checkJsonAll(queryDsl); try (DbRequestResult result = mongoAccess.findDocuments(queryDsl, FunctionalAdminCollections.ACCESS_CONTRACT)) { return result.getRequestResponseOK(queryDsl, AccessContract.class, AccessContractModel.class); } } }
AccessContractImpl implements ContractService<AccessContractModel> { @Override public RequestResponseOK<AccessContractModel> findContracts(JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException { SanityChecker.checkJsonAll(queryDsl); try (DbRequestResult result = mongoAccess.findDocuments(queryDsl, FunctionalAdminCollections.ACCESS_CONTRACT)) { return result.getRequestResponseOK(queryDsl, AccessContract.class, AccessContractModel.class); } } AccessContractImpl(MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService); @VisibleForTesting  AccessContractImpl(MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService,
        MetaDataClient metaDataClient,
        LogbookOperationsClient logbookClient, 
        FunctionalBackupService functionalBackupService); }
AccessContractImpl implements ContractService<AccessContractModel> { @Override public RequestResponseOK<AccessContractModel> findContracts(JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException { SanityChecker.checkJsonAll(queryDsl); try (DbRequestResult result = mongoAccess.findDocuments(queryDsl, FunctionalAdminCollections.ACCESS_CONTRACT)) { return result.getRequestResponseOK(queryDsl, AccessContract.class, AccessContractModel.class); } } AccessContractImpl(MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService); @VisibleForTesting  AccessContractImpl(MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService,
        MetaDataClient metaDataClient,
        LogbookOperationsClient logbookClient, 
        FunctionalBackupService functionalBackupService); @Override RequestResponse<AccessContractModel> createContracts(List<AccessContractModel> contractModelList); @Override AccessContractModel findByIdentifier(String identifier); @Override RequestResponseOK<AccessContractModel> findContracts(JsonNode queryDsl); @Override void close(); @Override RequestResponse<AccessContractModel> updateContract(String identifier, JsonNode queryDsl); }
AccessContractImpl implements ContractService<AccessContractModel> { @Override public RequestResponseOK<AccessContractModel> findContracts(JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException { SanityChecker.checkJsonAll(queryDsl); try (DbRequestResult result = mongoAccess.findDocuments(queryDsl, FunctionalAdminCollections.ACCESS_CONTRACT)) { return result.getRequestResponseOK(queryDsl, AccessContract.class, AccessContractModel.class); } } AccessContractImpl(MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService); @VisibleForTesting  AccessContractImpl(MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService,
        MetaDataClient metaDataClient,
        LogbookOperationsClient logbookClient, 
        FunctionalBackupService functionalBackupService); @Override RequestResponse<AccessContractModel> createContracts(List<AccessContractModel> contractModelList); @Override AccessContractModel findByIdentifier(String identifier); @Override RequestResponseOK<AccessContractModel> findContracts(JsonNode queryDsl); @Override void close(); @Override RequestResponse<AccessContractModel> updateContract(String identifier, JsonNode queryDsl); static final String CONTRACT_BACKUP_EVENT; }