class LogbookOperationTraceabilityHelper implements LogbookTraceabilityHelper {

    @Override
    public void saveDataInZip(MerkleTreeAlgo algo, TraceabilityFile file)
        throws IOException, TraceabilityException {
        MongoCursor<LogbookOperation> mongoCursor;
        try {
            mongoCursor = logbookOperations
                .selectOperationsByLastPersistenceDateInterval(traceabilityStartDate, traceabilityEndDate);
        } catch (LogbookDatabaseException | LogbookNotFoundException | InvalidParseOperationException | InvalidCreateOperationException e) {
            throw new TraceabilityException(e);
        }
        traceabilityIterator = new LogbookTraceabilityIterator(mongoCursor);

        file.initStoreLog();

        try {
            while (traceabilityIterator.hasNext()) {

                final LogbookOperation logbookOperation = traceabilityIterator.next();
                JsonNode logbookOperationJsonNode = JsonHandler.toJsonNode(logbookOperation);
                byte[] logbookOperationJsonBytes =
                    CanonicalJsonFormatter.serializeToByteArray(logbookOperationJsonNode);

                file.storeLog(logbookOperationJsonBytes);
                algo.addLeaf(logbookOperationJsonBytes);
            }
        } catch (InvalidParseOperationException e) {
            throw new TraceabilityException("Could not convert document to json", e);
        }

        file.closeStoreLog();
    }

    public  LogbookOperationTraceabilityHelper(LogbookOperations logbookOperations,
        GUID operationID, int temporizationDelayInSeconds);

}