/** * Removes all USM user from the internal user name table with the specified user * name and (optional) engine ID. If the engine ID is not provided (null) * then any user (including localized) are removed that have the specified user name. * * @param userName * a user name. * @param engineID * the authoritative engine ID associated with the user by localization, or * {@code null} if all users with {@code userName} should be * deleted. * * @return the removed {@code UsmUser} instances as a List. If the user could * be found, an empty list is returned. * @since 2.2 */ public List<UsmUser> removeAllUsers(OctetString userName, OctetString engineID) { List<UsmUserEntry> entries = userTable.removeAllUsers(userName, engineID); if (!entries.isEmpty()) { List<UsmUser> users = new ArrayList<UsmUser>(); for (UsmUserEntry entry : entries) { users.add(entry.getUsmUser()); fireUsmUserChange(new UsmUserEvent(this, entry, UsmUserEvent.USER_REMOVED)); } return users; } return Collections.emptyList(); }
/** * Removes all USM user from the internal user name table with the specified user * name and (optional) engine ID. If the engine ID is not provided (null) * then any user (including localized) are removed that have the specified user name. * * @param userName * a user name. * @param engineID * the authoritative engine ID associated with the user by localization, or * {@code null} if all users with {@code userName} should be * deleted. * @return * the removed {@code UsmUser} instances as a List. If the user could * be found, an empty list is returned. * @since * 2.2 */ public List<UsmUser> removeAllUsers(OctetString userName, OctetString engineID) { List<UsmUserEntry> entries = userTable.removeAllUsers(userName, engineID); if (!entries.isEmpty()) { List<UsmUser> users = new ArrayList<UsmUser>(); for (UsmUserEntry entry : entries) { users.add(entry.getUsmUser()); fireUsmUserChange(new UsmUserEvent(this, entry, UsmUserEvent.USER_REMOVED)); } return users; } return Collections.emptyList(); }