Class ForumActivityUtils
java.lang.Object
org.exoplatform.forum.ext.activity.ForumActivityUtils
Created by The eXo Platform SAS
Author : thanh_vucong
thanh_vucong@exoplatform.com
Jan 10, 2013
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGets ActivityId from existing Topic in Context.static org.exoplatform.social.core.manager.ActivityManagerstatic org.exoplatform.social.core.activity.model.ExoSocialActivityGets ActivityId of poll from existing Topic in Context.static org.exoplatform.social.core.activity.model.ExoSocialActivityGets ActivityId from existing Topic in Context.static StringgetActivityParamValue(org.exoplatform.social.core.activity.model.ExoSocialActivity activity, String key) static org.exoplatform.social.core.activity.model.ExoSocialActivitygetCommentOfPost(String postPath) Gets activity's comment from existing post in Context.static org.exoplatform.forum.service.ForumServicestatic org.exoplatform.social.core.identity.model.IdentitygetIdentity(String remoteId) static org.exoplatform.social.core.manager.IdentityManagerstatic org.exoplatform.poll.service.PollgetPoll(org.exoplatform.social.core.activity.model.ExoSocialActivity activity) static org.exoplatform.forum.service.PostgetPost(org.exoplatform.social.core.activity.model.ExoSocialActivity activity) static StringgetSpaceGroupId(String forumId) static org.exoplatform.social.core.identity.model.IdentitygetSpaceIdentity(String forumId) static org.exoplatform.social.core.space.spi.SpaceServicestatic org.exoplatform.forum.service.Topicstatic org.exoplatform.forum.service.TopicgetTopic(org.exoplatform.social.core.activity.model.ExoSocialActivity activity) static booleanstatic booleanisCategoryPublic(org.exoplatform.forum.service.Category category) static booleanisForumPublic(org.exoplatform.forum.service.Forum forum) static booleanisPostPublic(org.exoplatform.forum.service.Post post) static booleanisTopicPublic(org.exoplatform.forum.service.Topic topic) static voidremoveActivities(String... activityIds) Deletes Activitiesstatic voidremoveComment(String activityId, String commentId) Deletes commentstatic voidsaveTopicActivity(org.exoplatform.social.core.identity.model.Identity poster, org.exoplatform.social.core.identity.model.Identity streamOwner, org.exoplatform.social.core.activity.model.ExoSocialActivity activity, org.exoplatform.forum.service.Topic topic) static voidtakeActivityBack(org.exoplatform.forum.service.Topic topic, String activityId) static voidtakeActivityBack(org.exoplatform.forum.service.Topic topic, org.exoplatform.social.core.activity.model.ExoSocialActivity activity) static voidtakeCommentBack(org.exoplatform.forum.service.Post post, String commentId) static voidtakeCommentBack(org.exoplatform.forum.service.Post post, org.exoplatform.social.core.activity.model.ExoSocialActivity comment) static voidupdateActivities(org.exoplatform.social.core.activity.model.ExoSocialActivity activity) static voidupdateActivityByTopic(org.exoplatform.forum.service.Topic topic, org.exoplatform.social.core.activity.model.ExoSocialActivity activity) static voidupdateTopicPostCount(ForumActivityContext ctx, boolean isAdded)
-
Constructor Details
-
ForumActivityUtils
public ForumActivityUtils()
-
-
Method Details
-
getSpaceIdentity
-
getSpaceGroupId
-
hasSpace
-
isCategoryPublic
public static boolean isCategoryPublic(org.exoplatform.forum.service.Category category) -
isForumPublic
public static boolean isForumPublic(org.exoplatform.forum.service.Forum forum) -
isTopicPublic
public static boolean isTopicPublic(org.exoplatform.forum.service.Topic topic) -
isPostPublic
public static boolean isPostPublic(org.exoplatform.forum.service.Post post) -
getTopic
public static org.exoplatform.forum.service.Topic getTopic(ForumActivityContext ctx) throws Exception - Throws:
Exception
-
takeActivityBack
public static void takeActivityBack(org.exoplatform.forum.service.Topic topic, org.exoplatform.social.core.activity.model.ExoSocialActivity activity) -
takeActivityBack
-
takeCommentBack
public static void takeCommentBack(org.exoplatform.forum.service.Post post, org.exoplatform.social.core.activity.model.ExoSocialActivity comment) -
takeCommentBack
-
updateTopicPostCount
- Throws:
Exception
-
updateActivityByTopic
public static void updateActivityByTopic(org.exoplatform.forum.service.Topic topic, org.exoplatform.social.core.activity.model.ExoSocialActivity activity) throws Exception - Throws:
Exception
-
saveTopicActivity
public static void saveTopicActivity(org.exoplatform.social.core.identity.model.Identity poster, org.exoplatform.social.core.identity.model.Identity streamOwner, org.exoplatform.social.core.activity.model.ExoSocialActivity activity, org.exoplatform.forum.service.Topic topic) throws Exception - Throws:
Exception
-
getActivityId
Gets ActivityId from existing Topic in Context. If is NULL, create new Activity for Topic.- Parameters:
ctx-- Returns:
-
getActivityOfTopic
public static org.exoplatform.social.core.activity.model.ExoSocialActivity getActivityOfTopic(ForumActivityContext ctx) Gets ActivityId from existing Topic in Context. If is NULL, create new Activity for Topic.- Parameters:
ctx-- Returns:
-
getCommentOfPost
public static org.exoplatform.social.core.activity.model.ExoSocialActivity getCommentOfPost(String postPath) Gets activity's comment from existing post in Context. If is NULL, create new Activity for Topic.- Parameters:
postPath-- Returns:
-
removeActivities
Deletes Activities- Parameters:
activityIds-
-
removeComment
Deletes comment- Parameters:
activityId-commentId-
-
updateActivities
public static void updateActivities(org.exoplatform.social.core.activity.model.ExoSocialActivity activity) -
getForumService
public static org.exoplatform.forum.service.ForumService getForumService() -
getActivityManager
public static org.exoplatform.social.core.manager.ActivityManager getActivityManager() -
getIdentityManager
public static org.exoplatform.social.core.manager.IdentityManager getIdentityManager() -
getSpaceService
public static org.exoplatform.social.core.space.spi.SpaceService getSpaceService() -
getIdentity
-
getActivityOfPollTopic
public static org.exoplatform.social.core.activity.model.ExoSocialActivity getActivityOfPollTopic(ForumActivityContext ctx) Gets ActivityId of poll from existing Topic in Context.- Parameters:
ctx-- Returns:
-
getActivityParamValue
-
getTopic
public static org.exoplatform.forum.service.Topic getTopic(org.exoplatform.social.core.activity.model.ExoSocialActivity activity) -
getPost
public static org.exoplatform.forum.service.Post getPost(org.exoplatform.social.core.activity.model.ExoSocialActivity activity) -
getPoll
public static org.exoplatform.poll.service.Poll getPoll(org.exoplatform.social.core.activity.model.ExoSocialActivity activity)
-