if (username == null || "".equals(username) || password == null || "".equals(password) || groupname == null || "".equals(groupname)) {
throw new IllegalArgumentException("Username, password and groupname cannot be null or \"\"");
}
Group group = (Group) m_useradmin.getRole(groupname);
if (group == null) {
throw new GroupNotFoundException(groupname);
}
Role newRole = m_useradmin.createRole(username, Role.USER);
if (newRole == null) {
throw new UserAlreadyExistsException(username);
}