Class AdminExternalClientRest
java.lang.Object
fr.gouv.vitam.common.external.client.DefaultClient
fr.gouv.vitam.access.external.client.AdminExternalClientRest
- All Implemented Interfaces:
AdminExternalClient
,OperationStatusClient
,MockOrRestClient
,BasicClient
,VitamAutoCloseable
,AutoCloseable
-
Field Summary
Fields inherited from interface fr.gouv.vitam.common.external.client.BasicClient
STATUS_URL
-
Method Summary
Modifier and TypeMethodDescriptioncancelOperationProcessExecution
(VitamContext vitamContext, String id) Cancel the operationjavax.ws.rs.core.Response
checkAgencies
(VitamContext vitamContext, InputStream agencies) checkAgencies
The caller is responsible to close the Response after consuming the inputStream.javax.ws.rs.core.Response
checkFormats
(VitamContext vitamContext, InputStream formats) checkFormats
The caller is responsible to close the Response after consuming the inputStream.javax.ws.rs.core.Response
checkRules
(VitamContext vitamContext, InputStream rules) checkRules
The caller is responsible to close the Response after consuming the inputStream.void
Check the status from the servicevoid
checkStatus
(javax.ws.rs.core.MultivaluedHashMap<String, Object> headers) Check the status from the service used to passe "X-SSL-CLIENT-CERT" header that contain a pem certificatecheckTraceabilityOperation
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode query) Deprecated.RequestResponse<com.fasterxml.jackson.databind.JsonNode>
checkTraceabilityOperations
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode query) void
close()
Close the underneath http clientfinal void
consumeAnyEntityAndClose
(javax.ws.rs.core.Response response) Helper when an error occurs on client usage side to consume response howevercreateAccessContracts
(VitamContext vitamContext, InputStream accessContracts) create a set of access contracts after passing the validation steps.createAgencies
(VitamContext vitamContext, InputStream agencies, String filename) create a set of agenciescreateArchiveUnitProfile
(VitamContext vitamContext, InputStream archiveUnitProfiles) Create a ArchiveUnitProfile after passing the validation steps.createContexts
(VitamContext vitamContext, InputStream contexts) create a set of contextscreateExternalOperation
(VitamContext vitamContext, LogbookOperationParameters logbookOperationparams) Create external logbook operation entry
createFormats
(VitamContext vitamContext, InputStream formats, String filename) create a set of formatscreateIngestContracts
(VitamContext vitamContext, InputStream ingestContracts) create a set of ingest contracts after passing the validation steps.createManagementContracts
(VitamContext vitamContext, InputStream managementContracts) create a set of access contracts after passing the validation steps.createProfileFile
(VitamContext vitamContext, String profileMetadataId, InputStream profile) Save profile file (xsd, rng, ...) corresponding to the profile metadata.createProfiles
(VitamContext vitamContext, InputStream profiles) Create a profile metadata after passing the validation steps.createRules
(VitamContext vitamContext, InputStream rules, String filename) create a set of rulescreateSecurityProfiles
(VitamContext vitamContext, InputStream securityProfiles, String filename) create a set of security profilesdeleteUnitExternalSchemas
(VitamContext vitamContext, List<String> externalSchemaPaths) Delete unit external schemajavax.ws.rs.core.Response
downloadAgenciesCsvAsStream
(VitamContext vitamContext, String opId) Download Csv referential Agenciesjavax.ws.rs.core.Response
downloadBatchReport
(VitamContext vitamContext, String opId) Download batch reportsjavax.ws.rs.core.Response
downloadDistributionReport
(VitamContext vitamContext, String opId) Download distribution reportsjavax.ws.rs.core.Response
downloadProfileFile
(VitamContext vitamContext, String profileMetadataId) Download the profile file according to profileMetadataIdjavax.ws.rs.core.Response
downloadRulesCsvAsStream
(VitamContext vitamContext, String opId) Download Csv referential Rulesjavax.ws.rs.core.Response
downloadRulesReport
(VitamContext vitamContext, String opId) Download rules reportjavax.ws.rs.core.Response
downloadTraceabilityOperationFile
(VitamContext vitamContext, String operationId) Download the traceability operation file according to operationIdevidenceAudit
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode dslQuery) launch a traceability audit for the requestexportProbativeValue
(VitamContext vitamContext, ProbativeValueRequest probativeValueRequest) launch probative value processfindAccessContractById
(VitamContext vitamContext, String contractId) Find an access contracts by its id.findAccessContracts
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) Find access contracts.findAccessionRegister
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) Find accession registers.findAccessionRegisterById
(VitamContext vitamContext, String accessionRegisterId) Find an accession register by its id.findAccessionRegisterDetails
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) Find accession register details.findAccessionRegisterSymbolic
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) Find accession registers symbolic.findAgencies
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode query) Find agenciesfindAgencyByID
(VitamContext vitamContext, String agencyId) Find an agency by its id.findArchiveUnitProfileById
(VitamContext vitamContext, String id) Find an archive unit profile by its id.findArchiveUnitProfiles
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode query) Find archive unit profilesfindContextById
(VitamContext vitamContext, String contextId) Find a context by its idfindContexts
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) Find contexts.findFormatById
(VitamContext vitamContext, String formatId) Find a format by its id.findFormats
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) Find formats.findGriffin
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) findGriffinById
(VitamContext vitamContext, String id) findIngestContractById
(VitamContext vitamContext, String contractId) Find an entry contract by its id.findIngestContracts
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) Find entry contracts.findManagementContractById
(VitamContext vitamContext, String contractId) Find an management contracts by its id.findManagementContracts
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) Find management contracts.findOntologies
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode query) Find ontologiesfindOntologyById
(VitamContext vitamContext, String id) Find an ontology by its id.findPreservationScenario
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) findPreservationScenarioById
(VitamContext vitamContext, String id) findProfileById
(VitamContext vitamContext, String profileId) Find a profile by its id.findProfiles
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) Find profiles.findRuleById
(VitamContext vitamContext, String ruleId) Find a rule by its id.findRules
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) Find rules.findSecurityProfileById
(VitamContext vitamContext, String identifier) Find a security profile by its identifier.findSecurityProfiles
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) Find security profiles by query dsl.getAccessionRegisterDetail
(VitamContext vitamContext, String id, com.fasterxml.jackson.databind.JsonNode query) Get the accession register details matching the given querygetArchiveUnitProfileSchema
(VitamContext vitamContext, String archiveUnitId) get archive unit profile schemajavax.ws.rs.client.Client
javax.ws.rs.client.Client
getObjectGroupSchema
(VitamContext vitamContext) get Object group schemagetOperationProcessExecutionDetails
(VitamContext vitamContext, String id) getOperationProcessStatus
(VitamContext vitamContext, String id) Get vitam operation statusgetPublicConfiguration
(VitamContext vitamContext) Get vitam public configurationGet the resource path of the server.Get the service URLgetUnitSchema
(VitamContext vitamContext) get unit schemagetWorkflowDefinitions
(VitamContext vitamContext) importGriffin
(VitamContext vitamContext, InputStream griffinStream, String filename) importOntologies
(boolean forceUpdate, VitamContext vitamContext, InputStream ontologies) Import a set of ontologies metadata.importPreservationScenario
(VitamContext vitamContext, InputStream scenarios, String fileName) importUnitExternalSchema
(VitamContext vitamContext, InputStream externalSchema) Import unit external schemalaunchAudit
(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode auditOption) Check the existence of objects in the context of an auditlistOperationsDetails
(VitamContext vitamContext, ProcessQuery query) Get the list of operations detailsjavax.ws.rs.core.Response
make
(VitamRequestBuilder request) javax.ws.rs.core.Response
makeSpecifyingUrl
(VitamRequestBuilder request) rectificationAudit
(VitamContext vitamContext, String operationId) launch a rectification audit for the operation idstatic void
staticConsumeAnyEntityAndClose
(javax.ws.rs.core.Response response) toString()
updateAccessContract
(VitamContext vitamContext, String id, com.fasterxml.jackson.databind.JsonNode queryDsl) Update the given access contract by query dslupdateArchiveUnitProfile
(VitamContext vitamContext, String archiveUnitprofileId, com.fasterxml.jackson.databind.JsonNode queryDSL) Update the given archive unit profile by query DSLupdateContext
(VitamContext vitamContext, String id, com.fasterxml.jackson.databind.JsonNode queryDsl) Update the context by query dslupdateIngestContract
(VitamContext vitamContext, String id, com.fasterxml.jackson.databind.JsonNode queryDsl) Update the given ingest contract by query dslupdateManagementContract
(VitamContext vitamContext, String id, com.fasterxml.jackson.databind.JsonNode queryDsl) Update the given management contract by query dslupdateOperationActionProcess
(VitamContext vitamContext, String actionId, String operationId) Update the operation according to the requested actionupdateProfile
(VitamContext vitamContext, String profileMetadataId, com.fasterxml.jackson.databind.JsonNode queryDsl) Update the detail of the profileupdateSecurityProfile
(VitamContext vitamContext, String identifier, com.fasterxml.jackson.databind.JsonNode queryDsl) Updates the given security profile by query dslMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface fr.gouv.vitam.common.client.MockOrRestClient
checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
-
Method Details
-
findFormats
public RequestResponse<FileFormatModel> findFormats(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) throws VitamClientException Description copied from interface:AdminExternalClient
Find formats.- Specified by:
findFormats
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextselect
- select query- Returns:
- list of formats
- Throws:
VitamClientException
-
findRules
public RequestResponse<FileRulesModel> findRules(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) throws VitamClientException Description copied from interface:AdminExternalClient
Find rules.- Specified by:
findRules
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextselect
- select query- Returns:
- list of rules
- Throws:
VitamClientException
-
findIngestContracts
public RequestResponse<IngestContractModel> findIngestContracts(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) throws VitamClientException Description copied from interface:AdminExternalClient
Find entry contracts.- Specified by:
findIngestContracts
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextselect
- select query- Returns:
- list of ingest contrats
- Throws:
VitamClientException
-
findAccessContracts
public RequestResponse<AccessContractModel> findAccessContracts(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) throws VitamClientException Description copied from interface:AdminExternalClient
Find access contracts.- Specified by:
findAccessContracts
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextselect
- select query- Returns:
- list of access contrats
- Throws:
VitamClientException
-
findManagementContracts
public RequestResponse<ManagementContractModel> findManagementContracts(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) throws VitamClientException Description copied from interface:AdminExternalClient
Find management contracts.- Specified by:
findManagementContracts
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextselect
- select query- Returns:
- list of management contrats
- Throws:
VitamClientException
-
findContexts
public RequestResponse<ContextModel> findContexts(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) throws VitamClientException Description copied from interface:AdminExternalClient
Find contexts.- Specified by:
findContexts
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextselect
- select query- Returns:
- list of contexts
- Throws:
VitamClientException
-
findProfiles
public RequestResponse<ProfileModel> findProfiles(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) throws VitamClientException Description copied from interface:AdminExternalClient
Find profiles.- Specified by:
findProfiles
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextselect
- select query- Returns:
- list of profiles
- Throws:
VitamClientException
-
findAccessionRegister
public RequestResponse<AccessionRegisterSummaryModel> findAccessionRegister(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) throws VitamClientException Description copied from interface:AdminExternalClient
Find accession registers.- Specified by:
findAccessionRegister
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextselect
- select query- Returns:
- list of accession registers
- Throws:
VitamClientException
-
findAccessionRegisterDetails
public RequestResponse<AccessionRegisterDetailModel> findAccessionRegisterDetails(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) throws VitamClientException Description copied from interface:AdminExternalClient
Find accession register details.- Specified by:
findAccessionRegisterDetails
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextselect
- select query- Returns:
- list of accession register details
- Throws:
VitamClientException
-
findAccessionRegisterSymbolic
public RequestResponse<AccessionRegisterSymbolicModel> findAccessionRegisterSymbolic(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) throws VitamClientException Description copied from interface:AdminExternalClient
Find accession registers symbolic.- Specified by:
findAccessionRegisterSymbolic
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextselect
- select query- Returns:
- list of accession registers
- Throws:
VitamClientException
-
findSecurityProfiles
public RequestResponse<SecurityProfileModel> findSecurityProfiles(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) throws VitamClientException Description copied from interface:AdminExternalClient
Find security profiles by query dsl.- Specified by:
findSecurityProfiles
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextselect
- select query- Returns:
- list of security profiles
- Throws:
VitamClientException
-
getAccessionRegisterDetail
public RequestResponse getAccessionRegisterDetail(VitamContext vitamContext, String id, com.fasterxml.jackson.databind.JsonNode query) throws InvalidParseOperationException, AccessExternalClientServerException, AccessExternalClientNotFoundException Description copied from interface:AdminExternalClient
Get the accession register details matching the given query- Specified by:
getAccessionRegisterDetail
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextid
- the id of accession registerquery
- The DSL Query as a JSON Node- Returns:
- The AccessionregisterDetails list as a response jsonNode
- Throws:
InvalidParseOperationException
AccessExternalClientServerException
AccessExternalClientNotFoundException
-
updateAccessContract
public RequestResponse updateAccessContract(VitamContext vitamContext, String id, com.fasterxml.jackson.databind.JsonNode queryDsl) throws AccessExternalClientException Description copied from interface:AdminExternalClient
Update the given access contract by query dsl- Specified by:
updateAccessContract
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextid
- the given id of the access contractqueryDsl
- the given dsl query- Returns:
- Response status ok or vitam error
- Throws:
AccessExternalClientException
-
updateIngestContract
public RequestResponse updateIngestContract(VitamContext vitamContext, String id, com.fasterxml.jackson.databind.JsonNode queryDsl) throws InvalidParseOperationException, AccessExternalClientException Description copied from interface:AdminExternalClient
Update the given ingest contract by query dsl- Specified by:
updateIngestContract
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextid
- the given id of the ingest contractqueryDsl
- the given dsl query- Returns:
- Response status ok or vitam error
- Throws:
InvalidParseOperationException
AccessExternalClientException
-
updateManagementContract
public RequestResponse updateManagementContract(VitamContext vitamContext, String id, com.fasterxml.jackson.databind.JsonNode queryDsl) throws AccessExternalClientException Description copied from interface:AdminExternalClient
Update the given management contract by query dsl- Specified by:
updateManagementContract
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextid
- the given id of the management contractqueryDsl
- the given dsl query- Returns:
- Response status ok or vitam error
- Throws:
AccessExternalClientException
-
createProfiles
public RequestResponse createProfiles(VitamContext vitamContext, InputStream profiles) throws InvalidParseOperationException, AccessExternalClientException Description copied from interface:AdminExternalClient
Create a profile metadata after passing the validation steps. If profile are json and valid, they are stored in the collection and indexed. The input is invalid in the following situations :- The json of file is invalid
- One or more mandatory field is missing
- A field has an invalid format
- Profile already exist in the database
- Specified by:
createProfiles
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextprofiles
- as Json InputStream- Returns:
- Vitam response
- Throws:
InvalidParseOperationException
AccessExternalClientException
-
createProfileFile
public RequestResponse createProfileFile(VitamContext vitamContext, String profileMetadataId, InputStream profile) throws InvalidParseOperationException, AccessExternalClientException Description copied from interface:AdminExternalClient
Save profile file (xsd, rng, ...) corresponding to the profile metadata. As the id of profile metadata is required, this method should be called after creation of profile metadata The profile file will be saved in storage with the name of id of profile metadata- Specified by:
createProfileFile
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextprofile
- as InputStream- Returns:
- Vitam response
- Throws:
InvalidParseOperationException
AccessExternalClientException
-
downloadProfileFile
public javax.ws.rs.core.Response downloadProfileFile(VitamContext vitamContext, String profileMetadataId) throws AccessExternalClientException, AccessExternalNotFoundException Description copied from interface:AdminExternalClient
Download the profile file according to profileMetadataId- Specified by:
downloadProfileFile
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam context- Returns:
- Response
- Throws:
AccessExternalClientException
AccessExternalNotFoundException
-
createContexts
public RequestResponse createContexts(VitamContext vitamContext, InputStream contexts) throws InvalidParseOperationException, AccessExternalClientServerException Description copied from interface:AdminExternalClient
create a set of contexts- Specified by:
createContexts
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam context- Returns:
- Vitam response
- Throws:
InvalidParseOperationException
AccessExternalClientServerException
-
updateContext
public RequestResponse updateContext(VitamContext vitamContext, String id, com.fasterxml.jackson.databind.JsonNode queryDsl) throws AccessExternalClientException Description copied from interface:AdminExternalClient
Update the context by query dsl- Specified by:
updateContext
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextid
- the context id- Returns:
- Vitam response
- Throws:
AccessExternalClientException
-
updateProfile
public RequestResponse updateProfile(VitamContext vitamContext, String profileMetadataId, com.fasterxml.jackson.databind.JsonNode queryDsl) throws AccessExternalClientException Description copied from interface:AdminExternalClient
Update the detail of the profile- Specified by:
updateProfile
in interfaceAdminExternalClient
- Returns:
- a profile
- Throws:
AccessExternalClientException
-
checkTraceabilityOperation
@Deprecated public RequestResponse checkTraceabilityOperation(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode query) throws AccessExternalClientServerException Deprecated.- Specified by:
checkTraceabilityOperation
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam context- Throws:
AccessExternalClientServerException
-
checkTraceabilityOperations
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> checkTraceabilityOperations(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode query) throws AccessExternalClientServerException - Specified by:
checkTraceabilityOperations
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextquery
- DSL query to select traceability operations to verify- Throws:
AccessExternalClientServerException
-
downloadTraceabilityOperationFile
public javax.ws.rs.core.Response downloadTraceabilityOperationFile(VitamContext vitamContext, String operationId) throws AccessExternalClientServerException, AccessUnauthorizedException Description copied from interface:AdminExternalClient
Download the traceability operation file according to operationId- Specified by:
downloadTraceabilityOperationFile
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam context- Throws:
AccessExternalClientServerException
AccessUnauthorizedException
-
launchAudit
public RequestResponse launchAudit(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode auditOption) throws AccessExternalClientServerException Description copied from interface:AdminExternalClient
Check the existence of objects in the context of an audit- Specified by:
launchAudit
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam context- Returns:
- Status
- Throws:
AccessExternalClientServerException
-
findFormatById
public RequestResponse<FileFormatModel> findFormatById(VitamContext vitamContext, String formatId) throws VitamClientException Description copied from interface:AdminExternalClient
Find a format by its id.- Specified by:
findFormatById
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextformatId
- the formatId- Returns:
- a format
- Throws:
VitamClientException
-
findRuleById
public RequestResponse<FileRulesModel> findRuleById(VitamContext vitamContext, String ruleId) throws VitamClientException Description copied from interface:AdminExternalClient
Find a rule by its id.- Specified by:
findRuleById
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextruleId
- the rule id- Returns:
- a rule
- Throws:
VitamClientException
-
findIngestContractById
public RequestResponse<IngestContractModel> findIngestContractById(VitamContext vitamContext, String contractId) throws VitamClientException Description copied from interface:AdminExternalClient
Find an entry contract by its id.- Specified by:
findIngestContractById
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextcontractId
- the contract id- Returns:
- an ingest contract
- Throws:
VitamClientException
-
findAccessContractById
public RequestResponse<AccessContractModel> findAccessContractById(VitamContext vitamContext, String contractId) throws VitamClientException Description copied from interface:AdminExternalClient
Find an access contracts by its id.- Specified by:
findAccessContractById
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextcontractId
- the contract id- Returns:
- an access contract
- Throws:
VitamClientException
-
findManagementContractById
public RequestResponse<ManagementContractModel> findManagementContractById(VitamContext vitamContext, String contractId) throws VitamClientException Description copied from interface:AdminExternalClient
Find an management contracts by its id.- Specified by:
findManagementContractById
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextcontractId
- the contract id- Returns:
- an access contract
- Throws:
VitamClientException
-
findContextById
public RequestResponse<ContextModel> findContextById(VitamContext vitamContext, String contextId) throws VitamClientException Description copied from interface:AdminExternalClient
Find a context by its id- Specified by:
findContextById
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextcontextId
- the context id- Returns:
- a context
- Throws:
VitamClientException
-
findProfileById
public RequestResponse<ProfileModel> findProfileById(VitamContext vitamContext, String profileId) throws VitamClientException Description copied from interface:AdminExternalClient
Find a profile by its id.- Specified by:
findProfileById
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextprofileId
- the profile tId- Returns:
- a profile
- Throws:
VitamClientException
-
findAccessionRegisterById
public RequestResponse<AccessionRegisterSummaryModel> findAccessionRegisterById(VitamContext vitamContext, String accessionRegisterId) throws VitamClientException Description copied from interface:AdminExternalClient
Find an accession register by its id.- Specified by:
findAccessionRegisterById
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextaccessionRegisterId
- the accession register id- Returns:
- an accession register
- Throws:
VitamClientException
-
findAgencies
public RequestResponse<AgenciesModel> findAgencies(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode query) throws VitamClientException Description copied from interface:AdminExternalClient
Find agencies- Specified by:
findAgencies
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextquery
- select query- Returns:
- list of agencies
- Throws:
VitamClientException
-
findAgencyByID
public RequestResponse<AgenciesModel> findAgencyByID(VitamContext vitamContext, String agencyId) throws VitamClientException Description copied from interface:AdminExternalClient
Find an agency by its id.- Specified by:
findAgencyByID
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextagencyId
- the agency id- Returns:
- an agency
- Throws:
VitamClientException
-
findSecurityProfileById
public RequestResponse<SecurityProfileModel> findSecurityProfileById(VitamContext vitamContext, String identifier) throws VitamClientException Description copied from interface:AdminExternalClient
Find a security profile by its identifier.- Specified by:
findSecurityProfileById
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextidentifier
- the identifier of the security profile- Returns:
- a security profile
- Throws:
VitamClientException
-
updateSecurityProfile
public RequestResponse updateSecurityProfile(VitamContext vitamContext, String identifier, com.fasterxml.jackson.databind.JsonNode queryDsl) throws VitamClientException Description copied from interface:AdminExternalClient
Updates the given security profile by query dsl- Specified by:
updateSecurityProfile
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextidentifier
- the identifier of the security profile to updatequeryDsl
- the given dsl query- Returns:
- Response status ok or vitam error
- Throws:
VitamClientException
-
listOperationsDetails
public RequestResponse<ProcessDetail> listOperationsDetails(VitamContext vitamContext, ProcessQuery query) throws VitamClientException Description copied from interface:AdminExternalClient
Get the list of operations details- Specified by:
listOperationsDetails
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextquery
- filter query- Returns:
- list of operations details
- Throws:
VitamClientException
-
updateOperationActionProcess
public RequestResponse<ItemStatus> updateOperationActionProcess(VitamContext vitamContext, String actionId, String operationId) throws VitamClientException Description copied from interface:AdminExternalClient
Update the operation according to the requested action- Specified by:
updateOperationActionProcess
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextactionId
- an action as a string among "RESUME" (resume workflow till the end), "NEXT" (launch next step), "REPLAY" (replay the step) and PAUSE" (pause the workflow)- Returns:
- the status
- Throws:
VitamClientException
-
getOperationProcessStatus
public RequestResponse<ItemStatus> getOperationProcessStatus(VitamContext vitamContext, String id) throws VitamClientException Description copied from interface:OperationStatusClient
Get vitam operation status- Specified by:
getOperationProcessStatus
in interfaceOperationStatusClient
- Parameters:
vitamContext
- the vitam context- Returns:
- the status of the operation (HEAD only)
- Throws:
VitamClientException
-
cancelOperationProcessExecution
public RequestResponse<ItemStatus> cancelOperationProcessExecution(VitamContext vitamContext, String id) throws VitamClientException, IllegalArgumentException Description copied from interface:AdminExternalClient
Cancel the operation- Specified by:
cancelOperationProcessExecution
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam context- Returns:
- the status
- Throws:
VitamClientException
IllegalArgumentException
-
getOperationProcessExecutionDetails
public RequestResponse<ItemStatus> getOperationProcessExecutionDetails(VitamContext vitamContext, String id) throws VitamClientException - Specified by:
getOperationProcessExecutionDetails
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam context- Returns:
- the details of the operation
- Throws:
VitamClientException
-
getWorkflowDefinitions
public RequestResponse<WorkFlow> getWorkflowDefinitions(VitamContext vitamContext) throws VitamClientException - Specified by:
getWorkflowDefinitions
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam context@return the Workflow definitions- Returns:
- the pool of workflows
- Throws:
VitamClientException
-
createAgencies
public RequestResponse createAgencies(VitamContext vitamContext, InputStream agencies, String filename) throws AccessExternalClientException Description copied from interface:AdminExternalClient
create a set of agencies- Specified by:
createAgencies
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextagencies
- agencies to be created- Returns:
- Vitam response
- Throws:
AccessExternalClientException
-
createFormats
public RequestResponse createFormats(VitamContext vitamContext, InputStream formats, String filename) throws AccessExternalClientException Description copied from interface:AdminExternalClient
create a set of formats- Specified by:
createFormats
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextformats
- formats to be created- Returns:
- Vitam response
- Throws:
AccessExternalClientException
-
createRules
public RequestResponse createRules(VitamContext vitamContext, InputStream rules, String filename) throws AccessExternalClientException Description copied from interface:AdminExternalClient
create a set of rules- Specified by:
createRules
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextrules
- rules to be created- Returns:
- Vitam response
- Throws:
AccessExternalClientException
-
createSecurityProfiles
public RequestResponse createSecurityProfiles(VitamContext vitamContext, InputStream securityProfiles, String filename) throws AccessExternalClientException Description copied from interface:AdminExternalClient
create a set of security profiles- Specified by:
createSecurityProfiles
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextsecurityProfiles
- security profiles to be created- Returns:
- Vitam response
- Throws:
AccessExternalClientException
-
checkRules
public javax.ws.rs.core.Response checkRules(VitamContext vitamContext, InputStream rules) throws VitamClientException Description copied from interface:AdminExternalClient
checkRules
The caller is responsible to close the Response after consuming the inputStream.- Specified by:
checkRules
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextrules
- the input stream to be checked- Returns:
- response including InputStream
- Throws:
VitamClientException
-
checkFormats
public javax.ws.rs.core.Response checkFormats(VitamContext vitamContext, InputStream formats) throws VitamClientException Description copied from interface:AdminExternalClient
checkFormats
The caller is responsible to close the Response after consuming the inputStream.- Specified by:
checkFormats
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextformats
- the input stream to be checked- Returns:
- response including InputStream
- Throws:
VitamClientException
-
checkAgencies
public javax.ws.rs.core.Response checkAgencies(VitamContext vitamContext, InputStream agencies) throws VitamClientException Description copied from interface:AdminExternalClient
checkAgencies
The caller is responsible to close the Response after consuming the inputStream.- Specified by:
checkAgencies
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextagencies
- the input stream to be checked- Returns:
- response including InputStream
- Throws:
VitamClientException
-
createIngestContracts
public RequestResponse createIngestContracts(VitamContext vitamContext, InputStream ingestContracts) throws InvalidParseOperationException, AccessExternalClientException Description copied from interface:AdminExternalClient
create a set of ingest contracts after passing the validation steps. If all the contracts are valid, they are stored in the collection and indexed. The input is invalid in the following situations :- The json is invalid
- The json contains 2 or many contracts having the same name
- One or more mandatory field is missing
- A field has an invalid format
- One or many contracts elready exist in the database
- Specified by:
createIngestContracts
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextingestContracts
- as InputStream- Returns:
- Vitam response
- Throws:
InvalidParseOperationException
AccessExternalClientException
-
createAccessContracts
public RequestResponse createAccessContracts(VitamContext vitamContext, InputStream accessContracts) throws InvalidParseOperationException, AccessExternalClientException Description copied from interface:AdminExternalClient
create a set of access contracts after passing the validation steps. If all the contracts are valid, they are stored in the collection and indexed. The input is invalid in the following situations :- The json is invalid
- The json contains 2 or many contracts having the same name
- One or more mandatory field is missing
- A field has an invalid format
- One or many contracts already exist in the database
- Specified by:
createAccessContracts
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextaccessContracts
- as InputStream- Returns:
- Vitam response
- Throws:
InvalidParseOperationException
AccessExternalClientException
-
createManagementContracts
public RequestResponse createManagementContracts(VitamContext vitamContext, InputStream managementContracts) throws InvalidParseOperationException, AccessExternalClientException Description copied from interface:AdminExternalClient
create a set of access contracts after passing the validation steps. If all the contracts are valid, they are stored in the collection and indexed. The input is invalid in the following situations :- The json is invalid
- The json contains 2 or many contracts having the same name
- One or more mandatory field is missing
- A field has an invalid format
- One or many contracts already exist in the database
- One or many strategies are invalid
- Specified by:
createManagementContracts
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextmanagementContracts
- as InputStream- Returns:
- Vitam response
- Throws:
InvalidParseOperationException
AccessExternalClientException
-
downloadDistributionReport
public javax.ws.rs.core.Response downloadDistributionReport(VitamContext vitamContext, String opId) throws VitamClientException Description copied from interface:AdminExternalClient
Download distribution reports- Specified by:
downloadDistributionReport
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextopId
- the op (logbook) ID- Returns:
- the rulesReport
- Throws:
VitamClientException
-
downloadBatchReport
public javax.ws.rs.core.Response downloadBatchReport(VitamContext vitamContext, String opId) throws VitamClientException Description copied from interface:AdminExternalClient
Download batch reports- Specified by:
downloadBatchReport
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextopId
- the op (logbook) ID- Returns:
- batch report file
- Throws:
VitamClientException
-
downloadRulesReport
public javax.ws.rs.core.Response downloadRulesReport(VitamContext vitamContext, String opId) throws VitamClientException Description copied from interface:AdminExternalClient
Download rules report- Specified by:
downloadRulesReport
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextopId
- the op (logbook) ID- Returns:
- the rulesReport
- Throws:
VitamClientException
-
downloadAgenciesCsvAsStream
public javax.ws.rs.core.Response downloadAgenciesCsvAsStream(VitamContext vitamContext, String opId) throws VitamClientException Description copied from interface:AdminExternalClient
Download Csv referential Agencies- Specified by:
downloadAgenciesCsvAsStream
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextopId
- the op (logbook) ID- Returns:
- Agecsv referential
- Throws:
VitamClientException
- vitamClientException
-
downloadRulesCsvAsStream
public javax.ws.rs.core.Response downloadRulesCsvAsStream(VitamContext vitamContext, String opId) throws VitamClientException Description copied from interface:AdminExternalClient
Download Csv referential Rules- Specified by:
downloadRulesCsvAsStream
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextopId
- the op (logbook) ID- Returns:
- Rules csv referential
- Throws:
VitamClientException
- vitamClientException
-
evidenceAudit
public RequestResponse evidenceAudit(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode dslQuery) throws VitamClientException Description copied from interface:AdminExternalClient
launch a traceability audit for the request- Specified by:
evidenceAudit
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitamContextdslQuery
- the queryDsl- Returns:
- RequestResponse
- Throws:
VitamClientException
- The Exception
-
rectificationAudit
public RequestResponse rectificationAudit(VitamContext vitamContext, String operationId) throws VitamClientException Description copied from interface:AdminExternalClient
launch a rectification audit for the operation id- Specified by:
rectificationAudit
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the operation IdoperationId
- the operation Id- Returns:
- RequestResponse
- Throws:
VitamClientException
- The Exception
-
exportProbativeValue
public RequestResponse exportProbativeValue(VitamContext vitamContext, ProbativeValueRequest probativeValueRequest) throws VitamClientException Description copied from interface:AdminExternalClient
launch probative value process- Specified by:
exportProbativeValue
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextprobativeValueRequest
- the request- Returns:
- RequestResponse
- Throws:
VitamClientException
-VitamClientException
-
createArchiveUnitProfile
public RequestResponse createArchiveUnitProfile(VitamContext vitamContext, InputStream archiveUnitProfiles) throws InvalidParseOperationException, AccessExternalClientException Description copied from interface:AdminExternalClient
Create a ArchiveUnitProfile after passing the validation steps. If profiles are json and valid, they are stored in the collection and indexed. The input is invalid in the following situations :- The json of file is unparsable or invalid
- One or more mandatory field is missing
- A field has an invalid format
- profiles already exist in the database
- Specified by:
createArchiveUnitProfile
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextarchiveUnitProfiles
- archive unit profiles as Json InputStream- Returns:
- Vitam response
- Throws:
InvalidParseOperationException
AccessExternalClientException
-
findArchiveUnitProfileById
public RequestResponse<ArchiveUnitProfileModel> findArchiveUnitProfileById(VitamContext vitamContext, String id) throws VitamClientException Description copied from interface:AdminExternalClient
Find an archive unit profile by its id.- Specified by:
findArchiveUnitProfileById
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextid
- the archive unit profile Id- Returns:
- an archive unit profile
- Throws:
VitamClientException
-
findArchiveUnitProfiles
public RequestResponse<ArchiveUnitProfileModel> findArchiveUnitProfiles(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode query) throws VitamClientException Description copied from interface:AdminExternalClient
Find archive unit profiles- Specified by:
findArchiveUnitProfiles
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextquery
- select query- Returns:
- list of archive unit profiles
- Throws:
VitamClientException
-
updateArchiveUnitProfile
public RequestResponse updateArchiveUnitProfile(VitamContext vitamContext, String archiveUnitprofileId, com.fasterxml.jackson.databind.JsonNode queryDSL) throws InvalidParseOperationException, AccessExternalClientException Description copied from interface:AdminExternalClient
Update the given archive unit profile by query DSL- Specified by:
updateArchiveUnitProfile
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextarchiveUnitprofileId
- the id of the archive unit profile update targetqueryDSL
- the given DSL query- Returns:
- Response status OK or a VitamError
- Throws:
InvalidParseOperationException
AccessExternalClientException
-
importOntologies
public RequestResponse importOntologies(boolean forceUpdate, VitamContext vitamContext, InputStream ontologies) throws InvalidParseOperationException, AccessExternalClientException Description copied from interface:AdminExternalClient
Import a set of ontologies metadata. If all the ontologies are valid, they will be stored in the ontology collection and indexed. The input is invalid in the following situations :- The json is invalid
- The json contains an already used identifier
- One or more mandatory field is missing
- A field has an invalid format
- Specified by:
importOntologies
in interfaceAdminExternalClient
vitamContext
- the vitam contextontologies
- as Json InputStream- Returns:
- Vitam response
- Throws:
InvalidParseOperationException
AccessExternalClientException
-
findOntologyById
public RequestResponse<OntologyModel> findOntologyById(VitamContext vitamContext, String id) throws VitamClientException Description copied from interface:AdminExternalClient
Find an ontology by its id.- Specified by:
findOntologyById
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextid
- the ontology Id- Returns:
- an ontology
- Throws:
VitamClientException
-
findOntologies
public RequestResponse<OntologyModel> findOntologies(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode query) throws VitamClientException Description copied from interface:AdminExternalClient
Find ontologies- Specified by:
findOntologies
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextquery
- select query- Returns:
- list of ontologies
- Throws:
VitamClientException
-
importGriffin
public RequestResponse importGriffin(VitamContext vitamContext, InputStream griffinStream, String filename) throws AccessExternalClientException - Specified by:
importGriffin
in interfaceAdminExternalClient
- Throws:
AccessExternalClientException
-
importPreservationScenario
public RequestResponse importPreservationScenario(VitamContext vitamContext, InputStream scenarios, String fileName) throws AccessExternalClientException - Specified by:
importPreservationScenario
in interfaceAdminExternalClient
- Throws:
AccessExternalClientException
-
findGriffinById
public RequestResponse<GriffinModel> findGriffinById(VitamContext vitamContext, String id) throws VitamClientException - Specified by:
findGriffinById
in interfaceAdminExternalClient
- Throws:
VitamClientException
-
findPreservationScenarioById
public RequestResponse<PreservationScenarioModel> findPreservationScenarioById(VitamContext vitamContext, String id) throws VitamClientException - Specified by:
findPreservationScenarioById
in interfaceAdminExternalClient
- Throws:
VitamClientException
-
findPreservationScenario
public RequestResponse<PreservationScenarioModel> findPreservationScenario(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) throws VitamClientException - Specified by:
findPreservationScenario
in interfaceAdminExternalClient
- Throws:
VitamClientException
-
findGriffin
public RequestResponse<GriffinModel> findGriffin(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select) throws VitamClientException - Specified by:
findGriffin
in interfaceAdminExternalClient
- Throws:
VitamClientException
-
createExternalOperation
public RequestResponse createExternalOperation(VitamContext vitamContext, LogbookOperationParameters logbookOperationparams) throws LogbookExternalClientException Description copied from interface:AdminExternalClient
Create external logbook operation entry
- Specified by:
createExternalOperation
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextlogbookOperationparams
- the logbook parameters to be created- Returns:
- RequestResponse status of the insertion
- Throws:
LogbookExternalClientException
-
getUnitSchema
public RequestResponse<SchemaResponse> getUnitSchema(VitamContext vitamContext) throws VitamClientException Description copied from interface:AdminExternalClient
get unit schema- Specified by:
getUnitSchema
in interfaceAdminExternalClient
- Returns:
- Throws:
VitamClientException
-
getArchiveUnitProfileSchema
public RequestResponse<CombinedSchemaModel> getArchiveUnitProfileSchema(VitamContext vitamContext, String archiveUnitId) throws VitamClientException Description copied from interface:AdminExternalClient
get archive unit profile schema- Specified by:
getArchiveUnitProfileSchema
in interfaceAdminExternalClient
- Returns:
- Throws:
VitamClientException
-
importUnitExternalSchema
public RequestResponse<Void> importUnitExternalSchema(VitamContext vitamContext, InputStream externalSchema) throws AccessExternalClientException Description copied from interface:AdminExternalClient
Import unit external schema- Specified by:
importUnitExternalSchema
in interfaceAdminExternalClient
- Returns:
- Throws:
AccessExternalClientException
-
deleteUnitExternalSchemas
public RequestResponse<Void> deleteUnitExternalSchemas(VitamContext vitamContext, List<String> externalSchemaPaths) throws InvalidParseOperationException, AccessExternalClientException Description copied from interface:AdminExternalClient
Delete unit external schema- Specified by:
deleteUnitExternalSchemas
in interfaceAdminExternalClient
- Returns:
- Throws:
InvalidParseOperationException
AccessExternalClientException
-
getObjectGroupSchema
public RequestResponse<SchemaResponse> getObjectGroupSchema(VitamContext vitamContext) throws VitamClientException Description copied from interface:AdminExternalClient
get Object group schema- Specified by:
getObjectGroupSchema
in interfaceAdminExternalClient
- Returns:
- Throws:
VitamClientException
-
getPublicConfiguration
public RequestResponse<PublicConfiguration> getPublicConfiguration(VitamContext vitamContext) throws VitamClientException Description copied from interface:AdminExternalClient
Get vitam public configuration- Specified by:
getPublicConfiguration
in interfaceAdminExternalClient
- Throws:
VitamClientException
-
staticConsumeAnyEntityAndClose
public static void staticConsumeAnyEntityAndClose(javax.ws.rs.core.Response response) -
consumeAnyEntityAndClose
public final void consumeAnyEntityAndClose(javax.ws.rs.core.Response response) Description copied from interface:MockOrRestClient
Helper when an error occurs on client usage side to consume response however- Specified by:
consumeAnyEntityAndClose
in interfaceMockOrRestClient
-
checkStatus
Description copied from interface:MockOrRestClient
Check the status from the service- Specified by:
checkStatus
in interfaceMockOrRestClient
- Throws:
VitamApplicationServerException
- if the Server is unavailable
-
checkStatus
public void checkStatus(javax.ws.rs.core.MultivaluedHashMap<String, Object> headers) throws VitamApplicationServerExceptionDescription copied from interface:MockOrRestClient
Check the status from the service used to passe "X-SSL-CLIENT-CERT" header that contain a pem certificate- Specified by:
checkStatus
in interfaceMockOrRestClient
- Throws:
VitamApplicationServerException
- if the Server is unavailable
-
getResourcePath
Description copied from interface:MockOrRestClient
Get the resource path of the server.- Specified by:
getResourcePath
in interfaceMockOrRestClient
- Returns:
- the resource path as string
-
getServiceUrl
Description copied from interface:MockOrRestClient
Get the service URL- Specified by:
getServiceUrl
in interfaceMockOrRestClient
- Returns:
- the service URL
-
close
public void close()Description copied from interface:MockOrRestClient
Close the underneath http client- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceMockOrRestClient
- Specified by:
close
in interfaceVitamAutoCloseable
-
toString
-
makeSpecifyingUrl
public javax.ws.rs.core.Response makeSpecifyingUrl(VitamRequestBuilder request) throws VitamClientInternalException - Throws:
VitamClientInternalException
-
make
public javax.ws.rs.core.Response make(VitamRequestBuilder request) throws VitamClientInternalException - Throws:
VitamClientInternalException
-
getChunkedClient
public javax.ws.rs.client.Client getChunkedClient() -
getClient
public javax.ws.rs.client.Client getClient() -
getClientFactory
-