List<Role> result = new ArrayList<Role>();
List<MRoleMap> roleMap = ms.listRoles(principalName, principalType);
if (roleMap!=null) {
for (MRoleMap role : roleMap) {
MRole r = role.getRole();
result.add(new Role(r.getRoleName(), r
.getCreateTime(), r.getOwnerName()));
}
}
return result;
}