String activityId) throws SocialDataException {
//TODO: Set<String> fields is not currently used -- all fields are retrieved
Activity userActivity = null;
if ((userId == null || userId.trim().equals("") || appId == null ||
appId.trim().equals("") || activityId == null || activityId.trim().equals(""))) {
throw new SocialDataException("Invalid parameters provided. " +
"One or more of the parameter is either null or empty");
}
try {
registry = getRegistry();
if (groupId == null || groupId.equals(SocialImplConstants.GROUP_ID_SELF)) {
// retrieve activity for user {userId}
userActivity = getUserActivity(userId, appId, activityId);
}
//TODO: Handle GroupID= @friends, @topfriends etc
}
catch (RegistryException e) {
log.error(e.getMessage(), e);
throw new SocialDataException("Error while retrieving activity of user " +
userId + " with activityId " + activityId, e);
}
return userActivity;
}