/** * Adds the handler. */ private void addHandler() { Varbindsdecode v = new Varbindsdecode(); v.setParmid("??"); container.addOnmsBean(v); }
Varbindsdecode newVarbind = new Varbindsdecode(); newVarbind.setParmid(parmName); decode.put(newVarbind.getParmid(), newVarbind); decode.get(parmName).addDecode(d);
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; }
Varbindsdecode newVarbind = new Varbindsdecode(); newVarbind.setParmid(parmName); decode.put(newVarbind.getParmid(), newVarbind); decode.get(parmName).addDecode(d);
if (econf != null && econf.getVarbindsdecodes().size() > 0) { for (final Varbindsdecode element : econf.getVarbindsdecodes()) { List<Decode> decodeArray = element.getDecodes(); Map<String, String> valueMap = new HashMap<String, String>(); for (final Decode element2 : decodeArray) { valueMap.put(element2.getVarbindvalue(), element2.getVarbinddecodedstring()); decode.put(element.getParmid(), valueMap);
if (econf != null && econf.getVarbindsdecodes().size() > 0) { for (final Varbindsdecode element : econf.getVarbindsdecodes()) { List<Decode> decodeArray = element.getDecodes(); Map<String, String> valueMap = new HashMap<String, String>(); for (final Decode element2 : decodeArray) { valueMap.put(element2.getVarbindvalue(), element2.getVarbinddecodedstring()); decode.put(element.getParmid(), valueMap);
/** * Adds the handler. */ private void addHandler() { Varbindsdecode v = new Varbindsdecode(); v.setParmid("??"); container.addOnmsBean(v); }