Package org.rhq.enterprise.server.alert.engine.model

Examples of org.rhq.enterprise.server.alert.engine.model.EventCacheElement


        } else if (alertConditionCategory == AlertConditionCategory.EVENT) {
            AlertConditionEventCategoryComposite eventComposite = (AlertConditionEventCategoryComposite) composite;
            EventSeverity eventSeverity = EventSeverity.valueOf(alertCondition.getName());
            String eventDetails = alertCondition.getOption();

            EventCacheElement cacheElement = null;
            try {
                if (eventDetails == null) {
                    cacheElement = new EventCacheElement(alertConditionOperator, eventSeverity, alertConditionId);
                } else {
                    String regexEventDetails = "", regexSourceLocation = "";
                    if (eventDetails.contains(AlertCondition.ADHOC_SEPARATOR)) {
                        String[] regexes = eventDetails.split(AlertCondition.ADHOC_SEPARATOR);
                        if (regexes.length > 0) {
                            regexEventDetails = regexes[0];
                            if (regexes.length > 1) {
                                regexSourceLocation = regexes[1];
                            }
                        }
                    } else {
                        regexEventDetails = eventDetails; // let's keep backward compatibility here, because there may be REST
                        // clients using the old approach
                    }
                    cacheElement = new EventCacheElement(alertConditionOperator, eventDetails, regexEventDetails,
                        regexSourceLocation, eventSeverity, alertConditionId);
                }
            } catch (InvalidCacheElementException icee) {
                log.info("Failed to create EventCacheElement with parameters: "
                    + AlertConditionCacheUtils.getCacheElementErrorString(alertConditionId, alertConditionOperator,
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.server.alert.engine.model.EventCacheElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.