protected Map<String, Map<String, String>> getVarbindsDecodeMap(String eventUei) {
if (m_eventConfDao == null) {
return null;
}
org.opennms.netmgt.xml.eventconf.Event event = m_eventConfDao.findByUei(eventUei);
if (event == null) {
return null;
}
if (event.getVarbindsdecodes().isEmpty()) {
return null;
}
Map<String, Map<String, String>> decodeMap = new HashMap<String, Map<String, String>>();
for (org.opennms.netmgt.xml.eventconf.Varbindsdecode vb : event.getVarbindsdecodes()) {
String paramId = vb.getParmid();
if (decodeMap.get(paramId) == null) {
decodeMap.put(paramId, new HashMap<String,String>());
}
for (org.opennms.netmgt.xml.eventconf.Decode d : vb.getDecodes()) {
decodeMap.get(paramId).put(d.getVarbindvalue(), d.getVarbinddecodedstring());
}
}
return decodeMap;
}