int activityType = activity.getType();
// Link
WallEntry wallEntry = WallEntryLocalServiceUtil.getWallEntry(
activity.getClassPK());
String link =
themeDisplay.getPortalURL() +
themeDisplay.getPathFriendlyURLPublic() + StringPool.SLASH +
HtmlUtil.escapeURL(receiverUser.getScreenName()) +
"/profile/-/wall/" + activity.getClassPK();
// Title
String title = StringPool.BLANK;
if (activityType == WallActivityKeys.ADD_ENTRY) {
title = themeDisplay.translate(
"activity-social-networking-wall-add-entry",
new Object[] {creatorUserName, receiverUserName});
}
// Body
StringBuilder sb = new StringBuilder();
sb.append("<a href=\"");
sb.append(link);
sb.append("\">");
sb.append(HtmlUtil.escape(cleanContent(wallEntry.getComments())));
sb.append("</a>");
String body = sb.toString();
return new SocialActivityFeedEntry(link, title, body);