Interface LogbookOperationsClient
- All Superinterfaces:
AutoCloseable,BasicClient,MockOrRestClient,VitamAutoCloseable
- All Known Implementing Classes:
LogbookOperationsClientMock
Logbook client interface
-
Field Summary
Fields inherited from interface fr.gouv.vitam.common.client.BasicClient
STATUS_URL -
Method Summary
Modifier and TypeMethodDescriptioncheckLifecycleTraceabilityWorkflowStatus(String processId) Check life cycle traceability status (unit / got)checkLogbookCoherencevoidcreate(LogbookOperationParameters... parameters) Create logbook entry
To be used ONLY once at top level of process startup (where eventIdentifierProcess is set for the first time).voidcreate(String eventIdProc, Iterable<LogbookOperationParameters> queue) Bulk Create
To be used ONLY once at top level of process startup (where eventIdentifierProcess is set for the first time).RequestResponse<com.fasterxml.jackson.databind.JsonNode>getLastOperationByType(String operationType) voidreconstructCollection(List<ReconstructionRequestItem> reconstructionItems) reindex(IndexParameters indexParam) Reindex a collection with parameterscom.fasterxml.jackson.databind.JsonNodeselectOperation(com.fasterxml.jackson.databind.JsonNode select) com.fasterxml.jackson.databind.JsonNodeselectOperation(com.fasterxml.jackson.databind.JsonNode select, boolean isSliced, boolean isCrossTenant) com.fasterxml.jackson.databind.JsonNodecom.fasterxml.jackson.databind.JsonNodeselectOperationById(String processId, com.fasterxml.jackson.databind.JsonNode query, boolean isSliced, boolean isCrossTenant) switchIndexes(SwitchIndexParameters switchIndexParam) Switch indexestraceability(List<Integer> tenants) Call traceability logbook operation for requested tenantsvoidtraceabilityAudit(int tenant, AuditLogbookOptions options) Starts Object Group logbook lifecycle traceabilityStarts Unit logbook lifecycle traceabilityvoidupdate(LogbookOperationParameters... parameters) Update logbook entry
To be used everywhere except very first time (when eventIdentifierProcess already used once)voidupdate(String eventIdProc, Iterable<LogbookOperationParameters> queue) Bulk Update
To be used everywhere except very first time (when eventIdentifierProcess already used once)Methods inherited from interface fr.gouv.vitam.common.client.MockOrRestClient
checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
-
Method Details
-
create
void create(LogbookOperationParameters... parameters) throws LogbookClientBadRequestException, LogbookClientAlreadyExistsException, LogbookClientServerException Create logbook entry
To be used ONLY once at top level of process startup (where eventIdentifierProcess is set for the first time).- Parameters:
parameters- the entry parameters- Throws:
LogbookClientBadRequestException- if the argument is incorrectLogbookClientAlreadyExistsException- if the element already existsLogbookClientServerException- if the Server got an internal errorIllegalArgumentException- if some mandatories parameters are empty or nullLogbookClientException- if client received an error from server
-
update
void update(LogbookOperationParameters... parameters) throws LogbookClientBadRequestException, LogbookClientNotFoundException, LogbookClientServerException Update logbook entry
To be used everywhere except very first time (when eventIdentifierProcess already used once)- Parameters:
parameters- the entry parameters- Throws:
LogbookClientBadRequestException- if the argument is incorrectLogbookClientNotFoundException- if the element was not created beforeLogbookClientServerException- if the Server got an internal errorIllegalArgumentException- if some mandatories parameters are empty or null
-
selectOperation
com.fasterxml.jackson.databind.JsonNode selectOperation(com.fasterxml.jackson.databind.JsonNode select) throws LogbookClientException, InvalidParseOperationException - Parameters:
select-- Returns:
- logbook operation as JsonNode
- Throws:
LogbookClientExceptionInvalidParseOperationException
-
selectOperation
com.fasterxml.jackson.databind.JsonNode selectOperation(com.fasterxml.jackson.databind.JsonNode select, boolean isSliced, boolean isCrossTenant) throws LogbookClientException, InvalidParseOperationException -
selectOperationById
com.fasterxml.jackson.databind.JsonNode selectOperationById(String processId, com.fasterxml.jackson.databind.JsonNode query, boolean isSliced, boolean isCrossTenant) throws LogbookClientException, InvalidParseOperationException -
selectOperationById
com.fasterxml.jackson.databind.JsonNode selectOperationById(String id) throws LogbookClientException, InvalidParseOperationException - Parameters:
id- identifier- Returns:
- logbook operation as String
- Throws:
LogbookClientException- LogbookClientExceptionInvalidParseOperationException- InvalidParseOperationException
-
create
void create(String eventIdProc, Iterable<LogbookOperationParameters> queue) throws LogbookClientBadRequestException, LogbookClientAlreadyExistsException, LogbookClientServerException Bulk Create
To be used ONLY once at top level of process startup (where eventIdentifierProcess is set for the first time).- Parameters:
eventIdProc- event Process Identifierqueue- queue of LogbookOperationParameters to create- Throws:
LogbookClientBadRequestException- if the argument is incorrectLogbookClientAlreadyExistsException- if the element already existsLogbookClientServerException- if the Server got an internal errorIllegalArgumentException- if some mandatories parameters are empty or null
-
update
void update(String eventIdProc, Iterable<LogbookOperationParameters> queue) throws LogbookClientNotFoundException, LogbookClientBadRequestException, LogbookClientServerException Bulk Update
To be used everywhere except very first time (when eventIdentifierProcess already used once)- Parameters:
eventIdProc- event Process Identifierqueue- queue of LogbookOperationParameters to update- Throws:
LogbookClientBadRequestException- if the argument is incorrectLogbookClientNotFoundException- if the element was not created beforeLogbookClientServerException- if the Server got an internal errorIllegalArgumentException- if some mandatories parameters are empty or null
-
traceability
RequestResponseOK<TenantLogbookOperationTraceabilityResult> traceability(List<Integer> tenants) throws LogbookClientServerException, InvalidParseOperationException Call traceability logbook operation for requested tenants- Returns:
- logbook operation result per tenant
- Throws:
LogbookClientServerExceptionInvalidParseOperationException
-
traceabilityLfcUnit
RequestResponseOK<String> traceabilityLfcUnit() throws LogbookClientServerException, InvalidParseOperationExceptionStarts Unit logbook lifecycle traceability- Returns:
- logbook lifecycles as String
- Throws:
LogbookClientServerExceptionInvalidParseOperationException
-
traceabilityLfcObjectGroup
RequestResponseOK<String> traceabilityLfcObjectGroup() throws LogbookClientServerException, InvalidParseOperationExceptionStarts Object Group logbook lifecycle traceability- Returns:
- logbook lifecycles as String
- Throws:
LogbookClientServerExceptionInvalidParseOperationException
-
checkLifecycleTraceabilityWorkflowStatus
LifecycleTraceabilityStatus checkLifecycleTraceabilityWorkflowStatus(String processId) throws LogbookClientServerException, InvalidParseOperationException Check life cycle traceability status (unit / got)- Parameters:
processId- the process id- Returns:
- lifecycle traceability status
- Throws:
LogbookClientServerExceptionInvalidParseOperationException
-
reindex
ReindexationResult reindex(IndexParameters indexParam) throws InvalidParseOperationException, LogbookClientServerException Reindex a collection with parameters- Parameters:
indexParam- reindexation parameters- Returns:
- JsonObject containing information about the newly created index
- Throws:
LogbookClientServerExceptionInvalidParseOperationException
-
switchIndexes
SwitchIndexResult switchIndexes(SwitchIndexParameters switchIndexParam) throws InvalidParseOperationException, LogbookClientServerException Switch indexes- Parameters:
switchIndexParam- switch index parameters- Returns:
- JsonObject containing information about the newly created index
- Throws:
LogbookClientServerExceptionInvalidParseOperationException
-
traceabilityAudit
- Throws:
LogbookClientServerException
-
checkLogbookCoherence
checkLogbookCoherence- Returns:
- result
- Throws:
LogbookClientServerException
-
getLastOperationByType
RequestResponse<com.fasterxml.jackson.databind.JsonNode> getLastOperationByType(String operationType) throws LogbookClientServerException - Throws:
LogbookClientServerException
-
reconstructCollection
void reconstructCollection(List<ReconstructionRequestItem> reconstructionItems) throws LogbookClientServerException - Throws:
LogbookClientServerException
-