@Test public void testFindAllArchiveUnitProfilesThenReturnOne() throws VitamClientException { when(mock.get()).thenReturn( Response.status(Status.OK).entity(ClientMockResultHelper.getArchiveUnitProfiles(Status.OK.getStatusCode())) .build()); try (AdminExternalClientRest client = (AdminExternalClientRest) vitamServerTestRunner.getClient()) { RequestResponse<ArchiveUnitProfileModel> resp = client.findArchiveUnitProfiles(new VitamContext(TENANT_ID).setAccessContract(null), JsonHandler.createObjectNode()); assertThat(resp.isOk()).isTrue(); assertThat(((RequestResponseOK<ArchiveUnitProfileModel>) resp).getResults()).hasSize(1); } }
@Override public RequestResponse<ArchiveUnitProfileModel> findArchiveUnitProfiles(VitamContext vitamContext, JsonNode query) throws VitamClientException { return internalFindDocuments(vitamContext, AdminCollections.ARCHIVE_UNIT_PROFILE, query, ArchiveUnitProfileModel.class); }
AdminExternalClientRest extends DefaultClient implements AdminExternalClient { @Override public RequestResponse<ArchiveUnitProfileModel> findArchiveUnitProfiles(VitamContext vitamContext, JsonNode query) throws VitamClientException { return internalFindDocuments(vitamContext, AdminCollections.ARCHIVE_UNIT_PROFILE, query, ArchiveUnitProfileModel.class); } }
AdminExternalClientRest extends DefaultClient implements AdminExternalClient { @Override public RequestResponse<ArchiveUnitProfileModel> findArchiveUnitProfiles(VitamContext vitamContext, JsonNode query) throws VitamClientException { return internalFindDocuments(vitamContext, AdminCollections.ARCHIVE_UNIT_PROFILE, query, ArchiveUnitProfileModel.class); } AdminExternalClientRest(AdminExternalClientFactory factory); }
AdminExternalClientRest extends DefaultClient implements AdminExternalClient { @Override public RequestResponse<ArchiveUnitProfileModel> findArchiveUnitProfiles(VitamContext vitamContext, JsonNode query) throws VitamClientException { return internalFindDocuments(vitamContext, AdminCollections.ARCHIVE_UNIT_PROFILE, query, ArchiveUnitProfileModel.class); } AdminExternalClientRest(AdminExternalClientFactory factory); @Override RequestResponse<FileFormatModel> findFormats(VitamContext vitamContext,
        JsonNode select); @Override RequestResponse<FileRulesModel> findRules(VitamContext vitamContext,
        JsonNode select); @Override RequestResponse<IngestContractModel> findIngestContracts(
        VitamContext vitamContext, JsonNode select); @Override RequestResponse<AccessContractModel> findAccessContracts(
        VitamContext vitamContext, JsonNode select); @Override RequestResponse<ManagementContractModel> findManagementContracts(
        VitamContext vitamContext, JsonNode select); @Override RequestResponse<ContextModel> findContexts(VitamContext vitamContext,
        JsonNode select); @Override RequestResponse<ProfileModel> findProfiles(VitamContext vitamContext,
        JsonNode select); @Override RequestResponse<AccessionRegisterSummaryModel> findAccessionRegister(
        VitamContext vitamContext, JsonNode select); @Override RequestResponse<AccessionRegisterSymbolicModel> findAccessionRegisterSymbolic(
        VitamContext vitamContext, JsonNode select); @Override RequestResponse<SecurityProfileModel> findSecurityProfiles(
        VitamContext vitamContext, JsonNode select); @Override RequestResponse getAccessionRegisterDetail(VitamContext vitamContext, String id,
        JsonNode query); @Override RequestResponse updateAccessContract(VitamContext vitamContext, String id,
        JsonNode queryDsl); @Override RequestResponse updateIngestContract(VitamContext vitamContext, String id,
        JsonNode queryDsl); @Override RequestResponse updateManagementContract(VitamContext vitamContext, String id,
        JsonNode queryDsl); @Override RequestResponse createProfiles(VitamContext vitamContext, InputStream profiles); @Override RequestResponse createProfileFile(VitamContext vitamContext,
        String profileMetadataId, InputStream profile); @Override Response downloadProfileFile(VitamContext vitamContext, String profileMetadataId); @Override RequestResponse createContexts(VitamContext vitamContext, InputStream contexts); @Override RequestResponse updateContext(VitamContext vitamContext, String id,
        JsonNode queryDsl); @Override RequestResponse updateProfile(VitamContext vitamContext, String profileMetadataId, JsonNode queryDsl); @Override RequestResponse checkTraceabilityOperation(VitamContext vitamContext,
        JsonNode query); @Override Response downloadTraceabilityOperationFile(VitamContext vitamContext,
        String operationId); @Override RequestResponse launchAudit(VitamContext vitamContext, JsonNode auditOption); @Override RequestResponse<FileFormatModel> findFormatById(VitamContext vitamContext,
        String formatId); @Override RequestResponse<FileRulesModel> findRuleById(VitamContext vitamContext,
        String ruleId); @Override RequestResponse<IngestContractModel> findIngestContractById(
        VitamContext vitamContext, String contractId); @Override RequestResponse<AccessContractModel> findAccessContractById(
        VitamContext vitamContext, String contractId); @Override RequestResponse<ManagementContractModel> findManagementContractById(
        VitamContext vitamContext, String contractId); @Override RequestResponse<ContextModel> findContextById(VitamContext vitamContext,
        String contextId); @Override RequestResponse<ProfileModel> findProfileById(VitamContext vitamContext,
        String profileId); @Override RequestResponse<AccessionRegisterSummaryModel> findAccessionRegisterById(
        VitamContext vitamContext, String accessionRegisterId); @Override RequestResponse<AgenciesModel> findAgencies(VitamContext vitamContext, JsonNode query); @Override RequestResponse<AgenciesModel> findAgencyByID(
        VitamContext vitamContext, String agencyId); @Override RequestResponse<SecurityProfileModel> findSecurityProfileById(
        VitamContext vitamContext, String identifier); @Override RequestResponse updateSecurityProfile(VitamContext vitamContext, String identifier, JsonNode queryDsl); @Override RequestResponse<ProcessDetail> listOperationsDetails(VitamContext vitamContext,
        ProcessQuery query); @Override RequestResponse<ItemStatus> updateOperationActionProcess(
        VitamContext vitamContext, String actionId,
        String operationId); @Override RequestResponse<ItemStatus> getOperationProcessStatus(VitamContext vitamContext,
        String id); @Override RequestResponse<ItemStatus> cancelOperationProcessExecution(
        VitamContext vitamContext, String id); @Override RequestResponse<ItemStatus> getOperationProcessExecutionDetails(
        VitamContext vitamContext, String id); @Override RequestResponse<WorkFlow> getWorkflowDefinitions(VitamContext vitamContext); @Override RequestResponse createAgencies(VitamContext vitamContext, InputStream agencies, String filename); @Override RequestResponse createFormats(VitamContext vitamContext, InputStream formats, String filename); @Override RequestResponse createRules(VitamContext vitamContext, InputStream rules, String filename); @Override RequestResponse createSecurityProfiles(VitamContext vitamContext, InputStream securityProfiles,
        String filename); @Override Response checkRules(VitamContext vitamContext, InputStream rules); @Override Response checkFormats(VitamContext vitamContext, InputStream formats); @Override Response checkAgencies(VitamContext vitamContext, InputStream agencies); @Override RequestResponse createIngestContracts(VitamContext vitamContext, InputStream ingestContracts); @Override RequestResponse createAccessContracts(VitamContext vitamContext, InputStream accessContracts); @Override RequestResponse createManagementContracts(VitamContext vitamContext, InputStream managementContracts); @Override Response downloadDistributionReport(VitamContext vitamContext, String opId); @Override Response downloadBatchReport(VitamContext vitamContext, String opId); @Override Response downloadRulesReport(VitamContext vitamContext, String opId); @Override Response downloadAgenciesCsvAsStream(VitamContext vitamContext, String opId); @Override Response downloadRulesCsvAsStream(VitamContext vitamContext, String opId); @Override RequestResponse evidenceAudit(VitamContext vitamContext, JsonNode dslQuery); @Override RequestResponse rectificationAudit(VitamContext vitamContext, String operationId); @Override RequestResponse exportProbativeValue(VitamContext vitamContext, ProbativeValueRequest probativeValueRequest); @Override RequestResponse createArchiveUnitProfile(VitamContext vitamContext, InputStream archiveUnitProfiles); @Override RequestResponse<ArchiveUnitProfileModel> findArchiveUnitProfileById(VitamContext vitamContext, String id); @Override RequestResponse<ArchiveUnitProfileModel> findArchiveUnitProfiles(VitamContext vitamContext, JsonNode query); @Override RequestResponse updateArchiveUnitProfile(VitamContext vitamContext, String archiveUnitprofileId,
        JsonNode queryDSL); @Override RequestResponse importOntologies(boolean forceUpdate, VitamContext vitamContext, InputStream ontologies); @Override RequestResponse<OntologyModel> findOntologyById(VitamContext vitamContext, String id); @Override RequestResponse<OntologyModel> findOntologies(VitamContext vitamContext, JsonNode query); @Override RequestResponse importGriffin(VitamContext vitamContext, InputStream griffinStream, String filename); @Override RequestResponse importPreservationScenario(VitamContext vitamContext, InputStream scenarios, String fileName); @Override RequestResponse<GriffinModel> findGriffinById(VitamContext vitamContext, String id); @Override RequestResponse<PreservationScenarioModel> findPreservationScenarioById(VitamContext vitamContext, String id); @Override RequestResponse<PreservationScenarioModel> findPreservationScenario(VitamContext vitamContext,
        JsonNode select); @Override RequestResponse<GriffinModel> findGriffin(VitamContext vitamContext, JsonNode select); @Override RequestResponse createExternalOperation(VitamContext vitamContext, LogbookOperationParameters logbookOperationparams); }
AdminExternalClientRest extends DefaultClient implements AdminExternalClient { @Override public RequestResponse<ArchiveUnitProfileModel> findArchiveUnitProfiles(VitamContext vitamContext, JsonNode query) throws VitamClientException { return internalFindDocuments(vitamContext, AdminCollections.ARCHIVE_UNIT_PROFILE, query, ArchiveUnitProfileModel.class); } AdminExternalClientRest(AdminExternalClientFactory factory); @Override RequestResponse<FileFormatModel> findFormats(VitamContext vitamContext,
        JsonNode select); @Override RequestResponse<FileRulesModel> findRules(VitamContext vitamContext,
        JsonNode select); @Override RequestResponse<IngestContractModel> findIngestContracts(
        VitamContext vitamContext, JsonNode select); @Override RequestResponse<AccessContractModel> findAccessContracts(
        VitamContext vitamContext, JsonNode select); @Override RequestResponse<ManagementContractModel> findManagementContracts(
        VitamContext vitamContext, JsonNode select); @Override RequestResponse<ContextModel> findContexts(VitamContext vitamContext,
        JsonNode select); @Override RequestResponse<ProfileModel> findProfiles(VitamContext vitamContext,
        JsonNode select); @Override RequestResponse<AccessionRegisterSummaryModel> findAccessionRegister(
        VitamContext vitamContext, JsonNode select); @Override RequestResponse<AccessionRegisterSymbolicModel> findAccessionRegisterSymbolic(
        VitamContext vitamContext, JsonNode select); @Override RequestResponse<SecurityProfileModel> findSecurityProfiles(
        VitamContext vitamContext, JsonNode select); @Override RequestResponse getAccessionRegisterDetail(VitamContext vitamContext, String id,
        JsonNode query); @Override RequestResponse updateAccessContract(VitamContext vitamContext, String id,
        JsonNode queryDsl); @Override RequestResponse updateIngestContract(VitamContext vitamContext, String id,
        JsonNode queryDsl); @Override RequestResponse updateManagementContract(VitamContext vitamContext, String id,
        JsonNode queryDsl); @Override RequestResponse createProfiles(VitamContext vitamContext, InputStream profiles); @Override RequestResponse createProfileFile(VitamContext vitamContext,
        String profileMetadataId, InputStream profile); @Override Response downloadProfileFile(VitamContext vitamContext, String profileMetadataId); @Override RequestResponse createContexts(VitamContext vitamContext, InputStream contexts); @Override RequestResponse updateContext(VitamContext vitamContext, String id,
        JsonNode queryDsl); @Override RequestResponse updateProfile(VitamContext vitamContext, String profileMetadataId, JsonNode queryDsl); @Override RequestResponse checkTraceabilityOperation(VitamContext vitamContext,
        JsonNode query); @Override Response downloadTraceabilityOperationFile(VitamContext vitamContext,
        String operationId); @Override RequestResponse launchAudit(VitamContext vitamContext, JsonNode auditOption); @Override RequestResponse<FileFormatModel> findFormatById(VitamContext vitamContext,
        String formatId); @Override RequestResponse<FileRulesModel> findRuleById(VitamContext vitamContext,
        String ruleId); @Override RequestResponse<IngestContractModel> findIngestContractById(
        VitamContext vitamContext, String contractId); @Override RequestResponse<AccessContractModel> findAccessContractById(
        VitamContext vitamContext, String contractId); @Override RequestResponse<ManagementContractModel> findManagementContractById(
        VitamContext vitamContext, String contractId); @Override RequestResponse<ContextModel> findContextById(VitamContext vitamContext,
        String contextId); @Override RequestResponse<ProfileModel> findProfileById(VitamContext vitamContext,
        String profileId); @Override RequestResponse<AccessionRegisterSummaryModel> findAccessionRegisterById(
        VitamContext vitamContext, String accessionRegisterId); @Override RequestResponse<AgenciesModel> findAgencies(VitamContext vitamContext, JsonNode query); @Override RequestResponse<AgenciesModel> findAgencyByID(
        VitamContext vitamContext, String agencyId); @Override RequestResponse<SecurityProfileModel> findSecurityProfileById(
        VitamContext vitamContext, String identifier); @Override RequestResponse updateSecurityProfile(VitamContext vitamContext, String identifier, JsonNode queryDsl); @Override RequestResponse<ProcessDetail> listOperationsDetails(VitamContext vitamContext,
        ProcessQuery query); @Override RequestResponse<ItemStatus> updateOperationActionProcess(
        VitamContext vitamContext, String actionId,
        String operationId); @Override RequestResponse<ItemStatus> getOperationProcessStatus(VitamContext vitamContext,
        String id); @Override RequestResponse<ItemStatus> cancelOperationProcessExecution(
        VitamContext vitamContext, String id); @Override RequestResponse<ItemStatus> getOperationProcessExecutionDetails(
        VitamContext vitamContext, String id); @Override RequestResponse<WorkFlow> getWorkflowDefinitions(VitamContext vitamContext); @Override RequestResponse createAgencies(VitamContext vitamContext, InputStream agencies, String filename); @Override RequestResponse createFormats(VitamContext vitamContext, InputStream formats, String filename); @Override RequestResponse createRules(VitamContext vitamContext, InputStream rules, String filename); @Override RequestResponse createSecurityProfiles(VitamContext vitamContext, InputStream securityProfiles,
        String filename); @Override Response checkRules(VitamContext vitamContext, InputStream rules); @Override Response checkFormats(VitamContext vitamContext, InputStream formats); @Override Response checkAgencies(VitamContext vitamContext, InputStream agencies); @Override RequestResponse createIngestContracts(VitamContext vitamContext, InputStream ingestContracts); @Override RequestResponse createAccessContracts(VitamContext vitamContext, InputStream accessContracts); @Override RequestResponse createManagementContracts(VitamContext vitamContext, InputStream managementContracts); @Override Response downloadDistributionReport(VitamContext vitamContext, String opId); @Override Response downloadBatchReport(VitamContext vitamContext, String opId); @Override Response downloadRulesReport(VitamContext vitamContext, String opId); @Override Response downloadAgenciesCsvAsStream(VitamContext vitamContext, String opId); @Override Response downloadRulesCsvAsStream(VitamContext vitamContext, String opId); @Override RequestResponse evidenceAudit(VitamContext vitamContext, JsonNode dslQuery); @Override RequestResponse rectificationAudit(VitamContext vitamContext, String operationId); @Override RequestResponse exportProbativeValue(VitamContext vitamContext, ProbativeValueRequest probativeValueRequest); @Override RequestResponse createArchiveUnitProfile(VitamContext vitamContext, InputStream archiveUnitProfiles); @Override RequestResponse<ArchiveUnitProfileModel> findArchiveUnitProfileById(VitamContext vitamContext, String id); @Override RequestResponse<ArchiveUnitProfileModel> findArchiveUnitProfiles(VitamContext vitamContext, JsonNode query); @Override RequestResponse updateArchiveUnitProfile(VitamContext vitamContext, String archiveUnitprofileId,
        JsonNode queryDSL); @Override RequestResponse importOntologies(boolean forceUpdate, VitamContext vitamContext, InputStream ontologies); @Override RequestResponse<OntologyModel> findOntologyById(VitamContext vitamContext, String id); @Override RequestResponse<OntologyModel> findOntologies(VitamContext vitamContext, JsonNode query); @Override RequestResponse importGriffin(VitamContext vitamContext, InputStream griffinStream, String filename); @Override RequestResponse importPreservationScenario(VitamContext vitamContext, InputStream scenarios, String fileName); @Override RequestResponse<GriffinModel> findGriffinById(VitamContext vitamContext, String id); @Override RequestResponse<PreservationScenarioModel> findPreservationScenarioById(VitamContext vitamContext, String id); @Override RequestResponse<PreservationScenarioModel> findPreservationScenario(VitamContext vitamContext,
        JsonNode select); @Override RequestResponse<GriffinModel> findGriffin(VitamContext vitamContext, JsonNode select); @Override RequestResponse createExternalOperation(VitamContext vitamContext, LogbookOperationParameters logbookOperationparams);  }