/** * 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)); }
private Variable[] getValuesFromUsmUser(UsmUserEntry user) { Variable[] row = new Variable[usmUserEntry.getColumnCount()+5]; int n = 0; row[n++] = user.getUsmUser().getSecurityName(); row[n++] = null; row[n++] = user.getUsmUser().getAuthenticationProtocol(); row[n++] = null; row[n++] = null; row[n++] = user.getUsmUser().getPrivacyProtocol(); row[n++] = null; row[n++] = null; row[n++] = new OctetString(); row[n++] = new Integer32(user.getStorageType().getSmiValue()); row[n++] = new Integer32(RowStatus.active); row[n++] = user.getUsmUser().getAuthenticationPassphrase(); row[n++] = user.getUsmUser().getPrivacyPassphrase(); row[n++] = user.getUsmUser().getLocalizationEngineID(); row[n++] = (user.getAuthenticationKey() == null) ? null : new OctetString(user.getAuthenticationKey()); row[n ] = (user.getPrivacyKey() == null) ? null : new OctetString(user.getPrivacyKey()); return row; }