log.debug("RecommendationsCollectionResource POST" + json);
JSONObject jsonReco = JSONObject.fromObject(json);
JSONObject jsonAuthor = jsonReco.getJSONObject(AUTHOR_KEY);
JSONObject jsonSubject = jsonReco.getJSONObject(SUBJECT_KEY);
Recommendation recommendation = new Recommendation(jsonSubject.getString(ID_KEY),
jsonAuthor.getString(ID_KEY), jsonReco.getString(TEXT_KEY));
getRecommendationMapper().insert(recommendation);
Map<String, Person> people = getPeopleInfoForRecommendations(recommendation);
JSONObject recoJSON = convertRecoToJSON(recommendation,
people.get(recommendation.getAuthorOpenSocialId()),
people.get(recommendation.getSubjectOpenSocialId()));
getAdaptedResponse().setEntity(recoJSON.toString(),
MediaType.APPLICATION_JSON);
}
catch (IOException e)