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