/** * Updates the USM user entry with the same engine ID and user name as the * supplied instance and fires an appropriate {@code UsmUserEvent}. * If the corresponding user entry does not yet exist then it will be added. * @param entry * an {@code UsmUserEntry} instance not necessarily the same as an * already existing entry. * @since 1.2 */ public void updateUser(UsmUserEntry entry) { UsmUserEntry oldEntry = userTable.addUser(entry); if (oldEntry != null) { entry.setStorageType(oldEntry.getStorageType()); } fireUsmUserChange(new UsmUserEvent(this, entry, (oldEntry == null) ? UsmUserEvent.USER_ADDED: UsmUserEvent.USER_CHANGED)); }
/** * Updates the USM user entry with the same engine ID and user name as the * supplied instance and fires an appropriate {@code UsmUserEvent}. * If the corresponding user entry does not yet exist then it will be added. * * @param entry * an {@code UsmUserEntry} instance not necessarily the same as an * already existing entry. * * @since 1.2 */ public void updateUser(UsmUserEntry entry) { UsmUserEntry oldEntry = userTable.addUser(entry); if (oldEntry != null) { entry.setStorageType(oldEntry.getStorageType()); } fireUsmUserChange(new UsmUserEvent(this, entry, (oldEntry == null) ? UsmUserEvent.USER_ADDED : UsmUserEvent.USER_CHANGED)); }
new UsmUser(dhKickstartParameters.getSecurityName(), authProtocol, authKey, privProtocol, privKey)); usmUserEntry.setStorageType(SnmpConstants.StorageTypeEnum.permanent); usm.getUserTable().addUser(usmUserEntry); if (usm.getUserTable().getUser(dhKickstartParameters.getSecurityName()) == null ||