public interface LogbookLifeCyclesClient extends BasicClient
STATUS_URL| Modifier and Type | Method and Description |
|---|---|
void |
bulkCreateObjectGroup(String objectIdentifier,
Iterable<LogbookLifeCycleParameters> queue)
Bulk Create for ObjectGroup
To be used ONLY once at top level of process startup (where objectIdentifier is set for the first time). |
void |
bulkCreateUnit(String objectIdentifier,
Iterable<LogbookLifeCycleParameters> queue)
Bulk Create for Unit
To be used ONLY once at top level of process startup (where objectIdentifier is set for the first time). |
void |
bulkObjectGroup(String eventIdProc,
List<LogbookLifeCycleObjectGroupModel> logbookLifeCycleModels) |
void |
bulkUnit(String eventIdProc,
List<LogbookLifeCycleUnitModel> logbookLifeCycleModels) |
void |
bulkUpdateObjectGroup(String objectIdentifier,
Iterable<LogbookLifeCycleParameters> queue)
Bulk Update for ObjectGroup
To be used everywhere except very first time (when objectIdentifier already used once) |
void |
bulkUpdateUnit(String objectIdentifier,
Iterable<LogbookLifeCycleParameters> queue)
Bulk Update for Unit
To be used everywhere except very first time (when objectIdentifier already used once) |
void |
commit(LogbookLifeCycleParameters parameters)
Commit logbook entry
To be used everywhere except very first time (when eventIdentifierProcess already used once) |
void |
commitObjectGroup(String operationId,
String objectGroupId)
Commit objectGroup lifeCycle
To be used everywhere except very first time (when eventIdentifierProcess already used once) |
void |
commitUnit(String operationId,
String unitId)
Commit unit lifeCycle
To be used everywhere except very first time (when eventIdentifierProcess already used once) |
void |
create(LogbookLifeCycleParameters parameters)
Create logbook entry
To be used ONLY once at top level of process startup (where eventIdentifierProcess is set for the first time). |
void |
createRawbulkObjectgrouplifecycles(List<com.fasterxml.jackson.databind.JsonNode> logbookLifeCycleRaws)
Create lifecycle objectgroup
|
void |
createRawbulkUnitlifecycles(List<com.fasterxml.jackson.databind.JsonNode> logbookLifeCycleRaws)
Create lifecycle unit
|
LifeCycleStatusCode |
getObjectGroupLifeCycleStatus(String objectGroupId)
Gets the object group lifeCycle status (COMMITTED or IN_PROCESS)
|
LifeCycleStatusCode |
getUnitLifeCycleStatus(String unitId)
Gets the unit lifeCycle status (COMMITTED or IN_PROCESS)
|
RequestResponse |
objectGroupLifeCyclesByOperationIterator(String operationId,
LifeCycleStatusCode lifeCycleStatus,
com.fasterxml.jackson.databind.JsonNode query)
returns VitamRequestIterator on ObjectGroupLifecycles for this operation.
Example of code using it:
|
void |
rollback(LogbookLifeCycleParameters parameters)
Rollback logbook entry
To be used everywhere except very first time (when eventIdentifierProcess already used once) |
void |
rollBackObjectGroupsByOperation(String operationId)
Remove created object group lifeCycles during the given operation
|
void |
rollBackUnitsByOperation(String operationId)
Remove created unit lifeCycles during the given operation
|
com.fasterxml.jackson.databind.JsonNode |
selectObjectGroupLifeCycle(com.fasterxml.jackson.databind.JsonNode queryDsl)
returns the object group life cycles
|
com.fasterxml.jackson.databind.JsonNode |
selectObjectGroupLifeCycleById(String id,
com.fasterxml.jackson.databind.JsonNode queryDsl)
returns the object group life cycle
|
com.fasterxml.jackson.databind.JsonNode |
selectObjectGroupLifeCycleById(String id,
com.fasterxml.jackson.databind.JsonNode queryDsl,
LifeCycleStatusCode lifeCycleStatus)
returns the object group life cycle
|
com.fasterxml.jackson.databind.JsonNode |
selectUnitLifeCycle(com.fasterxml.jackson.databind.JsonNode queryDsl)
returns the unit life cycle
|
com.fasterxml.jackson.databind.JsonNode |
selectUnitLifeCycleById(String id,
com.fasterxml.jackson.databind.JsonNode queryDsl)
returns the unit life cycle
|
com.fasterxml.jackson.databind.JsonNode |
selectUnitLifeCycleById(String id,
com.fasterxml.jackson.databind.JsonNode queryDsl,
LifeCycleStatusCode lifeCycleStatus)
returns the unit life cycle in progress
|
com.fasterxml.jackson.databind.JsonNode |
selectUnitLifeCyclesRaw(com.fasterxml.jackson.databind.JsonNode queryDsl)
returns the raw version of unit life cycle
|
RequestResponse |
unitLifeCyclesByOperationIterator(String operationId,
LifeCycleStatusCode lifeCycleStatus,
com.fasterxml.jackson.databind.JsonNode query)
returns VitamRequestIterator on UnitLifeCycles for this operation.
Example of code using it:
|
void |
update(LogbookLifeCycleParameters parameters)
Update logbook entry
To be used everywhere except very first time (when eventIdentifierProcess already used once) |
void |
update(LogbookLifeCycleParameters parameters,
LifeCycleStatusCode lifeCycleStatusCode)
Update logbook entry
To be used everywhere except very first time (when eventIdentifierProcess already used once) |
checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrlvoid create(LogbookLifeCycleParameters parameters) throws LogbookClientBadRequestException, LogbookClientAlreadyExistsException, LogbookClientServerException
parameters - the entry parametersLogbookClientBadRequestException - 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 servervoid update(LogbookLifeCycleParameters parameters) throws LogbookClientBadRequestException, LogbookClientNotFoundException, LogbookClientServerException
parameters - the entry parametersLogbookClientBadRequestException - 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 nullvoid update(LogbookLifeCycleParameters parameters, LifeCycleStatusCode lifeCycleStatusCode) throws LogbookClientBadRequestException, LogbookClientNotFoundException, LogbookClientServerException
parameters - the entry parameterslifeCycleStatusCode - the lifeCycle statusLogbookClientBadRequestException - 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 nullvoid commit(LogbookLifeCycleParameters parameters) throws LogbookClientBadRequestException, LogbookClientNotFoundException, LogbookClientServerException
parameters - the entry parametersLogbookClientBadRequestException - 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 nullvoid rollback(LogbookLifeCycleParameters parameters) throws LogbookClientBadRequestException, LogbookClientNotFoundException, LogbookClientServerException
parameters - the entry parametersLogbookClientBadRequestException - 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 nullcom.fasterxml.jackson.databind.JsonNode selectUnitLifeCycleById(String id, com.fasterxml.jackson.databind.JsonNode queryDsl) throws LogbookClientException, InvalidParseOperationException
id - unit life cycle idqueryDsl - dsl query to be executedLogbookClientExceptionInvalidParseOperationExceptioncom.fasterxml.jackson.databind.JsonNode selectUnitLifeCycleById(String id, com.fasterxml.jackson.databind.JsonNode queryDsl, LifeCycleStatusCode lifeCycleStatus) throws LogbookClientException, InvalidParseOperationException
id - unit life cycle idqueryDsl - dsl query to be executedlifeCycleStatus - the lifecycle statusLogbookClientExceptionInvalidParseOperationExceptioncom.fasterxml.jackson.databind.JsonNode selectUnitLifeCycle(com.fasterxml.jackson.databind.JsonNode queryDsl)
throws LogbookClientException,
InvalidParseOperationException
queryDsl - dsl query containing the idLogbookClientExceptionInvalidParseOperationExceptioncom.fasterxml.jackson.databind.JsonNode selectUnitLifeCyclesRaw(com.fasterxml.jackson.databind.JsonNode queryDsl)
throws LogbookClientException,
InvalidParseOperationException
queryDsl - dsl queryLogbookClientExceptionInvalidParseOperationExceptioncom.fasterxml.jackson.databind.JsonNode selectObjectGroupLifeCycleById(String id, com.fasterxml.jackson.databind.JsonNode queryDsl) throws LogbookClientException, InvalidParseOperationException
id - the object group life cycle idqueryDsl - dsl query to be executedLogbookClientExceptionInvalidParseOperationExceptioncom.fasterxml.jackson.databind.JsonNode selectObjectGroupLifeCycleById(String id, com.fasterxml.jackson.databind.JsonNode queryDsl, LifeCycleStatusCode lifeCycleStatus) throws LogbookClientException, InvalidParseOperationException
id - the object group life cycle idqueryDsl - dsl query to be executedlifeCycleStatus - the lifecycle statusLogbookClientExceptionInvalidParseOperationExceptioncom.fasterxml.jackson.databind.JsonNode selectObjectGroupLifeCycle(com.fasterxml.jackson.databind.JsonNode queryDsl)
throws LogbookClientException,
InvalidParseOperationException
queryDsl - dsl query to be executedLogbookClientExceptionInvalidParseOperationExceptionRequestResponse objectGroupLifeCyclesByOperationIterator(String operationId, LifeCycleStatusCode lifeCycleStatus, com.fasterxml.jackson.databind.JsonNode query) throws LogbookClientException, InvalidParseOperationException
try (LogbookLifeCyclesClient client = LogbookLifeCyclesClientFactory.getInstance().getClient()) {
try (VitamRequestIterator iterator = client.objectGroupLifeCyclesByOperationIterator(operationId)) {
while (iterator.hasNext()) {
JsonNode objectGroupLifeCycle = iterator.next();
// use it
}
}
}
operationId - the operation id from which this ObjectGroup Lifecycles will be retrievedlifeCycleStatus - the lifecycle statusLogbookClientExceptionInvalidParseOperationExceptionRequestResponse unitLifeCyclesByOperationIterator(String operationId, LifeCycleStatusCode lifeCycleStatus, com.fasterxml.jackson.databind.JsonNode query) throws LogbookClientException, InvalidParseOperationException
try (LogbookLifeCyclesClient client = LogbookLifeCyclesClientFactory.getInstance().getClient()) {
try (VitamRequestIterator iterator = client.unitLifeCyclesByOperationIterator(operationId)) {
while (iterator.hasNext()) {
JsonNode unitLifeCycle = iterator.next();
// use it
}
}
}
operationId - the operation id from which this UnitLife Lifecycles will be retrievedlifeCycleStatus - the lifecycle statusquery - JsonNode queryLogbookClientExceptionInvalidParseOperationExceptionvoid bulkCreateUnit(String objectIdentifier, Iterable<LogbookLifeCycleParameters> queue) throws LogbookClientBadRequestException, LogbookClientAlreadyExistsException, LogbookClientServerException
objectIdentifier - object Identifierqueue - queue of LogbookLifeCycleParameters to createLogbookClientBadRequestException - if the argument is incorrectLogbookClientAlreadyExistsException - if the element already existsLogbookClientServerException - if the Server got an internal errorIllegalArgumentException - if some mandatories parameters are empty or nullvoid bulkUpdateUnit(String objectIdentifier, Iterable<LogbookLifeCycleParameters> queue) throws LogbookClientNotFoundException, LogbookClientBadRequestException, LogbookClientServerException
objectIdentifier - object Identifierqueue - queue of LogbookLifeCycleParameters to updateLogbookClientBadRequestException - 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 nullvoid bulkCreateObjectGroup(String objectIdentifier, Iterable<LogbookLifeCycleParameters> queue) throws LogbookClientBadRequestException, LogbookClientAlreadyExistsException, LogbookClientServerException
objectIdentifier - object Identifierqueue - queue of LogbookLifeCycleParameters to createLogbookClientBadRequestException - if the argument is incorrectLogbookClientAlreadyExistsException - if the element already existsLogbookClientServerException - if the Server got an internal errorIllegalArgumentException - if some mandatories parameters are empty or nullvoid bulkUpdateObjectGroup(String objectIdentifier, Iterable<LogbookLifeCycleParameters> queue) throws LogbookClientNotFoundException, LogbookClientBadRequestException, LogbookClientServerException
objectIdentifier - object Identifierqueue - queue of LogbookLifeCycleParameters to updateLogbookClientBadRequestException - 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 nullvoid commitUnit(String operationId, String unitId) throws LogbookClientBadRequestException, LogbookClientNotFoundException, LogbookClientServerException
operationId - the operation idunitId - the unit idLogbookClientBadRequestException - 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 nullvoid commitObjectGroup(String operationId, String objectGroupId) throws LogbookClientBadRequestException, LogbookClientNotFoundException, LogbookClientServerException
operationId - the operation idobjectGroupId - the object group idLogbookClientBadRequestException - 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 nullvoid rollBackUnitsByOperation(String operationId) throws LogbookClientNotFoundException, LogbookClientBadRequestException, LogbookClientServerException
operationId - the operation idLogbookClientNotFoundException - if the element was not created beforeLogbookClientBadRequestException - if the argument is incorrectLogbookClientServerException - if the server got an internal errorvoid rollBackObjectGroupsByOperation(String operationId) throws LogbookClientNotFoundException, LogbookClientBadRequestException, LogbookClientServerException
operationId - the operation idLogbookClientNotFoundException - if the element was not created beforeLogbookClientBadRequestException - if the argument is incorrectLogbookClientServerException - if the server got an internal errorLifeCycleStatusCode getUnitLifeCycleStatus(String unitId) throws LogbookClientNotFoundException, LogbookClientServerException
unitId - the unit idLogbookClientNotFoundException - if the element was not created beforeLogbookClientServerException - if the server got an internal errorLifeCycleStatusCode getObjectGroupLifeCycleStatus(String objectGroupId) throws LogbookClientNotFoundException, LogbookClientServerException
objectGroupId - the object group idLogbookClientNotFoundException - if the element was not created beforeLogbookClientServerException - if the server got an internal errorvoid bulkObjectGroup(String eventIdProc, List<LogbookLifeCycleObjectGroupModel> logbookLifeCycleModels) throws LogbookClientAlreadyExistsException, LogbookClientBadRequestException, LogbookClientServerException
void bulkUnit(String eventIdProc, List<LogbookLifeCycleUnitModel> logbookLifeCycleModels) throws LogbookClientAlreadyExistsException, LogbookClientBadRequestException, LogbookClientServerException
void createRawbulkObjectgrouplifecycles(List<com.fasterxml.jackson.databind.JsonNode> logbookLifeCycleRaws) throws LogbookClientBadRequestException, LogbookClientServerException
logbookLifeCycleRaws - list of lifecycle objectgroup as jsonsLogbookClientBadRequestExceptionLogbookClientServerExceptionvoid createRawbulkUnitlifecycles(List<com.fasterxml.jackson.databind.JsonNode> logbookLifeCycleRaws) throws LogbookClientBadRequestException, LogbookClientServerException
logbookLifeCycleRaws - list of lifecycle unit as jsonsLogbookClientBadRequestExceptionLogbookClientServerExceptionCopyright © 2018 Vitam. All rights reserved.