Class ForumActivityBuilder
java.lang.Object
org.exoplatform.forum.ext.activity.ForumActivityBuilder
Created by The eXo Platform SAS
Author : thanh_vucong
thanh_vucong@exoplatform.com
Jan 10, 2013
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionstatic org.exoplatform.social.core.activity.model.ExoSocialActivitycreateActivity(org.exoplatform.forum.service.Topic topic, ForumActivityContext ctx) static org.exoplatform.social.core.activity.model.ExoSocialActivitycreateActivityComment(org.exoplatform.forum.service.Post post, ForumActivityContext ctx) static org.exoplatform.social.core.activity.model.ExoSocialActivitycreateActivityComment(org.exoplatform.forum.service.Topic topic, ForumActivityContext ctx) static StringdecodeHTMLInput(String message) static StringprocessContent(String content, int nbOfLines) No more than nbOfLines lines No more than 430 characters If the content is larger than these limits, we add "..." at the end of the abstract.static final StringTruncates large Strings showing a portion of the String's head and tail with the head cut out and replaced with '...'.static org.exoplatform.social.core.activity.model.ExoSocialActivityupdateActivityComment(org.exoplatform.social.core.activity.model.ExoSocialActivity activity, org.exoplatform.forum.service.Post post, ForumActivityContext ctx) static org.exoplatform.social.core.activity.model.ExoSocialActivityupdateNumberOfReplies(org.exoplatform.forum.service.Topic topic, org.exoplatform.social.core.activity.model.ExoSocialActivity activity) static org.exoplatform.social.core.activity.model.ExoSocialActivityupdateNumberOfReplies(org.exoplatform.social.core.activity.model.ExoSocialActivity activity, boolean isDelete) static org.exoplatform.social.core.activity.model.ExoSocialActivityupdateVoteRate(org.exoplatform.forum.service.Topic topic, org.exoplatform.social.core.activity.model.ExoSocialActivity activity)
-
Field Details
-
FORUM_ACTIVITY_TYPE
- See Also:
-
FORUM_ID_KEY
- See Also:
-
CATE_ID_KEY
- See Also:
-
POST_TYPE
- See Also:
-
POST_ID_KEY
- See Also:
-
POST_OWNER_KEY
- See Also:
-
POST_LINK_KEY
- See Also:
-
POST_NAME_KEY
- See Also:
-
TOPIC_ID_KEY
- See Also:
-
TOPIC_LINK_KEY
- See Also:
-
TOPIC_OWNER_KEY
- See Also:
-
TOPIC_POST_COUNT_KEY
- See Also:
-
TOPIC_VOTE_RATE_KEY
- See Also:
-
SPACE_GROUP_ID
- See Also:
-
-
Method Details
-
createActivityComment
public static org.exoplatform.social.core.activity.model.ExoSocialActivity createActivityComment(org.exoplatform.forum.service.Post post, ForumActivityContext ctx) -
updateActivityComment
public static org.exoplatform.social.core.activity.model.ExoSocialActivity updateActivityComment(org.exoplatform.social.core.activity.model.ExoSocialActivity activity, org.exoplatform.forum.service.Post post, ForumActivityContext ctx) -
createActivityComment
public static org.exoplatform.social.core.activity.model.ExoSocialActivity createActivityComment(org.exoplatform.forum.service.Topic topic, ForumActivityContext ctx) -
decodeHTMLInput
-
processContent
No more than nbOfLines lines No more than 430 characters If the content is larger than these limits, we add "..." at the end of the abstract.- Parameters:
content-nbOfLines-- Returns:
-
trunc
Truncates large Strings showing a portion of the String's head and tail with the head cut out and replaced with '...'.- Parameters:
str- the string to truncatehead- the amount of the head to display- Returns:
- the head truncated string
-
createActivity
public static org.exoplatform.social.core.activity.model.ExoSocialActivity createActivity(org.exoplatform.forum.service.Topic topic, ForumActivityContext ctx) -
updateNumberOfReplies
public static org.exoplatform.social.core.activity.model.ExoSocialActivity updateNumberOfReplies(org.exoplatform.forum.service.Topic topic, org.exoplatform.social.core.activity.model.ExoSocialActivity activity) -
updateNumberOfReplies
public static org.exoplatform.social.core.activity.model.ExoSocialActivity updateNumberOfReplies(org.exoplatform.social.core.activity.model.ExoSocialActivity activity, boolean isDelete) -
updateVoteRate
public static org.exoplatform.social.core.activity.model.ExoSocialActivity updateVoteRate(org.exoplatform.forum.service.Topic topic, org.exoplatform.social.core.activity.model.ExoSocialActivity activity)
-