{
log.debug("Entering getPerson data with " + userIds.size() + " userIds, appId " + appId + ", " + fields.size()
+ ", token appId " + token.getAppId());
AppDataDTO currentAppData = null;
GetAppDataRequest currentRequest = new GetAppDataRequest();
ServiceActionContext currentContext;
Map<String, Map<String, String>> results = new HashMap<String, Map<String, String>>();
try
{
log.debug("Retrieve userIds");
List<String> currentUserIds = SPIUtils.getUserList(userIds, token);
currentRequest.setApplicationId(new Long(appId));
// TODO add in group implementation when Friends list is available.
// switch(groupId.getType())
// {
// case all:
// //TODO Assemble specialized parameters for all Group
// break;
// case deleted:
// //TODO Assemble specialized parameters for deleted Group
// break;
// case friends:
// //TODO Assemble specialized parameters for deleted Group
// break;
// case groupId:
// //TODO Assemble specialized parameters for deleted Group
// break;
// default:
// //Self group
// break;
// }
log.debug("Loop through userIds");
for (String currentUserId : currentUserIds)
{
currentRequest.setOpenSocialId(currentUserId);
currentContext = new ServiceActionContext(currentRequest,
openSocialPrincipalDao.execute(currentUserId));
currentAppData = (AppDataDTO) serviceActionController.execute(currentContext, getAppDataAction);
if (currentAppData != null)
{