use of org.netxms.client.snmp.SnmpUsmCredential in project netxms by netxms.
the class SnmpCredentials method addUsmCredentials.
/**
* Add SNMP USM credentials to the list
*/
private void addUsmCredentials() {
AddUsmCredDialog dlg = new AddUsmCredDialog(getSite().getShell());
if (dlg.open() == Window.OK) {
SnmpUsmCredential cred = dlg.getValue();
cred.setZoneId((int) zoneUIN);
config.addUsmCredentials(cred, zoneUIN);
snmpUsmCredList.setInput(config.getUsmCredentials(zoneUIN));
setModified();
}
}
use of org.netxms.client.snmp.SnmpUsmCredential in project netxms by netxms.
the class SnmpUsmLabelProvider method getColumnText.
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
*/
@Override
public String getColumnText(Object element, int columnIndex) {
SnmpUsmCredential c = (SnmpUsmCredential) element;
StringBuilder sb = new StringBuilder(c.getName());
sb.append(' ');
sb.append(authMethodName[c.getAuthMethod()]);
sb.append('/');
sb.append(privMethodName[c.getPrivMethod()]);
sb.append(' ');
sb.append(c.getAuthPassword());
sb.append('/');
sb.append(c.getPrivPassword());
return sb.toString();
}
Aggregations