Class ForumActivityUtils

java.lang.Object
org.exoplatform.forum.ext.activity.ForumActivityUtils

public class ForumActivityUtils extends Object
Created by The eXo Platform SAS Author : thanh_vucong thanh_vucong@exoplatform.com Jan 10, 2013
  • Constructor Details

    • ForumActivityUtils

      public ForumActivityUtils()
  • Method Details

    • getSpaceIdentity

      public static org.exoplatform.social.core.identity.model.Identity getSpaceIdentity(String forumId)
    • getSpaceGroupId

      public static String getSpaceGroupId(String forumId)
    • hasSpace

      public static boolean hasSpace(String forumId)
    • 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

      public static void takeActivityBack(org.exoplatform.forum.service.Topic topic, String activityId)
    • takeCommentBack

      public static void takeCommentBack(org.exoplatform.forum.service.Post post, org.exoplatform.social.core.activity.model.ExoSocialActivity comment)
    • takeCommentBack

      public static void takeCommentBack(org.exoplatform.forum.service.Post post, String commentId)
    • updateTopicPostCount

      public static void updateTopicPostCount(ForumActivityContext ctx, boolean isAdded) throws Exception
      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

      public static String getActivityId(ForumActivityContext ctx)
      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

      public static void removeActivities(String... activityIds)
      Deletes Activities
      Parameters:
      activityIds -
    • removeComment

      public static void removeComment(String activityId, String commentId)
      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

      public static org.exoplatform.social.core.identity.model.Identity getIdentity(String remoteId)
    • 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

      public static String getActivityParamValue(org.exoplatform.social.core.activity.model.ExoSocialActivity activity, String key)
    • 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)