private String[] fetchUsersFromGroup(String groupName){
String[] userIds = null;
RoleManager roleMgr = Platform.getService(RoleManager.class);
try{
Role role = roleMgr.getDetails(RoleManagerConstants.ROLE_NAME, groupName, null);
String roleKey = role.getEntityId();
List userList = roleMge.getMembers(roleKey, true);
int userListSize = userList.size();
userIds = new String[userListSize];
for(int i = 0; i < userListSize; i++){
User user = (User) userList.get(i);
String userLogin = user.getLogin();
userIds[i] = userLogin;
}
} catch(Exception e){
System.out.println("Exception is : "+e.getMessage());
}
return userIds;
}