Search in sources :

Example 6 with SnmpUsmCredential

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();
    }
}
Also used : SnmpUsmCredential(org.netxms.client.snmp.SnmpUsmCredential) AddUsmCredDialog(org.netxms.ui.eclipse.snmp.dialogs.AddUsmCredDialog)

Example 7 with SnmpUsmCredential

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();
}
Also used : SnmpUsmCredential(org.netxms.client.snmp.SnmpUsmCredential)

Aggregations

SnmpUsmCredential (org.netxms.client.snmp.SnmpUsmCredential)7 NXCPMessage (org.netxms.base.NXCPMessage)2 AccessPoint (org.netxms.client.objects.AccessPoint)2 ConnectionPoint (org.netxms.client.topology.ConnectionPoint)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 AddUsmCredDialog (org.netxms.ui.eclipse.snmp.dialogs.AddUsmCredDialog)1