/** * Adds the parameter. * * @param parameterName the parameter name * @param parameterValue the parameter value * @param parameterType the parameter type */ public void addParameter(String parameterName, String parameterValue, String parameterType) { Parm p = new Parm(parameterName, parameterValue); p.getValue().setType(parameterType); parameters.add(p); }
public Value() { super(); setContent(""); setType("string"); setEncoding("text"); }
public Value() { super(); setContent(""); setType("string"); setEncoding("text"); }
if (startParamType == -1 ) { value.setContent(paramEncoded[1]); value.setType("string"); value.setEncoding("text"); } else { String[] typeAndEncode = paramType.split(Character.toString(EventDatabaseConstants.DB_ATTRIB_DELIM)); if (typeAndEncode != null && typeAndEncode.length == 2) { value.setType(typeAndEncode[0]); value.setEncoding(typeAndEncode[1].split("\\)")[0]); } else { value.setType("string"); value.setEncoding("text");
if (startParamType == -1 ) { value.setContent(paramEncoded[1]); value.setType("string"); value.setEncoding("text"); } else { String[] typeAndEncode = paramType.split(Character.toString(EventDatabaseConstants.DB_ATTRIB_DELIM)); if (typeAndEncode != null && typeAndEncode.length == 2) { value.setType(typeAndEncode[0]); value.setEncoding(typeAndEncode[1].split("\\)")[0]); } else { value.setType("string"); value.setEncoding("text");
public EventBuilder addParam(final String parmName, final String val, final String type, final String encoding) { if (parmName != null) { Value value = new Value(); value.setContent(val); if (type != null) { value.setType(type); } if (encoding != null) { value.setEncoding(encoding); } Parm parm = new Parm(); parm.setParmName(parmName); parm.setValue(value); addParam(parm); } return this; }
/** * Gets the evaluated parameter object based on a given northbound alarm * * @param alarm the alarm * @return the parameter */ public Parm getParameter(NorthboundAlarm alarm) { String oid = getOid(); String instance = evaluate(getInstance(), alarm); if (instance != null) { oid += isNumber(instance) ? "." + instance : encode(instance); } String value = evaluate(getValue(), alarm); if (getType().equals(VarbindType.TYPE_SNMP_OCTET_STRING) && getMax() > 0 && getType().value().length() > getMax()) { value = value.substring(0, getMax()); } final Parm parm = new Parm(oid, value); parm.getValue().setType(getType().value()); return parm; }
for (int i = 0; i < m_syntaxToEvents.length; i++) { if (m_syntaxToEvents[i].getTypeId() == -1 || m_syntaxToEvents[i].getTypeId() == value.getType()) { val.setType(m_syntaxToEvents[i].getType()); String encoding = null; boolean displayable = false;
parm.setParmName(parmName); Value parmvalue = new Value(); parmvalue.setType(type); parmvalue.setContent(value); parm.setValue(parmvalue); Value parmValue = new Value(); parm.setValue(parmValue); parmValue.setType("string"); parmValue.setEncoding("text"); parmValue.setContent(onmsEvent.getNodeLabel());
Value v = new Value(); v.setContent(p.getValue()); v.setType("string"); v.setEncoding("text"); v.setExpand(p.getExpand());
Value v = new Value(); v.setContent(p.getValue()); v.setType("string"); v.setEncoding("text"); v.setExpand(p.getExpand());