@Test public void testSearch() throws Exception { UserManager userLocator = this.lookup(UserManager.class, RemoteUserTokenAuthenticatingRealm.REALM_NAME); Set<User> result = userLocator.searchUsers(new UserSearchCriteria("joh")); Assert.assertEquals(1, result.size()); Assert.assertEquals("johnson", result.iterator().next().getUserId()); }
@Override public Set<User> searchUsers(UserSearchCriteria criteria) { final Set<User> users = this.listUsers(); final Set<User> filteredUsers = this.filterListInMemeory(users, criteria); logger.debug("filteredUsers({}): {}", criteria, filteredUsers); return filteredUsers; }
RemoteUserTokenUserManager extends AbstractReadOnlyUserManager { @Override public Set<User> searchUsers(UserSearchCriteria criteria) { final Set<User> users = this.listUsers(); final Set<User> filteredUsers = this.filterListInMemeory(users, criteria); logger.debug("filteredUsers({}): {}", criteria, filteredUsers); return filteredUsers; } }
RemoteUserTokenUserManager extends AbstractReadOnlyUserManager { @Override public Set<User> searchUsers(UserSearchCriteria criteria) { final Set<User> users = this.listUsers(); final Set<User> filteredUsers = this.filterListInMemeory(users, criteria); logger.debug("filteredUsers({}): {}", criteria, filteredUsers); return filteredUsers; }  }
RemoteUserTokenUserManager extends AbstractReadOnlyUserManager { @Override public Set<User> searchUsers(UserSearchCriteria criteria) { final Set<User> users = this.listUsers(); final Set<User> filteredUsers = this.filterListInMemeory(users, criteria); logger.debug("filteredUsers({}): {}", criteria, filteredUsers); return filteredUsers; }  @Override String getSource(); @Override String getAuthenticationRealmName(); @Override User getUser(String userId); @Override Set<String> listUserIds(); @Override Set<User> listUsers(); @Override Set<User> searchUsers(UserSearchCriteria criteria); }
RemoteUserTokenUserManager extends AbstractReadOnlyUserManager { @Override public Set<User> searchUsers(UserSearchCriteria criteria) { final Set<User> users = this.listUsers(); final Set<User> filteredUsers = this.filterListInMemeory(users, criteria); logger.debug("filteredUsers({}): {}", criteria, filteredUsers); return filteredUsers; }  @Override String getSource(); @Override String getAuthenticationRealmName(); @Override User getUser(String userId); @Override Set<String> listUserIds(); @Override Set<User> listUsers(); @Override Set<User> searchUsers(UserSearchCriteria criteria);  }