private Event createBasicEvent(String uei, Date date, double dsValue, CollectionResourceWrapper resource) { Map<String,String> params = new HashMap<String,String>(); params.put("threshold", Double.toString(getThresholdConfig().getValue())); params.put("trigger", Integer.toString(getThresholdConfig().getTrigger())); params.put("rearm", Double.toString(getThresholdConfig().getRearm())); return createBasicEvent(uei, date, dsValue, resource, params); }
uei=EventConstants.LOW_THRESHOLD_EVENT_UEI; return createBasicEvent(uei, date, dsValue, resource); } else if (ThresholdType.HIGH.equals(getThresholdConfig().getType())) { if(uei==null || "".equals(uei)) { uei=EventConstants.HIGH_THRESHOLD_EVENT_UEI; return createBasicEvent(uei, date, dsValue, resource); } else { throw new IllegalArgumentException("Threshold type " + getThresholdConfig().getType() + " is not supported"); uei=EventConstants.LOW_THRESHOLD_REARM_EVENT_UEI; return createBasicEvent(uei, date, dsValue, resource); } else if (ThresholdType.HIGH.equals(getThresholdConfig().getType())) { if(uei==null || "".equals(uei)) { uei=EventConstants.HIGH_THRESHOLD_REARM_EVENT_UEI; return createBasicEvent(uei, date, dsValue, resource); } else { throw new IllegalArgumentException("Threshold type " + getThresholdConfig().getType() + " is not supported");