public class LogbookOperationsClientMock extends AbstractMockClient implements LogbookOperationsClient
AbstractMockClient.FakeInboundResponse
INTERNAL_SERVER_ERROR
STATUS_URL
Constructor and Description |
---|
LogbookOperationsClientMock() |
Modifier and Type | Method and Description |
---|---|
void |
bulkCreate(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). |
void |
bulkUpdate(String eventIdProc,
Iterable<LogbookOperationParameters> queue)
Bulk Update
To be used everywhere except very first time (when eventIdentifierProcess already used once) |
LifecycleTraceabilityStatus |
checkLifecycleTraceabilityWorkflowStatus(String operationId)
Check life cycle traceability status (unit / got)
|
LogbookCheckResult |
checkLogbookCoherence()
checkLogbookCoherence
|
void |
close()
Close the underneath http client
|
void |
commitCreateDelegate(String eventIdProc)
Finalize logbook entry using delegation
To be used ONLY once at top level of process startup (where eventIdentifierProcess is set for the first time). |
void |
commitUpdateDelegate(String eventIdProc)
Finalize logbook entry using delegation
To be used everywhere except very first time (when eventIdentifierProcess already used once) |
void |
create(LogbookOperationParameters parameters)
Create logbook entry
To be used ONLY once at top level of process startup (where eventIdentifierProcess is set for the first time). |
void |
createDelegate(LogbookOperationParameters parameters)
Create logbook entry using delegation
To be used ONLY once at top level of process startup (where eventIdentifierProcess is set for the first time). |
com.fasterxml.jackson.databind.JsonNode |
reindex(IndexParameters indexParam)
Reindex a collection with parameters
|
com.fasterxml.jackson.databind.JsonNode |
selectOperation(com.fasterxml.jackson.databind.JsonNode select) |
com.fasterxml.jackson.databind.JsonNode |
selectOperationById(String id) |
com.fasterxml.jackson.databind.JsonNode |
switchIndexes(SwitchIndexParameters switchIndexParam)
Switch indexes
|
RequestResponseOK |
traceability()
Call traceability logbook operation
|
void |
traceabilityAudit(int tenant,
AuditLogbookOptions options) |
RequestResponseOK |
traceabilityLfcObjectGroup()
Starts Object Group logbook lifecycle traceability
|
RequestResponseOK |
traceabilityLfcUnit()
Starts Unit logbook lifecycle traceability
|
void |
update(LogbookOperationParameters parameters)
Update logbook entry
To be used everywhere except very first time (when eventIdentifierProcess already used once) |
void |
updateDelegate(LogbookOperationParameters parameters)
Update logbook entry using delegation
To be used everywhere except very first time (when eventIdentifierProcess already used once) |
checkStatus, checkStatus, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkStatus, checkStatus, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
public void create(LogbookOperationParameters parameters) throws LogbookClientBadRequestException, LogbookClientAlreadyExistsException, LogbookClientServerException
LogbookOperationsClient
create
in interface LogbookOperationsClient
parameters
- the entry parametersLogbookClientBadRequestException
- if the argument is incorrectLogbookClientAlreadyExistsException
- if the element already existsLogbookClientServerException
- if the Server got an internal errorpublic void update(LogbookOperationParameters parameters) throws LogbookClientBadRequestException, LogbookClientNotFoundException, LogbookClientServerException
LogbookOperationsClient
update
in interface LogbookOperationsClient
parameters
- the entry parametersLogbookClientBadRequestException
- if the argument is incorrectLogbookClientNotFoundException
- if the element was not created beforeLogbookClientServerException
- if the Server got an internal errorpublic com.fasterxml.jackson.databind.JsonNode selectOperation(com.fasterxml.jackson.databind.JsonNode select) throws LogbookClientException, InvalidParseOperationException
selectOperation
in interface LogbookOperationsClient
LogbookClientException
InvalidParseOperationException
public com.fasterxml.jackson.databind.JsonNode selectOperationById(String id) throws LogbookClientException, InvalidParseOperationException
selectOperationById
in interface LogbookOperationsClient
id
- identifierLogbookClientException
- LogbookClientExceptionInvalidParseOperationException
- InvalidParseOperationExceptionpublic RequestResponseOK traceability() throws InvalidParseOperationException
LogbookOperationsClient
traceability
in interface LogbookOperationsClient
InvalidParseOperationException
public void createDelegate(LogbookOperationParameters parameters) throws LogbookClientAlreadyExistsException
LogbookOperationsClient
createDelegate
in interface LogbookOperationsClient
parameters
- the entry parameters (can be reused and modified after without impacting the one created)LogbookClientAlreadyExistsException
- if the element already existspublic void updateDelegate(LogbookOperationParameters parameters) throws LogbookClientNotFoundException
LogbookOperationsClient
updateDelegate
in interface LogbookOperationsClient
parameters
- the entry parameters (can be reused and modified after without impacting the one updated)LogbookClientNotFoundException
- if the element does not yet exists (createDeletage not called before)public void bulkCreate(String eventIdProc, Iterable<LogbookOperationParameters> queue) throws LogbookClientBadRequestException
LogbookOperationsClient
bulkCreate
in interface LogbookOperationsClient
eventIdProc
- event Process Identifierqueue
- queue of LogbookOperationParameters to createLogbookClientBadRequestException
- if the argument is incorrectpublic void bulkUpdate(String eventIdProc, Iterable<LogbookOperationParameters> queue) throws LogbookClientBadRequestException
LogbookOperationsClient
bulkUpdate
in interface LogbookOperationsClient
eventIdProc
- event Process Identifierqueue
- queue of LogbookOperationParameters to updateLogbookClientBadRequestException
- if the argument is incorrectpublic void commitCreateDelegate(String eventIdProc) throws LogbookClientBadRequestException
LogbookOperationsClient
commitCreateDelegate
in interface LogbookOperationsClient
eventIdProc
- event Process IdentifierLogbookClientBadRequestException
- if the argument is incorrectpublic void commitUpdateDelegate(String eventIdProc) throws LogbookClientBadRequestException
LogbookOperationsClient
commitUpdateDelegate
in interface LogbookOperationsClient
eventIdProc
- event Process IdentifierLogbookClientBadRequestException
- if the argument is incorrectpublic void close()
MockOrRestClient
close
in interface MockOrRestClient
close
in interface VitamAutoCloseable
close
in interface AutoCloseable
close
in class AbstractMockClient
public RequestResponseOK traceabilityLfcUnit()
LogbookOperationsClient
traceabilityLfcUnit
in interface LogbookOperationsClient
public RequestResponseOK traceabilityLfcObjectGroup()
LogbookOperationsClient
traceabilityLfcObjectGroup
in interface LogbookOperationsClient
public com.fasterxml.jackson.databind.JsonNode reindex(IndexParameters indexParam) throws InvalidParseOperationException, LogbookClientServerException
LogbookOperationsClient
reindex
in interface LogbookOperationsClient
indexParam
- reindexation parametersInvalidParseOperationException
LogbookClientServerException
public com.fasterxml.jackson.databind.JsonNode switchIndexes(SwitchIndexParameters switchIndexParam) throws InvalidParseOperationException, LogbookClientServerException
LogbookOperationsClient
switchIndexes
in interface LogbookOperationsClient
switchIndexParam
- switch index parametersInvalidParseOperationException
LogbookClientServerException
public void traceabilityAudit(int tenant, AuditLogbookOptions options)
traceabilityAudit
in interface LogbookOperationsClient
public LogbookCheckResult checkLogbookCoherence()
LogbookOperationsClient
checkLogbookCoherence
in interface LogbookOperationsClient
public LifecycleTraceabilityStatus checkLifecycleTraceabilityWorkflowStatus(String operationId)
LogbookOperationsClient
checkLifecycleTraceabilityWorkflowStatus
in interface LogbookOperationsClient
operationId
- the process idCopyright © 2019 Vitam. All rights reserved.