org.exoplatform.forum.ext.activity
Class ForumActivityBuilder
java.lang.Object
org.exoplatform.forum.ext.activity.ForumActivityBuilder
public class ForumActivityBuilder
- extends Object
Created by The eXo Platform SAS
Author : thanh_vucong
thanh_vucong@exoplatform.com
Jan 10, 2013
|
Method Summary |
static org.exoplatform.social.core.activity.model.ExoSocialActivity |
createActivity(org.exoplatform.forum.service.Topic topic,
ForumActivityContext ctx)
|
static org.exoplatform.social.core.activity.model.ExoSocialActivity |
createActivityComment(org.exoplatform.forum.service.Post post,
ForumActivityContext ctx)
|
static org.exoplatform.social.core.activity.model.ExoSocialActivity |
createActivityComment(org.exoplatform.forum.service.Topic topic,
ForumActivityContext ctx)
|
static String |
decodeHTMLInput(String message)
|
static String |
getFourFirstLines(String str)
|
static String |
getNumberFirstLines(String content,
int line)
No more than 4 lines
No more than 430 characters
If the content is larger than these limits, we add "..." at the end of the abstract. |
static String |
trunc(String str,
int head,
boolean needTail)
Truncates 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.ExoSocialActivity |
updateNumberOfReplies(org.exoplatform.social.core.activity.model.ExoSocialActivity activity,
boolean isDelete)
|
static org.exoplatform.social.core.activity.model.ExoSocialActivity |
updateNumberOfReplies(org.exoplatform.forum.service.Topic topic,
org.exoplatform.social.core.activity.model.ExoSocialActivity activity)
|
static org.exoplatform.social.core.activity.model.ExoSocialActivity |
updateVoteRate(org.exoplatform.forum.service.Topic topic,
org.exoplatform.social.core.activity.model.ExoSocialActivity activity)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FORUM_ACTIVITY_TYPE
public static final String FORUM_ACTIVITY_TYPE
- See Also:
- Constant Field Values
FORUM_ID_KEY
public static final String FORUM_ID_KEY
- See Also:
- Constant Field Values
CATE_ID_KEY
public static final String CATE_ID_KEY
- See Also:
- Constant Field Values
POST_TYPE
public static final String POST_TYPE
- See Also:
- Constant Field Values
POST_ID_KEY
public static final String POST_ID_KEY
- See Also:
- Constant Field Values
POST_OWNER_KEY
public static final String POST_OWNER_KEY
- See Also:
- Constant Field Values
POST_LINK_KEY
public static final String POST_LINK_KEY
- See Also:
- Constant Field Values
POST_NAME_KEY
public static final String POST_NAME_KEY
- See Also:
- Constant Field Values
TOPIC_ID_KEY
public static final String TOPIC_ID_KEY
- See Also:
- Constant Field Values
TOPIC_OWNER_KEY
public static final String TOPIC_OWNER_KEY
- See Also:
- Constant Field Values
TOPIC_POST_COUNT_KEY
public static final String TOPIC_POST_COUNT_KEY
- See Also:
- Constant Field Values
TOPIC_VOTE_RATE_KEY
public static final String TOPIC_VOTE_RATE_KEY
- See Also:
- Constant Field Values
SPACE_GROUP_ID
public static final String SPACE_GROUP_ID
- See Also:
- Constant Field Values
createActivityComment
public static org.exoplatform.social.core.activity.model.ExoSocialActivity createActivityComment(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
public static String decodeHTMLInput(String message)
getFourFirstLines
public static String getFourFirstLines(String str)
getNumberFirstLines
public static String getNumberFirstLines(String content,
int line)
- No more than 4 lines
No more than 430 characters
If the content is larger than these limits, we add "..." at the end of the abstract.
- Parameters:
content - line -
- Returns:
trunc
public static final String trunc(String str,
int head,
boolean needTail)
- 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)
Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.