Class AdminManagementClientMock
- java.lang.Object
-
- fr.gouv.vitam.common.client.AbstractMockClient
-
- fr.gouv.vitam.functional.administration.client.AdminManagementClientMock
-
- All Implemented Interfaces:
MockOrRestClient
,VitamAutoCloseable
,AdminManagementClient
,java.lang.AutoCloseable
public class AdminManagementClientMock extends AbstractMockClient implements AdminManagementClient
Mock client implementation for AdminManagement
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class fr.gouv.vitam.common.client.AbstractMockClient
AbstractMockClient.FakeInboundResponse
-
-
Constructor Summary
Constructors Constructor Description AdminManagementClientMock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
checkAgenciesFile(java.io.InputStream stream)
Check if agencies file is well formatedjavax.ws.rs.core.Response
checkFormat(java.io.InputStream stream)
javax.ws.rs.core.Response
checkRulesFile(java.io.InputStream stream)
Check if rule file is well formatedRequestResponse<AccessionRegisterSymbolic>
createAccessionRegisterSymbolic(java.util.List<java.lang.Integer> tenants)
Creates and return the accession register symbolic.RequestResponse
createArchiveUnitProfiles(java.util.List<ArchiveUnitProfileModel> archiveUnitProfileModelList)
Import a set of archive unit profile metadata.javax.ws.rs.core.Response.Status
createExternalOperation(LogbookOperationParameters logbookOperationparams)
Create external logbook operation entry
RequestResponse
createOrUpdateAccessionRegister(AccessionRegisterDetailModel register)
RequestResponse
createProfiles(java.util.List<ProfileModel> profileModelList)
Import a set of profile If all the profiles are valid, they will be stored in the collection and indexed The input is invalid in the following situations : The json is invalid The json contains 2 ore many profile having the same name One or more mandatory field is missing A field has an invalid format One or many profiles already exist in the databasejavax.ws.rs.core.Response
downloadProfileFile(java.lang.String profileMetadataId)
Download the profile file according to profileMetadataIdRequestResponse<com.fasterxml.jackson.databind.JsonNode>
evidenceAudit(com.fasterxml.jackson.databind.JsonNode query)
launch a traceability audit for the unitRequestResponse<com.fasterxml.jackson.databind.JsonNode>
exportProbativeValue(ProbativeValueRequest queryDsl)
Launch an probative value export for the queryRequestResponse
findAccessContracts(com.fasterxml.jackson.databind.JsonNode queryDsl)
Find access contracts By id mongo By the name By comlexe criteriaRequestResponse
findAccessContractsByID(java.lang.String documentId)
RequestResponse<ArchiveUnitProfileModel>
findArchiveUnitProfiles(com.fasterxml.jackson.databind.JsonNode query)
Find profiles according to the given json query (we can also use this method to find profile by identifier)RequestResponse<ArchiveUnitProfileModel>
findArchiveUnitProfilesByID(java.lang.String requestedId)
Find archive unit profile by technical id (id generated by the database)RequestResponse<ContextModel>
findContextById(java.lang.String id)
Find context by idRequestResponse<ContextModel>
findContexts(com.fasterxml.jackson.databind.JsonNode queryDsl)
Find contextsRequestResponse<GriffinModel>
findGriffin(com.fasterxml.jackson.databind.JsonNode dslQuery)
RequestResponse<GriffinModel>
findGriffinByID(java.lang.String id)
RequestResponse<IngestContractModel>
findIngestContracts(com.fasterxml.jackson.databind.JsonNode query)
RequestResponse<IngestContractModel>
findIngestContractsByID(java.lang.String id)
RequestResponse<com.fasterxml.jackson.databind.JsonNode>
findJobs()
RequestResponse
findManagementContracts(com.fasterxml.jackson.databind.JsonNode queryDsl)
Find management contracts By id mongo By the name By comlexe criteriaRequestResponse
findManagementContractsByID(java.lang.String documentId)
RequestResponse<OntologyModel>
findOntologies(com.fasterxml.jackson.databind.JsonNode query)
Find ontologies according to the given json query (we can also use this method to find ontology by identifier)RequestResponse<OntologyModel>
findOntologyByID(java.lang.String requestedId)
Find the ontology by technical id (id generated by the database)RequestResponse<PreservationScenarioModel>
findPreservation(com.fasterxml.jackson.databind.JsonNode dslQuery)
RequestResponse<PreservationScenarioModel>
findPreservationByID(java.lang.String id)
RequestResponse<ProfileModel>
findProfiles(com.fasterxml.jackson.databind.JsonNode query)
Find profiles according to the given query string (we can also use this method to find profile by identifier)RequestResponse<ProfileModel>
findProfilesByID(java.lang.String id)
Find profile by id (id generated by the database)RequestResponse
findSecurityProfileByIdentifier(java.lang.String identifier)
Find a security profile by identifierRequestResponse
findSecurityProfiles(com.fasterxml.jackson.databind.JsonNode queryDsl)
Find security profiles by DSL query By internal id By identifier By name By comlexe criteriaRequestResponse
forcePause(ProcessPause info)
Pause the processes specified by ProcessPause infoRequestResponse
getAccessionRegister(com.fasterxml.jackson.databind.JsonNode query)
Get the accession register summary matching the given queryRequestResponse<AccessionRegisterDetailModel>
getAccessionRegisterDetail(com.fasterxml.jackson.databind.JsonNode query)
Get the accession register details matching the given queryRequestResponse
getAccessionRegisterDetail(java.lang.String originatingAgency, com.fasterxml.jackson.databind.JsonNode query)
Get the accession register details matching the given query for the specified contractRequestResponse<AccessionRegisterSymbolicModel>
getAccessionRegisterSymbolic(java.lang.Integer tenant, com.fasterxml.jackson.databind.JsonNode queryDsl)
Retrieve the accession register symbolic regarding the tenant and a date range.com.fasterxml.jackson.databind.JsonNode
getAgencies(com.fasterxml.jackson.databind.JsonNode query)
List the agencies that match the queryRequestResponse<AgenciesModel>
getAgencyById(java.lang.String id)
com.fasterxml.jackson.databind.JsonNode
getFormatByID(java.lang.String id)
RequestResponse<FileFormatModel>
getFormats(com.fasterxml.jackson.databind.JsonNode query)
com.fasterxml.jackson.databind.JsonNode
getRuleByID(java.lang.String id)
com.fasterxml.jackson.databind.JsonNode
getRules(com.fasterxml.jackson.databind.JsonNode query)
List the rules that match the queryjavax.ws.rs.core.Response.Status
importAccessContracts(java.util.List<AccessContractModel> accessContractModelList)
Import 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 have an id already set The json contains 2 ore 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 databasejavax.ws.rs.core.Response.Status
importAgenciesFile(java.io.InputStream stream, java.lang.String filename)
Import agencies for a given tenantjavax.ws.rs.core.Response.Status
importContexts(java.util.List<ContextModel> contextModelList)
Import a set of contextjavax.ws.rs.core.Response.Status
importFormat(java.io.InputStream stream, java.lang.String filename)
RequestResponse
importGriffins(java.util.List<GriffinModel> griffinModelList)
javax.ws.rs.core.Response.Status
importIngestContracts(java.util.List<IngestContractModel> ingestContractModelList)
Import 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 ore 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 databasejavax.ws.rs.core.Response.Status
importManagementContracts(java.util.List<ManagementContractModel> accessContractModelList)
Import a set of management 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 have an id already set The json contains 2 ore 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 storage strategies are invalidRequestResponse
importOntologies(boolean forceUpdate, java.util.List<OntologyModel> ontologyModelList)
Import a set of ontologies metadata.RequestResponse
importPreservationScenarios(java.util.List<PreservationScenarioModel> preservationScenarioModelList)
RequestResponse
importProfileFile(java.lang.String profileMetadataId, java.io.InputStream stream)
javax.ws.rs.core.Response.Status
importRulesFile(java.io.InputStream stream, java.lang.String filename)
Import a the set of rules for a given tenantjavax.ws.rs.core.Response.Status
importSecurityProfiles(java.util.List<SecurityProfileModel> securityProfileModelList)
Import a set of security profiles after passing the validation steps.RequestResponse<com.fasterxml.jackson.databind.JsonNode>
launchAuditWorkflow(AuditOptions options, boolean checkAccessContract)
launch audit with optionsRequestResponse<com.fasterxml.jackson.databind.JsonNode>
launchReferentialAudit(AuditReferentialOptions auditReferentialOptions)
RequestResponse<ReindexationResult>
launchReindexation(com.fasterxml.jackson.databind.JsonNode options)
launch a reindexation process with optionsRequestResponse<com.fasterxml.jackson.databind.JsonNode>
launchRuleAudit(java.util.List<java.lang.Integer> tenants)
launch audit for rule managementvoid
reconstructAccessionRegister(java.util.List<ReconstructionRequestItem> reconstructionItems)
void
reconstructCollection(java.lang.String collection)
RequestResponse<com.fasterxml.jackson.databind.JsonNode>
rectificationAudit(java.lang.String operationId)
Launch rectification AuditRequestResponse
removeForcePause(ProcessPause info)
Remove the pause for the processes specified by ProcessPause infoRequestResponse<java.lang.Boolean>
securityProfileIsUsedInContexts(java.lang.String securityProfileId)
Find if security profile is used in contextsRequestResponse<ReindexationResult>
switchIndexes(com.fasterxml.jackson.databind.JsonNode options)
launch an index switch.RequestResponse<AccessContractModel>
updateAccessContract(java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl)
Update AccessContract to mongoRequestResponse<ArchiveUnitProfileModel>
updateArchiveUnitProfile(java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl)
Update a profileRequestResponse<ContextModel>
updateContext(java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl)
Update context to mongoRequestResponse<IngestContractModel>
updateIngestContract(java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl)
Update IngestContract to mongoRequestResponse<ManagementContractModel>
updateManagementContract(java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl)
Update ManagementContract to mongoRequestResponse<ProfileModel>
updateProfile(java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl)
Update a profileRequestResponse<SecurityProfileModel>
updateSecurityProfile(java.lang.String identifier, com.fasterxml.jackson.databind.JsonNode queryDsl)
Updates a security context-
Methods inherited from class fr.gouv.vitam.common.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
-
-
-
-
Method Detail
-
checkFormat
public javax.ws.rs.core.Response checkFormat(java.io.InputStream stream) throws FileFormatException
- Specified by:
checkFormat
in interfaceAdminManagementClient
- Parameters:
stream
- as InputStream;- Returns:
- Response
- Throws:
FileFormatException
-
importFormat
public javax.ws.rs.core.Response.Status importFormat(java.io.InputStream stream, java.lang.String filename) throws FileFormatException
- Specified by:
importFormat
in interfaceAdminManagementClient
- Parameters:
stream
- as InputStreamfilename
- name of the imported file- Returns:
- the response to the request
- Throws:
FileFormatException
-
getFormatByID
public com.fasterxml.jackson.databind.JsonNode getFormatByID(java.lang.String id) throws FileFormatException, InvalidParseOperationException
- Specified by:
getFormatByID
in interfaceAdminManagementClient
- Parameters:
id
- as String- Returns:
- JsonNode
- Throws:
InvalidParseOperationException
- when json exception occursFileFormatException
-
getFormats
public RequestResponse<FileFormatModel> getFormats(com.fasterxml.jackson.databind.JsonNode query) throws FileFormatException, InvalidParseOperationException, java.io.IOException
- Specified by:
getFormats
in interfaceAdminManagementClient
- Parameters:
query
- as JsonNode- Returns:
- JsonNode
- Throws:
InvalidParseOperationException
- when json exception occursjava.io.IOException
- when io data exception occursFileFormatException
-
checkRulesFile
public javax.ws.rs.core.Response checkRulesFile(java.io.InputStream stream) throws FileRulesException
Description copied from interface:AdminManagementClient
Check if rule file is well formated- Specified by:
checkRulesFile
in interfaceAdminManagementClient
- Parameters:
stream
- rule file inputstream to check- Returns:
- Response
- Throws:
FileRulesException
-
checkAgenciesFile
public javax.ws.rs.core.Response checkAgenciesFile(java.io.InputStream stream) throws ReferentialException
Description copied from interface:AdminManagementClient
Check if agencies file is well formated- Specified by:
checkAgenciesFile
in interfaceAdminManagementClient
- Parameters:
stream
- agencies file inputstream to check- Returns:
- Response
- Throws:
FileRulesException
AdminManagementClientServerException
ReferentialException
-
importRulesFile
public javax.ws.rs.core.Response.Status importRulesFile(java.io.InputStream stream, java.lang.String filename) throws ReferentialException, DatabaseConflictException
Description copied from interface:AdminManagementClient
Import a the set of rules for a given tenant- Specified by:
importRulesFile
in interfaceAdminManagementClient
- Parameters:
stream
- rule file inputstream to importfilename
- name of the imported file- Returns:
- the response to the request
- Throws:
ReferentialException
- when file rules exception occursAdminManagementClientServerException
DatabaseConflictException
- when Database conflict exception occurs
-
importAgenciesFile
public javax.ws.rs.core.Response.Status importAgenciesFile(java.io.InputStream stream, java.lang.String filename) throws ReferentialException
Description copied from interface:AdminManagementClient
Import agencies for a given tenant- Specified by:
importAgenciesFile
in interfaceAdminManagementClient
- Parameters:
stream
- agency file inputstream to importfilename
- name of the imported file- Returns:
- the response to the request
- Throws:
ReferentialException
- when file rules exception occursAdminManagementClientServerException
-
getAgencies
public com.fasterxml.jackson.databind.JsonNode getAgencies(com.fasterxml.jackson.databind.JsonNode query) throws InvalidParseOperationException
Description copied from interface:AdminManagementClient
List the agencies that match the query- Specified by:
getAgencies
in interfaceAdminManagementClient
- Parameters:
query
- to get agencies- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
- when a parse problem occurs
-
getRuleByID
public com.fasterxml.jackson.databind.JsonNode getRuleByID(java.lang.String id) throws FileRulesException, InvalidParseOperationException
- Specified by:
getRuleByID
in interfaceAdminManagementClient
- Parameters:
id
- The rule identifier- Returns:
- Rule in JsonNode format
- Throws:
FileRulesException
- when file rules exception occursInvalidParseOperationException
- when a parse problem occurs
-
getAgencyById
public RequestResponse<AgenciesModel> getAgencyById(java.lang.String id) throws InvalidParseOperationException, ReferentialNotFoundException, AdminManagementClientServerException
- Specified by:
getAgencyById
in interfaceAdminManagementClient
- Parameters:
id
- The agency identifier- Returns:
- agency in JsonNode agency
- Throws:
InvalidParseOperationException
- when a parse problem occursReferentialNotFoundException
- when file referential exception occursAdminManagementClientServerException
-
getRules
public com.fasterxml.jackson.databind.JsonNode getRules(com.fasterxml.jackson.databind.JsonNode query) throws FileRulesException, InvalidParseOperationException, java.io.IOException
Description copied from interface:AdminManagementClient
List the rules that match the query- Specified by:
getRules
in interfaceAdminManagementClient
- Parameters:
query
- to get rule- Returns:
- Rules in JsonNode format
- Throws:
FileRulesException
- when file rules exception occursInvalidParseOperationException
- when a parse problem occursjava.io.IOException
- when IO Exception occurs
-
createOrUpdateAccessionRegister
public RequestResponse createOrUpdateAccessionRegister(AccessionRegisterDetailModel register)
- Specified by:
createOrUpdateAccessionRegister
in interfaceAdminManagementClient
- Parameters:
register
- AccessionRegisterDetail
-
getAccessionRegister
public RequestResponse getAccessionRegister(com.fasterxml.jackson.databind.JsonNode query) throws InvalidParseOperationException
Description copied from interface:AdminManagementClient
Get the accession register summary matching the given query- Specified by:
getAccessionRegister
in interfaceAdminManagementClient
- Parameters:
query
- The DSL Query as JsonNode- Returns:
- instance of RequestResponse of type AccessionRegisterSummaryModel
- Throws:
InvalidParseOperationException
-
getAccessionRegisterDetail
public RequestResponse getAccessionRegisterDetail(java.lang.String originatingAgency, com.fasterxml.jackson.databind.JsonNode query) throws InvalidParseOperationException
Description copied from interface:AdminManagementClient
Get the accession register details matching the given query for the specified contract- Specified by:
getAccessionRegisterDetail
in interfaceAdminManagementClient
query
- The DSL Query as a JSON Node- Returns:
- The AccessionregisterDetails list as a response jsonNode
- Throws:
InvalidParseOperationException
-
getAccessionRegisterDetail
public RequestResponse<AccessionRegisterDetailModel> getAccessionRegisterDetail(com.fasterxml.jackson.databind.JsonNode query)
Description copied from interface:AdminManagementClient
Get the accession register details matching the given query- Specified by:
getAccessionRegisterDetail
in interfaceAdminManagementClient
- Parameters:
query
- The DSL Query as a JSON Node- Returns:
- The AccessionregisterDetails list as a response jsonNode
-
importIngestContracts
public javax.ws.rs.core.Response.Status importIngestContracts(java.util.List<IngestContractModel> ingestContractModelList)
Description copied from interface:AdminManagementClient
Import 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 ore 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:
importIngestContracts
in interfaceAdminManagementClient
- Parameters:
ingestContractModelList
- the contract to import- Returns:
- The server response as vitam RequestResponse
-
importAccessContracts
public javax.ws.rs.core.Response.Status importAccessContracts(java.util.List<AccessContractModel> accessContractModelList) throws InvalidParseOperationException, AdminManagementClientServerException
Description copied from interface:AdminManagementClient
Import 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 have an id already set
- The json contains 2 ore 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:
importAccessContracts
in interfaceAdminManagementClient
- Parameters:
accessContractModelList
- the list contract to import- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
-
importManagementContracts
public javax.ws.rs.core.Response.Status importManagementContracts(java.util.List<ManagementContractModel> accessContractModelList) throws InvalidParseOperationException, AdminManagementClientServerException
Description copied from interface:AdminManagementClient
Import a set of management 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 have an id already set
- The json contains 2 ore 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 storage strategies are invalid
- Specified by:
importManagementContracts
in interfaceAdminManagementClient
- Parameters:
accessContractModelList
- the list contract to import- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
-
findAccessContracts
public RequestResponse findAccessContracts(com.fasterxml.jackson.databind.JsonNode queryDsl) throws InvalidParseOperationException, AdminManagementClientServerException
Description copied from interface:AdminManagementClient
Find access contracts- By id mongo
- By the name
- By comlexe criteria
- Specified by:
findAccessContracts
in interfaceAdminManagementClient
- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
-
findAccessContractsByID
public RequestResponse findAccessContractsByID(java.lang.String documentId) throws InvalidParseOperationException, AdminManagementClientServerException
- Specified by:
findAccessContractsByID
in interfaceAdminManagementClient
- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
-
findIngestContracts
public RequestResponse<IngestContractModel> findIngestContracts(com.fasterxml.jackson.databind.JsonNode query) throws InvalidParseOperationException, AdminManagementClientServerException
- Specified by:
findIngestContracts
in interfaceAdminManagementClient
- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
-
findIngestContractsByID
public RequestResponse<IngestContractModel> findIngestContractsByID(java.lang.String id) throws InvalidParseOperationException, AdminManagementClientServerException, ReferentialNotFoundException
- Specified by:
findIngestContractsByID
in interfaceAdminManagementClient
- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
ReferentialNotFoundException
-
findManagementContracts
public RequestResponse findManagementContracts(com.fasterxml.jackson.databind.JsonNode queryDsl) throws InvalidParseOperationException, AdminManagementClientServerException
Description copied from interface:AdminManagementClient
Find management contracts- By id mongo
- By the name
- By comlexe criteria
- Specified by:
findManagementContracts
in interfaceAdminManagementClient
- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
-
findManagementContractsByID
public RequestResponse findManagementContractsByID(java.lang.String documentId) throws InvalidParseOperationException, AdminManagementClientServerException
- Specified by:
findManagementContractsByID
in interfaceAdminManagementClient
- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
-
createProfiles
public RequestResponse createProfiles(java.util.List<ProfileModel> profileModelList) throws InvalidParseOperationException, AdminManagementClientServerException
Description copied from interface:AdminManagementClient
Import a set of profile If all the profiles are valid, they will be stored in the collection and indexed The input is invalid in the following situations :- The json is invalid
- The json contains 2 ore many profile having the same name
- One or more mandatory field is missing
- A field has an invalid format
- One or many profiles already exist in the database
- Specified by:
createProfiles
in interfaceAdminManagementClient
- Parameters:
profileModelList
- the list profile to import- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
-
importProfileFile
public RequestResponse importProfileFile(java.lang.String profileMetadataId, java.io.InputStream stream) throws ReferentialException, DatabaseConflictException
- Specified by:
importProfileFile
in interfaceAdminManagementClient
- Parameters:
profileMetadataId
- the id of the profile metadata corresponding to the filestream
- as InputStream- Returns:
- the response to the request
- Throws:
ReferentialException
- when import exception occursDatabaseConflictException
- conflict exception occurs
-
downloadProfileFile
public javax.ws.rs.core.Response downloadProfileFile(java.lang.String profileMetadataId) throws AdminManagementClientServerException, ProfileNotFoundException
Description copied from interface:AdminManagementClient
Download the profile file according to profileMetadataId- Specified by:
downloadProfileFile
in interfaceAdminManagementClient
- Returns:
- Response
- Throws:
AdminManagementClientServerException
ProfileNotFoundException
-
findProfiles
public RequestResponse<ProfileModel> findProfiles(com.fasterxml.jackson.databind.JsonNode query) throws InvalidParseOperationException, AdminManagementClientServerException
Description copied from interface:AdminManagementClient
Find profiles according to the given query string (we can also use this method to find profile by identifier)- Specified by:
findProfiles
in interfaceAdminManagementClient
- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
-
findProfilesByID
public RequestResponse<ProfileModel> findProfilesByID(java.lang.String id) throws InvalidParseOperationException, AdminManagementClientServerException, ReferentialNotFoundException
Description copied from interface:AdminManagementClient
Find profile by id (id generated by the database)- Specified by:
findProfilesByID
in interfaceAdminManagementClient
- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
ReferentialNotFoundException
-
createArchiveUnitProfiles
public RequestResponse createArchiveUnitProfiles(java.util.List<ArchiveUnitProfileModel> archiveUnitProfileModelList) throws InvalidParseOperationException, AdminManagementClientServerException
Description copied from interface:AdminManagementClient
Import a set of archive unit profile metadata. If all the archive unit profiles are valid, they will be stored in the collection and indexed The input is invalid in the following situations :- The json is invalid
- The json contains 2 ore many profile having the same name
- One or more mandatory field is missing
- A field has an invalid format
- One or many profiles already exist in the database
- Specified by:
createArchiveUnitProfiles
in interfaceAdminManagementClient
- Parameters:
archiveUnitProfileModelList
- the list profile to import- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
-
findArchiveUnitProfiles
public RequestResponse<ArchiveUnitProfileModel> findArchiveUnitProfiles(com.fasterxml.jackson.databind.JsonNode query) throws InvalidParseOperationException, AdminManagementClientServerException
Description copied from interface:AdminManagementClient
Find profiles according to the given json query (we can also use this method to find profile by identifier)- Specified by:
findArchiveUnitProfiles
in interfaceAdminManagementClient
- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
-
findArchiveUnitProfilesByID
public RequestResponse<ArchiveUnitProfileModel> findArchiveUnitProfilesByID(java.lang.String requestedId) throws InvalidParseOperationException, AdminManagementClientServerException, ReferentialNotFoundException
Description copied from interface:AdminManagementClient
Find archive unit profile by technical id (id generated by the database)- Specified by:
findArchiveUnitProfilesByID
in interfaceAdminManagementClient
- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
ReferentialNotFoundException
-
updateArchiveUnitProfile
public RequestResponse<ArchiveUnitProfileModel> updateArchiveUnitProfile(java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl) throws InvalidParseOperationException, AdminManagementClientServerException, ReferentialNotFoundException
Description copied from interface:AdminManagementClient
Update a profile- Specified by:
updateArchiveUnitProfile
in interfaceAdminManagementClient
- Returns:
- the updated ProfileModel for success
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
ReferentialNotFoundException
-
updateAccessContract
public RequestResponse<AccessContractModel> updateAccessContract(java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl) throws InvalidParseOperationException, AdminManagementClientServerException
Description copied from interface:AdminManagementClient
Update AccessContract to mongo- Specified by:
updateAccessContract
in interfaceAdminManagementClient
- Parameters:
id
- the given access contract id to updatequeryDsl
- query to execute- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
-
updateIngestContract
public RequestResponse<IngestContractModel> updateIngestContract(java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl) throws InvalidParseOperationException, AdminManagementClientServerException
Description copied from interface:AdminManagementClient
Update IngestContract to mongo- Specified by:
updateIngestContract
in interfaceAdminManagementClient
- Parameters:
id
- the given Ingest contract id to updatequeryDsl
- query to execute- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
-
updateManagementContract
public RequestResponse<ManagementContractModel> updateManagementContract(java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl) throws InvalidParseOperationException, AdminManagementClientServerException
Description copied from interface:AdminManagementClient
Update ManagementContract to mongo- Specified by:
updateManagementContract
in interfaceAdminManagementClient
- Parameters:
id
- the given access contract id to updatequeryDsl
- query to execute- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
-
importContexts
public javax.ws.rs.core.Response.Status importContexts(java.util.List<ContextModel> contextModelList) throws ReferentialException
Description copied from interface:AdminManagementClient
Import a set of context- Specified by:
importContexts
in interfaceAdminManagementClient
- Returns:
- Status
- Throws:
ReferentialException
-
updateContext
public RequestResponse<ContextModel> updateContext(java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl) throws InvalidParseOperationException
Description copied from interface:AdminManagementClient
Update context to mongo- Specified by:
updateContext
in interfaceAdminManagementClient
- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
-
findContexts
public RequestResponse<ContextModel> findContexts(com.fasterxml.jackson.databind.JsonNode queryDsl) throws InvalidParseOperationException
Description copied from interface:AdminManagementClient
Find contexts- Specified by:
findContexts
in interfaceAdminManagementClient
- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
-
findContextById
public RequestResponse<ContextModel> findContextById(java.lang.String id) throws InvalidParseOperationException
Description copied from interface:AdminManagementClient
Find context by id- Specified by:
findContextById
in interfaceAdminManagementClient
- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
-
securityProfileIsUsedInContexts
public RequestResponse<java.lang.Boolean> securityProfileIsUsedInContexts(java.lang.String securityProfileId) throws InvalidParseOperationException, ReferentialNotFoundException, AdminManagementClientServerException
Description copied from interface:AdminManagementClient
Find if security profile is used in contexts- Specified by:
securityProfileIsUsedInContexts
in interfaceAdminManagementClient
- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
ReferentialNotFoundException
AdminManagementClientServerException
-
launchAuditWorkflow
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> launchAuditWorkflow(AuditOptions options, boolean checkAccessContract) throws AdminManagementClientServerException
Description copied from interface:AdminManagementClient
launch audit with options- Specified by:
launchAuditWorkflow
in interfaceAdminManagementClient
- Returns:
- Throws:
AdminManagementClientServerException
-
launchRuleAudit
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> launchRuleAudit(java.util.List<java.lang.Integer> tenants)
Description copied from interface:AdminManagementClient
launch audit for rule management- Specified by:
launchRuleAudit
in interfaceAdminManagementClient
- Returns:
- The server response as vitam RequestResponse
-
launchReferentialAudit
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> launchReferentialAudit(AuditReferentialOptions auditReferentialOptions)
- Specified by:
launchReferentialAudit
in interfaceAdminManagementClient
-
importSecurityProfiles
public javax.ws.rs.core.Response.Status importSecurityProfiles(java.util.List<SecurityProfileModel> securityProfileModelList) throws InvalidParseOperationException, AdminManagementClientServerException
Description copied from interface:AdminManagementClient
Import a set of security profiles after passing the validation steps. If all the security profiles are valid, they are stored in the database. The input is invalid in the following situations :- The json is invalid
- The json contains 2 ore many contracts having the same name or identifier
- One or more mandatory field is missing
- A field has an invalid format
- One or many security profiles already exist in the database
- Specified by:
importSecurityProfiles
in interfaceAdminManagementClient
- Parameters:
securityProfileModelList
- the security profiles to import- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
-
findSecurityProfiles
public RequestResponse findSecurityProfiles(com.fasterxml.jackson.databind.JsonNode queryDsl) throws InvalidParseOperationException
Description copied from interface:AdminManagementClient
Find security profiles by DSL query- By internal id
- By identifier
- By name
- By comlexe criteria
- Specified by:
findSecurityProfiles
in interfaceAdminManagementClient
- Parameters:
queryDsl
- the DSL query- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
-
findSecurityProfileByIdentifier
public RequestResponse findSecurityProfileByIdentifier(java.lang.String identifier) throws InvalidParseOperationException
Description copied from interface:AdminManagementClient
Find a security profile by identifier- Specified by:
findSecurityProfileByIdentifier
in interfaceAdminManagementClient
- Parameters:
identifier
- the identifier of the security profile- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
-
updateSecurityProfile
public RequestResponse<SecurityProfileModel> updateSecurityProfile(java.lang.String identifier, com.fasterxml.jackson.databind.JsonNode queryDsl) throws InvalidParseOperationException, AdminManagementClientServerException
Description copied from interface:AdminManagementClient
Updates a security context- Specified by:
updateSecurityProfile
in interfaceAdminManagementClient
- Parameters:
identifier
- the identifier of the security profile to updatequeryDsl
- query to execute- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
-
updateProfile
public RequestResponse<ProfileModel> updateProfile(java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl) throws InvalidParseOperationException, AdminManagementClientServerException
Description copied from interface:AdminManagementClient
Update a profile- Specified by:
updateProfile
in interfaceAdminManagementClient
- Returns:
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
-
launchReindexation
public RequestResponse<ReindexationResult> launchReindexation(com.fasterxml.jackson.databind.JsonNode options) throws AdminManagementClientServerException
Description copied from interface:AdminManagementClient
launch a reindexation process with options- Specified by:
launchReindexation
in interfaceAdminManagementClient
- Parameters:
options
- specifying what to reindex- Returns:
- the server response including information about the newsly created index
- Throws:
AdminManagementClientServerException
-
switchIndexes
public RequestResponse<ReindexationResult> switchIndexes(com.fasterxml.jackson.databind.JsonNode options) throws AdminManagementClientServerException
Description copied from interface:AdminManagementClient
launch an index switch. By specifying the name of the index and the collection, the index will be mapped to the correct alias- Specified by:
switchIndexes
in interfaceAdminManagementClient
- Returns:
- the server response
- Throws:
AdminManagementClientServerException
-
evidenceAudit
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> evidenceAudit(com.fasterxml.jackson.databind.JsonNode query) throws AdminManagementClientServerException
Description copied from interface:AdminManagementClient
launch a traceability audit for the unit- Specified by:
evidenceAudit
in interfaceAdminManagementClient
- Parameters:
query
- the id- Returns:
- the server response
- Throws:
AdminManagementClientServerException
-
rectificationAudit
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> rectificationAudit(java.lang.String operationId)
Description copied from interface:AdminManagementClient
Launch rectification Audit- Specified by:
rectificationAudit
in interfaceAdminManagementClient
- Parameters:
operationId
- operation Id- Returns:
- RequestResponse
-
exportProbativeValue
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> exportProbativeValue(ProbativeValueRequest queryDsl)
Description copied from interface:AdminManagementClient
Launch an probative value export for the query- Specified by:
exportProbativeValue
in interfaceAdminManagementClient
- Parameters:
queryDsl
- the id- Returns:
- the server response
-
importOntologies
public RequestResponse importOntologies(boolean forceUpdate, java.util.List<OntologyModel> ontologyModelList) throws InvalidParseOperationException, AdminManagementClientServerException
Description copied from interface:AdminManagementClient
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 interfaceAdminManagementClient
ontologyModelList
- the list of ontologies to import- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
-
findOntologies
public RequestResponse<OntologyModel> findOntologies(com.fasterxml.jackson.databind.JsonNode query) throws InvalidParseOperationException
Description copied from interface:AdminManagementClient
Find ontologies according to the given json query (we can also use this method to find ontology by identifier)- Specified by:
findOntologies
in interfaceAdminManagementClient
- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
-
findOntologyByID
public RequestResponse<OntologyModel> findOntologyByID(java.lang.String requestedId) throws InvalidParseOperationException, AdminManagementClientServerException, ReferentialNotFoundException
Description copied from interface:AdminManagementClient
Find the ontology by technical id (id generated by the database)- Specified by:
findOntologyByID
in interfaceAdminManagementClient
- Returns:
- The server response as vitam RequestResponse
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
ReferentialNotFoundException
-
forcePause
public RequestResponse forcePause(ProcessPause info)
Description copied from interface:AdminManagementClient
Pause the processes specified by ProcessPause info- Specified by:
forcePause
in interfaceAdminManagementClient
- Parameters:
info
- a ProcessPause object indicating the tenant and/or the type of process to pause- Returns:
- The server response as vitam RequestResponse
-
removeForcePause
public RequestResponse removeForcePause(ProcessPause info)
Description copied from interface:AdminManagementClient
Remove the pause for the processes specified by ProcessPause info- Specified by:
removeForcePause
in interfaceAdminManagementClient
- Parameters:
info
- a ProcessPause object indicating the tenant and/or the type of process to pause- Returns:
- The server response as vitam RequestResponse
-
createAccessionRegisterSymbolic
public RequestResponse<AccessionRegisterSymbolic> createAccessionRegisterSymbolic(java.util.List<java.lang.Integer> tenants)
Description copied from interface:AdminManagementClient
Creates and return the accession register symbolic.- Specified by:
createAccessionRegisterSymbolic
in interfaceAdminManagementClient
- Parameters:
tenants
- tenants list- Returns:
- the accession register created
-
getAccessionRegisterSymbolic
public RequestResponse<AccessionRegisterSymbolicModel> getAccessionRegisterSymbolic(java.lang.Integer tenant, com.fasterxml.jackson.databind.JsonNode queryDsl) throws AdminManagementClientServerException
Description copied from interface:AdminManagementClient
Retrieve the accession register symbolic regarding the tenant and a date range.- Specified by:
getAccessionRegisterSymbolic
in interfaceAdminManagementClient
- Parameters:
tenant
- related to the accession registerqueryDsl
- search by dsl- Returns:
- a lis of accession register symbolic or a empty list if nothing is found
- Throws:
AdminManagementClientServerException
-
importGriffins
public RequestResponse importGriffins(java.util.List<GriffinModel> griffinModelList) throws AdminManagementClientServerException
- Specified by:
importGriffins
in interfaceAdminManagementClient
- Throws:
AdminManagementClientServerException
-
importPreservationScenarios
public RequestResponse importPreservationScenarios(java.util.List<PreservationScenarioModel> preservationScenarioModelList) throws AdminManagementClientServerException
- Specified by:
importPreservationScenarios
in interfaceAdminManagementClient
- Throws:
AdminManagementClientServerException
-
findGriffinByID
public RequestResponse<GriffinModel> findGriffinByID(java.lang.String id) throws InvalidParseOperationException, AdminManagementClientServerException, ReferentialNotFoundException
- Specified by:
findGriffinByID
in interfaceAdminManagementClient
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
ReferentialNotFoundException
-
findPreservationByID
public RequestResponse<PreservationScenarioModel> findPreservationByID(java.lang.String id) throws InvalidParseOperationException, AdminManagementClientServerException, ReferentialNotFoundException
- Specified by:
findPreservationByID
in interfaceAdminManagementClient
- Throws:
InvalidParseOperationException
AdminManagementClientServerException
ReferentialNotFoundException
-
findPreservation
public RequestResponse<PreservationScenarioModel> findPreservation(com.fasterxml.jackson.databind.JsonNode dslQuery) throws AdminManagementClientServerException, InvalidParseOperationException, ReferentialNotFoundException
- Specified by:
findPreservation
in interfaceAdminManagementClient
- Throws:
AdminManagementClientServerException
InvalidParseOperationException
ReferentialNotFoundException
-
findGriffin
public RequestResponse<GriffinModel> findGriffin(com.fasterxml.jackson.databind.JsonNode dslQuery)
- Specified by:
findGriffin
in interfaceAdminManagementClient
-
createExternalOperation
public javax.ws.rs.core.Response.Status createExternalOperation(LogbookOperationParameters logbookOperationparams) throws AdminManagementClientServerException, BadRequestException, LogbookClientAlreadyExistsException
Description copied from interface:AdminManagementClient
Create external logbook operation entry
- Specified by:
createExternalOperation
in interfaceAdminManagementClient
- Parameters:
logbookOperationparams
- the logbook parameters to be created- Returns:
- RequestResponse status of the insertion
- Throws:
AdminManagementClientServerException
BadRequestException
LogbookClientAlreadyExistsException
-
findJobs
public RequestResponse<com.fasterxml.jackson.databind.JsonNode> findJobs()
- Specified by:
findJobs
in interfaceAdminManagementClient
-
reconstructCollection
public void reconstructCollection(java.lang.String collection) throws AdminManagementClientServerException
- Specified by:
reconstructCollection
in interfaceAdminManagementClient
- Throws:
AdminManagementClientServerException
-
reconstructAccessionRegister
public void reconstructAccessionRegister(java.util.List<ReconstructionRequestItem> reconstructionItems) throws AdminManagementClientServerException
- Specified by:
reconstructAccessionRegister
in interfaceAdminManagementClient
- Throws:
AdminManagementClientServerException
-
-