class LogbookRepositoryService {

    public void saveBulk(LogbookCollections collection, List<JsonNode> logbookItems) throws DatabaseException {
        List<Document> documents = logbookItems.stream()
            .map(item -> Document.parse(JsonHandler.unprettyPrint(item))).collect(Collectors.toList());
        vitamRepositoryProvider.getVitamMongoRepository(collection.getVitamCollection()).saveOrUpdate(documents);
        if (LogbookCollections.OPERATION.equals(collection)) {
            vitamRepositoryProvider.getVitamESRepository(collection.getVitamCollection()).save(documents);
        }

    }

    public  LogbookRepositoryService(VitamRepositoryProvider vitamRepositoryProvider);

}