class AlertLogbookOperationsDecorator extends LogbookOperationsDecorator {

    @VisibleForTesting
    boolean isAlertEvent(LogbookOperationParameters parameters) {

        for (LogbookEvent logbookEvent : alertEvents) {
            if (logbookEvent.getOutDetail() != null) {
                String outDetail = parameters.getParameterValue(LogbookParameterName.outcomeDetail);

                if (Strings.isNullOrEmpty(outDetail)) {
                    return false;
                }

                if (outDetail.equals(logbookEvent.getOutDetail())) {
                    return true;
                }
            } else {
                String eventType = parameters.getParameterValue(LogbookParameterName.eventType);
                if (Strings.isNullOrEmpty(eventType)) {
                    return false;
                }

                String outcome = parameters.getParameterValue(LogbookParameterName.outcome);
                if (Strings.isNullOrEmpty(outcome)) {
                    return false;
                }

                if (eventType.equals(logbookEvent.getEvType()) && outcome.equals(logbookEvent.getOutcome())) {
                    return true;
                }
            }
        }
        return false;
    }

    public  AlertLogbookOperationsDecorator(LogbookOperations logbookOperations, List<LogbookEvent> alertEvents);
    @VisibleForTesting  AlertLogbookOperationsDecorator(LogbookOperations logbookOperations, List<LogbookEvent> alertEvents, AlertService alertService);

}