Search in sources :

Example 1 with EventCategoryType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.EventCategoryType in project midpoint by Evolveum.

the class CategoryFilterHelper method processEvent.

@Override
public boolean processEvent(Event event, EventHandlerType eventHandlerType, NotificationManager notificationManager, Task task, OperationResult result) {
    if (eventHandlerType.getCategory().isEmpty()) {
        return true;
    }
    boolean retval = false;
    logStart(LOGGER, event, eventHandlerType, eventHandlerType.getCategory());
    for (EventCategoryType eventCategoryType : eventHandlerType.getCategory()) {
        if (eventCategoryType == null) {
            LOGGER.warn("Filtering on null EventCategoryType: " + eventHandlerType);
        } else if (event.isCategoryType(eventCategoryType)) {
            retval = true;
            break;
        }
    }
    logEnd(LOGGER, event, eventHandlerType, retval);
    return retval;
}
Also used : EventCategoryType(com.evolveum.midpoint.xml.ns._public.common.common_3.EventCategoryType)

Aggregations

EventCategoryType (com.evolveum.midpoint.xml.ns._public.common.common_3.EventCategoryType)1