* - facebook post
*
* @return a Content object
*/
private Content post2Content(Post post) {
Content content = new Content();
content.setProvider(getFbContentProvider().getId());
content.setType(ContentTypeEnum.POST.name());
content.setContentUrl(URLUtils.makeContentURL( post.getId(), ContentTypeEnum.POST.name()));
// set modification date
if (post.getUpdatedTime() != null) {
content.setModificationDate(post.getUpdatedTime().getTime());
} else {
content.setModificationDate(new Date().getTime());
}
if (post.getMessage() != null) {
content.setFulltext(post.getMessage());
}
addAttribute(content, "facebooktype", post.getType());
addAttribute(content, "id", post.getId());
addAttribute(content, "from_id", post.getFrom().getId());