return this.filterListInMemeory(this.listUsers(), criteria);
}
private User toUser(SimpleUser simpleUser) {
// simple conversion of object
User user = new DefaultUser();
user.setEmailAddress(simpleUser.getEmail());
user.setName(simpleUser.getName());
user.setUserId(simpleUser.getUserId());
user.setStatus(UserStatus.active);
for (String role : simpleUser.getRoles()) {
RoleIdentifier plexusRole = new RoleIdentifier(this.getSource(), role);
user.addRole(plexusRole);
}
// set the source of this user to this
user.setSource(this.getSource());
return user;
}