user = (User) admin.getRole(username);
} catch (ClassCastException e) {
throw new IllegalArgumentException("Not a user: " + username);
}
try {
return user == null ? null : new OSGiUser(user).asCompositeData();
} catch (OpenDataException e) {
throw new IOException("Unable to create open data: " + e);
}
}