Class AdminExternalClientMock
- java.lang.Object
-
- fr.gouv.vitam.common.external.client.AbstractMockClient
-
- fr.gouv.vitam.access.external.client.AdminExternalClientMock
-
- All Implemented Interfaces:
AdminExternalClient
,OperationStatusClient
,MockOrRestClient
,BasicClient
,VitamAutoCloseable
,java.lang.AutoCloseable
public class AdminExternalClientMock extends AbstractMockClient implements AdminExternalClient
Mock client implementation for Admin External
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class fr.gouv.vitam.common.external.client.AbstractMockClient
AbstractMockClient.FakeInboundResponse
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ID
-
Fields inherited from interface fr.gouv.vitam.common.external.client.BasicClient
STATUS_URL
-
-
Constructor Summary
Constructors Constructor Description AdminExternalClientMock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RequestResponse<ItemStatus>
cancelOperationProcessExecution(VitamContext vitamContext, java.lang.String id)
Cancel the operationjavax.ws.rs.core.Response
checkAgencies(VitamContext vitamContext, java.io.InputStream agencies)
checkAgencies
The caller is responsible to close the Response after consuming the inputStream.javax.ws.rs.core.Response
checkFormats(VitamContext vitamContext, java.io.InputStream formats)
checkFormats
The caller is responsible to close the Response after consuming the inputStream.javax.ws.rs.core.Response
checkRules(VitamContext vitamContext, java.io.InputStream rules)
checkRules
The caller is responsible to close the Response after consuming the inputStream.RequestResponse
checkTraceabilityOperation(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode query)
RequestResponse<com.fasterxml.jackson.databind.JsonNode>
checkTraceabilityOperations(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode query)
RequestResponse
createAccessContracts(VitamContext vitamContext, java.io.InputStream accessContracts)
create a set of access contracts after passing the validation steps.RequestResponse
createAgencies(VitamContext vitamContext, java.io.InputStream agencies, java.lang.String filename)
create a set of agenciesRequestResponse
createArchiveUnitProfile(VitamContext vitamContext, java.io.InputStream docTypes)
Create a ArchiveUnitProfile after passing the validation steps.RequestResponse
createContexts(VitamContext vitamContext, java.io.InputStream contexts)
create a set of contextsRequestResponse
createExternalOperation(VitamContext vitamContext, LogbookOperationParameters logbookOperationparams)
Create external logbook operation entry
RequestResponse
createFormats(VitamContext vitamContext, java.io.InputStream formats, java.lang.String filename)
create a set of formatsRequestResponse
createIngestContracts(VitamContext vitamContext, java.io.InputStream ingestContracts)
create a set of ingest contracts after passing the validation steps.RequestResponse
createManagementContracts(VitamContext vitamContext, java.io.InputStream managementContracts)
create a set of access contracts after passing the validation steps.RequestResponse
createProfileFile(VitamContext vitamContext, java.lang.String profileMetadataId, java.io.InputStream profile)
Save profile file (xsd, rng, ...) corresponding to the profile metadata.RequestResponse
createProfiles(VitamContext vitamContext, java.io.InputStream profiles)
Create a profile metadata after passing the validation steps.RequestResponse
createRules(VitamContext vitamContext, java.io.InputStream rules, java.lang.String filename)
create a set of rulesRequestResponse
createSecurityProfiles(VitamContext vitamContext, java.io.InputStream securityProfiles, java.lang.String filename)
create a set of security profilesjavax.ws.rs.core.Response
downloadAgenciesCsvAsStream(VitamContext vitamContext, java.lang.String opId)
Download Csv referential Agenciesjavax.ws.rs.core.Response
downloadBatchReport(VitamContext vitamContext, java.lang.String opId)
Download batch reportsjavax.ws.rs.core.Response
downloadDistributionReport(VitamContext vitamContext, java.lang.String opId)
Download distribution reportsjavax.ws.rs.core.Response
downloadProfileFile(VitamContext vitamContext, java.lang.String profileMetadataId)
Download the profile file according to profileMetadataIdjavax.ws.rs.core.Response
downloadRulesCsvAsStream(VitamContext vitamContext, java.lang.String opId)
Download Csv referential Rulesjavax.ws.rs.core.Response
downloadRulesReport(VitamContext vitamContext, java.lang.String opId)
Download rules reportjavax.ws.rs.core.Response
downloadTraceabilityOperationFile(VitamContext vitamContext, java.lang.String operationId)
Download the traceability operation file according to operationIdRequestResponse<com.fasterxml.jackson.databind.JsonNode>
evidenceAudit(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode queryDsl)
launch a traceability audit for the requestRequestResponse
exportProbativeValue(VitamContext vitamContext, ProbativeValueRequest probativeValueRequest)
launch probative value processRequestResponse<AccessContractModel>
findAccessContractById(VitamContext vitamContext, java.lang.String contractId)
Find an access contracts by its id.RequestResponse<AccessContractModel>
findAccessContracts(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select)
Find access contracts.RequestResponse<AccessionRegisterSummaryModel>
findAccessionRegister(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select)
Find accession registers.RequestResponse<AccessionRegisterSummaryModel>
findAccessionRegisterById(VitamContext vitamContext, java.lang.String accessionRegisterId)
Find an accession register by its id.RequestResponse<AccessionRegisterDetailModel>
findAccessionRegisterDetails(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select)
Find accession register details.RequestResponse<AccessionRegisterSymbolicModel>
findAccessionRegisterSymbolic(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select)
Find accession registers symbolic.RequestResponse<AgenciesModel>
findAgencies(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode query)
Find agenciesRequestResponse<AgenciesModel>
findAgencyByID(VitamContext vitamContext, java.lang.String agencyById)
Find an agency by its id.RequestResponse<ArchiveUnitProfileModel>
findArchiveUnitProfileById(VitamContext vitamContext, java.lang.String id)
Find an archive unit profile by its id.RequestResponse<ArchiveUnitProfileModel>
findArchiveUnitProfiles(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode query)
Find archive unit profilesRequestResponse<ContextModel>
findContextById(VitamContext vitamContext, java.lang.String contextId)
Find a context by its idRequestResponse<ContextModel>
findContexts(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select)
Find contexts.RequestResponse<FileFormatModel>
findFormatById(VitamContext vitamContext, java.lang.String formatId)
Find a format by its id.RequestResponse<FileFormatModel>
findFormats(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select)
Find formats.RequestResponse<GriffinModel>
findGriffin(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select)
RequestResponse<GriffinModel>
findGriffinById(VitamContext vitamContext, java.lang.String id)
RequestResponse<IngestContractModel>
findIngestContractById(VitamContext vitamContext, java.lang.String contractId)
Find an entry contract by its id.RequestResponse<IngestContractModel>
findIngestContracts(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select)
Find entry contracts.RequestResponse<ManagementContractModel>
findManagementContractById(VitamContext vitamContext, java.lang.String contractId)
Find an management contracts by its id.RequestResponse<ManagementContractModel>
findManagementContracts(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select)
Find management contracts.RequestResponse<OntologyModel>
findOntologies(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode query)
Find ontologiesRequestResponse<OntologyModel>
findOntologyById(VitamContext vitamContext, java.lang.String id)
Find an ontology by its id.RequestResponse<PreservationScenarioModel>
findPreservationScenario(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select)
RequestResponse<PreservationScenarioModel>
findPreservationScenarioById(VitamContext vitamContext, java.lang.String id)
RequestResponse<ProfileModel>
findProfileById(VitamContext vitamContext, java.lang.String profileId)
Find a profile by its id.RequestResponse<ProfileModel>
findProfiles(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select)
Find profiles.RequestResponse<FileRulesModel>
findRuleById(VitamContext vitamContext, java.lang.String ruleId)
Find a rule by its id.RequestResponse<FileRulesModel>
findRules(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select)
Find rules.RequestResponse<SecurityProfileModel>
findSecurityProfileById(VitamContext vitamContext, java.lang.String identifier)
Find a security profile by its identifier.RequestResponse<SecurityProfileModel>
findSecurityProfiles(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select)
Find security profiles by query dsl.RequestResponse
getAccessionRegisterDetail(VitamContext vitamContext, java.lang.String id, com.fasterxml.jackson.databind.JsonNode query)
Get the accession register details matching the given queryRequestResponse<ItemStatus>
getOperationProcessExecutionDetails(VitamContext vitamContext, java.lang.String id)
RequestResponse<ItemStatus>
getOperationProcessStatus(VitamContext vitamContext, java.lang.String id)
Get vitam operation statusRequestResponse<WorkFlow>
getWorkflowDefinitions(VitamContext vitamContext)
RequestResponse
importGriffin(VitamContext vitamContext, java.io.InputStream griffinStream, java.lang.String fileName)
RequestResponse
importOntologies(boolean forceUpdate, VitamContext vitamContext, java.io.InputStream profiles)
Import a set of ontologies metadata.RequestResponse
importPreservationScenario(VitamContext vitamContext, java.io.InputStream stream, java.lang.String fileName)
RequestResponse
launchAudit(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode auditOption)
Check the existence of objects in the context of an auditRequestResponse<ProcessDetail>
listOperationsDetails(VitamContext vitamContext, ProcessQuery query)
Get the list of operations detailsRequestResponse
rectificationAudit(VitamContext vitamContext, java.lang.String operationId)
launch a rectification audit for the operation idRequestResponse
updateAccessContract(VitamContext vitamContext, java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl)
Update the given access contract by query dslRequestResponse
updateArchiveUnitProfile(VitamContext vitamContext, java.lang.String archiveUnitprofileId, com.fasterxml.jackson.databind.JsonNode queryDSL)
Update the given archive unit profile by query DSLRequestResponse
updateContext(VitamContext vitamContext, java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl)
Update the context by query dslRequestResponse
updateIngestContract(VitamContext vitamContext, java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl)
Update the given ingest contract by query dslRequestResponse
updateManagementContract(VitamContext vitamContext, java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl)
Update the given management contract by query dslRequestResponse<ItemStatus>
updateOperationActionProcess(VitamContext vitamContext, java.lang.String actionId, java.lang.String id)
Update the operation according to the requested actionRequestResponse
updateProfile(VitamContext vitamContext, java.lang.String profileMetadataId, com.fasterxml.jackson.databind.JsonNode queryDsl)
Update the detail of the profileRequestResponse
updateSecurityProfile(VitamContext vitamContext, java.lang.String identifier, com.fasterxml.jackson.databind.JsonNode queryDsl)
Updates the given security profile by query dsl-
Methods inherited from class fr.gouv.vitam.common.external.client.AbstractMockClient
checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface fr.gouv.vitam.common.client.MockOrRestClient
checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
-
-
-
-
Field Detail
-
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAccessionRegisterDetail
public RequestResponse getAccessionRegisterDetail(VitamContext vitamContext, java.lang.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, java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl) throws InvalidParseOperationException, 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:
InvalidParseOperationException
AccessExternalClientException
-
updateIngestContract
public RequestResponse updateIngestContract(VitamContext vitamContext, java.lang.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, java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl) throws InvalidParseOperationException, 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:
InvalidParseOperationException
AccessExternalClientException
-
createProfiles
public RequestResponse createProfiles(VitamContext vitamContext, java.io.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, java.lang.String profileMetadataId, java.io.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, java.lang.String profileMetadataId) throws AccessExternalClientException
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
-
createContexts
public RequestResponse createContexts(VitamContext vitamContext, java.io.InputStream contexts) throws InvalidParseOperationException
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
-
updateContext
public RequestResponse updateContext(VitamContext vitamContext, java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl) throws AccessExternalClientException, InvalidParseOperationException
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
InvalidParseOperationException
-
checkTraceabilityOperation
public RequestResponse checkTraceabilityOperation(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode query) throws AccessExternalClientServerException, InvalidParseOperationException
- Specified by:
checkTraceabilityOperation
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam context- Throws:
AccessExternalClientServerException
InvalidParseOperationException
-
checkTraceabilityOperations
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> checkTraceabilityOperations(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode query) throws InvalidParseOperationException
- Specified by:
checkTraceabilityOperations
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextquery
- DSL query to select traceability operations to verify- Throws:
InvalidParseOperationException
-
downloadTraceabilityOperationFile
public javax.ws.rs.core.Response downloadTraceabilityOperationFile(VitamContext vitamContext, java.lang.String operationId) throws AccessExternalClientServerException
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
-
launchAudit
public RequestResponse launchAudit(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode auditOption)
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
-
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
-
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
-
findAccessionRegisterDetails
public RequestResponse<AccessionRegisterDetailModel> findAccessionRegisterDetails(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode select)
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
-
findFormatById
public RequestResponse<FileFormatModel> findFormatById(VitamContext vitamContext, java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.lang.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)
Description copied from interface:AdminExternalClient
Find agencies- Specified by:
findAgencies
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextquery
- select query- Returns:
- list of agencies
-
findAgencyByID
public RequestResponse<AgenciesModel> findAgencyByID(VitamContext vitamContext, java.lang.String agencyById) throws VitamClientException
Description copied from interface:AdminExternalClient
Find an agency by its id.- Specified by:
findAgencyByID
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextagencyById
- the agency id- Returns:
- an agency
- Throws:
VitamClientException
-
updateSecurityProfile
public RequestResponse updateSecurityProfile(VitamContext vitamContext, java.lang.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
-
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
-
findSecurityProfileById
public RequestResponse<SecurityProfileModel> findSecurityProfileById(VitamContext vitamContext, java.lang.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
-
updateProfile
public RequestResponse updateProfile(VitamContext vitamContext, java.lang.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
-
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
-
getOperationProcessStatus
public RequestResponse<ItemStatus> getOperationProcessStatus(VitamContext vitamContext, java.lang.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
-
getOperationProcessExecutionDetails
public RequestResponse<ItemStatus> getOperationProcessExecutionDetails(VitamContext vitamContext, java.lang.String id) throws VitamClientException
- Specified by:
getOperationProcessExecutionDetails
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam context- Returns:
- the details of the operation
- Throws:
VitamClientException
-
cancelOperationProcessExecution
public RequestResponse<ItemStatus> cancelOperationProcessExecution(VitamContext vitamContext, java.lang.String id) throws VitamClientException
Description copied from interface:AdminExternalClient
Cancel the operation- Specified by:
cancelOperationProcessExecution
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam context- Returns:
- the status
- Throws:
VitamClientException
-
updateOperationActionProcess
public RequestResponse<ItemStatus> updateOperationActionProcess(VitamContext vitamContext, java.lang.String actionId, java.lang.String id) 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
-
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, java.io.InputStream agencies, java.lang.String filename) throws AccessExternalClientException, InvalidParseOperationException
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
InvalidParseOperationException
-
createFormats
public RequestResponse createFormats(VitamContext vitamContext, java.io.InputStream formats, java.lang.String filename) throws AccessExternalClientException, InvalidParseOperationException
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
InvalidParseOperationException
-
createRules
public RequestResponse createRules(VitamContext vitamContext, java.io.InputStream rules, java.lang.String filename) throws AccessExternalClientException, InvalidParseOperationException
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
InvalidParseOperationException
-
createSecurityProfiles
public RequestResponse createSecurityProfiles(VitamContext vitamContext, java.io.InputStream securityProfiles, java.lang.String filename) throws AccessExternalClientException, InvalidParseOperationException, VitamClientException
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
InvalidParseOperationException
VitamClientException
-
checkRules
public javax.ws.rs.core.Response checkRules(VitamContext vitamContext, java.io.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, java.io.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, java.io.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, java.io.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, java.io.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, java.io.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
-
downloadRulesReport
public javax.ws.rs.core.Response downloadRulesReport(VitamContext vitamContext, java.lang.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
-
downloadDistributionReport
public javax.ws.rs.core.Response downloadDistributionReport(VitamContext vitamContext, java.lang.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, java.lang.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
-
downloadRulesCsvAsStream
public javax.ws.rs.core.Response downloadRulesCsvAsStream(VitamContext vitamContext, java.lang.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
-
downloadAgenciesCsvAsStream
public javax.ws.rs.core.Response downloadAgenciesCsvAsStream(VitamContext vitamContext, java.lang.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
-
evidenceAudit
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> evidenceAudit(VitamContext vitamContext, com.fasterxml.jackson.databind.JsonNode queryDsl)
Description copied from interface:AdminExternalClient
launch a traceability audit for the request- Specified by:
evidenceAudit
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitamContextqueryDsl
- the queryDsl- Returns:
- RequestResponse
-
rectificationAudit
public RequestResponse rectificationAudit(VitamContext vitamContext, java.lang.String operationId)
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
-
exportProbativeValue
public RequestResponse exportProbativeValue(VitamContext vitamContext, ProbativeValueRequest probativeValueRequest)
Description copied from interface:AdminExternalClient
launch probative value process- Specified by:
exportProbativeValue
in interfaceAdminExternalClient
- Parameters:
vitamContext
- the vitam contextprobativeValueRequest
- the request- Returns:
- RequestResponse
-
createArchiveUnitProfile
public RequestResponse createArchiveUnitProfile(VitamContext vitamContext, java.io.InputStream docTypes)
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 contextdocTypes
- archive unit profiles as Json InputStream- Returns:
- Vitam response
-
findArchiveUnitProfileById
public RequestResponse<ArchiveUnitProfileModel> findArchiveUnitProfileById(VitamContext vitamContext, java.lang.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, java.lang.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, java.io.InputStream profiles) 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 contextprofiles
- as Json InputStream- Returns:
- Vitam response
- Throws:
InvalidParseOperationException
AccessExternalClientException
-
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
-
findOntologyById
public RequestResponse<OntologyModel> findOntologyById(VitamContext vitamContext, java.lang.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
-
importGriffin
public RequestResponse importGriffin(VitamContext vitamContext, java.io.InputStream griffinStream, java.lang.String fileName) throws VitamClientException, AccessExternalClientException
- Specified by:
importGriffin
in interfaceAdminExternalClient
- Throws:
VitamClientException
AccessExternalClientException
-
importPreservationScenario
public RequestResponse importPreservationScenario(VitamContext vitamContext, java.io.InputStream stream, java.lang.String fileName) throws VitamClientException, AccessExternalClientException
- Specified by:
importPreservationScenario
in interfaceAdminExternalClient
- Throws:
VitamClientException
AccessExternalClientException
-
findGriffinById
public RequestResponse<GriffinModel> findGriffinById(VitamContext vitamContext, java.lang.String id) throws VitamClientException
- Specified by:
findGriffinById
in interfaceAdminExternalClient
- Throws:
VitamClientException
-
findPreservationScenarioById
public RequestResponse<PreservationScenarioModel> findPreservationScenarioById(VitamContext vitamContext, java.lang.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
-
-