@RunWithCustomExecutor @Test public void testCreateBulkLogbookOperation() throws Exception { VitamThreadUtils.getVitamSession().setTenantId(0); LogbookOperationParameters[] operationArray = {logbookParameters}; alertLogbookOperationsDecorator.createBulkLogbookOperation(operationArray); verify(alertService).createAlert(Mockito.eq(VitamLogLevel.INFO), Mockito.anyString()); }
@Override public void createBulkLogbookOperation(LogbookOperationParameters[] operationArray) throws LogbookDatabaseException, LogbookAlreadyExistsException { logbookOperations.createBulkLogbookOperation(operationArray); createAlertIfNecessary(operationArray); }
AlertLogbookOperationsDecorator extends LogbookOperationsDecorator { @Override public void createBulkLogbookOperation(LogbookOperationParameters[] operationArray) throws LogbookDatabaseException, LogbookAlreadyExistsException { logbookOperations.createBulkLogbookOperation(operationArray); createAlertIfNecessary(operationArray); } }
AlertLogbookOperationsDecorator extends LogbookOperationsDecorator { @Override public void createBulkLogbookOperation(LogbookOperationParameters[] operationArray) throws LogbookDatabaseException, LogbookAlreadyExistsException { logbookOperations.createBulkLogbookOperation(operationArray); createAlertIfNecessary(operationArray); } AlertLogbookOperationsDecorator(LogbookOperations logbookOperations, List<LogbookEvent> alertEvents); @VisibleForTesting  AlertLogbookOperationsDecorator(LogbookOperations logbookOperations, List<LogbookEvent> alertEvents, AlertService alertService); }
AlertLogbookOperationsDecorator extends LogbookOperationsDecorator { @Override public void createBulkLogbookOperation(LogbookOperationParameters[] operationArray) throws LogbookDatabaseException, LogbookAlreadyExistsException { logbookOperations.createBulkLogbookOperation(operationArray); createAlertIfNecessary(operationArray); } AlertLogbookOperationsDecorator(LogbookOperations logbookOperations, List<LogbookEvent> alertEvents); @VisibleForTesting  AlertLogbookOperationsDecorator(LogbookOperations logbookOperations, List<LogbookEvent> alertEvents, AlertService alertService); @Override void create(LogbookOperationParameters parameters); @Override void update(LogbookOperationParameters parameters); @Override RequestResponse<LogbookOperation> selectOperations(JsonNode select); @Override RequestResponse<LogbookOperation> selectOperations(JsonNode select, boolean sliced); @Override void createBulkLogbookOperation(LogbookOperationParameters[] operationArray); @Override void updateBulkLogbookOperation(LogbookOperationParameters[] operationArray); }
AlertLogbookOperationsDecorator extends LogbookOperationsDecorator { @Override public void createBulkLogbookOperation(LogbookOperationParameters[] operationArray) throws LogbookDatabaseException, LogbookAlreadyExistsException { logbookOperations.createBulkLogbookOperation(operationArray); createAlertIfNecessary(operationArray); } AlertLogbookOperationsDecorator(LogbookOperations logbookOperations, List<LogbookEvent> alertEvents); @VisibleForTesting  AlertLogbookOperationsDecorator(LogbookOperations logbookOperations, List<LogbookEvent> alertEvents, AlertService alertService); @Override void create(LogbookOperationParameters parameters); @Override void update(LogbookOperationParameters parameters); @Override RequestResponse<LogbookOperation> selectOperations(JsonNode select); @Override RequestResponse<LogbookOperation> selectOperations(JsonNode select, boolean sliced); @Override void createBulkLogbookOperation(LogbookOperationParameters[] operationArray); @Override void updateBulkLogbookOperation(LogbookOperationParameters[] operationArray);  }