Class ActivityToolUtils

java.lang.Object
io.meeds.mcp.server.tool.util.ActivityToolUtils

public class ActivityToolUtils extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    toActivityCommentModel(org.exoplatform.social.core.manager.ActivityManager activityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.portal.config.UserACL userAcl, io.meeds.portal.permlink.service.PermanentLinkService permanentLinkService, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, io.meeds.social.translation.service.TranslationService translationService, org.exoplatform.social.core.processor.I18NActivityProcessor i18NActivityProcessor, org.exoplatform.portal.config.UserPortalConfigService portalConfigService, String commentId, org.exoplatform.services.security.Identity currentUserAclIdentity, Locale currentUserLocale)
     
    toActivityModel(org.exoplatform.social.core.manager.ActivityManager activityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.portal.config.UserACL userAcl, io.meeds.portal.permlink.service.PermanentLinkService permanentLinkService, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, io.meeds.social.translation.service.TranslationService translationService, org.exoplatform.social.core.processor.I18NActivityProcessor i18NActivityProcessor, org.exoplatform.portal.config.UserPortalConfigService portalConfigService, String activityId, org.exoplatform.services.security.Identity currentUserAclIdentity, Locale currentUserLocale)
    Reads an activity and builds it as the current user sees it.
    toActivityModel(org.exoplatform.social.core.manager.ActivityManager activityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.portal.config.UserACL userAcl, io.meeds.portal.permlink.service.PermanentLinkService permanentLinkService, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, io.meeds.social.translation.service.TranslationService translationService, org.exoplatform.social.core.processor.I18NActivityProcessor i18NActivityProcessor, org.exoplatform.portal.config.UserPortalConfigService portalConfigService, org.exoplatform.social.core.activity.model.ExoSocialActivity activity, org.exoplatform.services.security.Identity currentUserAclIdentity, Locale currentUserLocale)
    Builds an activity already read as the current user sees it, without reading it again.
    Reduces an activity to the item a list of activities returns: the same fields, its author, the author of its pin and its space reduced to what names them.
     
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • toActivityModel

      public static ActivityModel toActivityModel(org.exoplatform.social.core.manager.ActivityManager activityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.portal.config.UserACL userAcl, io.meeds.portal.permlink.service.PermanentLinkService permanentLinkService, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, io.meeds.social.translation.service.TranslationService translationService, org.exoplatform.social.core.processor.I18NActivityProcessor i18NActivityProcessor, org.exoplatform.portal.config.UserPortalConfigService portalConfigService, String activityId, org.exoplatform.services.security.Identity currentUserAclIdentity, Locale currentUserLocale)
      Reads an activity and builds it as the current user sees it.
      Parameters:
      activityManager - the activity service
      spaceService - the space service
      identityManager - the identity service
      userAcl - the ACL service
      permanentLinkService - the permanent link service
      profilePropertyService - the profile property service
      translationService - the translation service
      i18NActivityProcessor - the activity i18n processor
      portalConfigService - the portal configuration service
      activityId - the activity id
      currentUserAclIdentity - the current user's ACL identity
      currentUserLocale - the current user's locale
      Returns:
      the activity, null when it doesn't exist
    • toActivityModel

      public static ActivityModel toActivityModel(org.exoplatform.social.core.manager.ActivityManager activityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.portal.config.UserACL userAcl, io.meeds.portal.permlink.service.PermanentLinkService permanentLinkService, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, io.meeds.social.translation.service.TranslationService translationService, org.exoplatform.social.core.processor.I18NActivityProcessor i18NActivityProcessor, org.exoplatform.portal.config.UserPortalConfigService portalConfigService, org.exoplatform.social.core.activity.model.ExoSocialActivity activity, org.exoplatform.services.security.Identity currentUserAclIdentity, Locale currentUserLocale)
      Builds an activity already read as the current user sees it, without reading it again.
      Parameters:
      activityManager - the activity service
      spaceService - the space service
      identityManager - the identity service
      userAcl - the ACL service
      permanentLinkService - the permanent link service
      profilePropertyService - the profile property service
      translationService - the translation service
      i18NActivityProcessor - the activity i18n processor
      portalConfigService - the portal configuration service
      activity - the activity, may be null
      currentUserAclIdentity - the current user's ACL identity
      currentUserLocale - the current user's locale
      Returns:
      the activity model, null when the activity is
    • toActivitySummaryModel

      public static ActivitySummaryModel toActivitySummaryModel(ActivityModel activity)
      Reduces an activity to the item a list of activities returns: the same fields, its author, the author of its pin and its space reduced to what names them. The names are the ones the full activity carries, so a name the viewer may not see stays absent.
      Parameters:
      activity - the activity, may be null
      Returns:
      the list item, null when the activity is
    • toUserSummaryModel

      public static UserSummaryModel toUserSummaryModel(UserModel user)
      Parameters:
      user - the user, may be null
      Returns:
      the user's username and display name, null when the user is
    • toSpaceSummaryModel

      public static SpaceSummaryModel toSpaceSummaryModel(SpaceModel space)
      Parameters:
      space - the space, may be null
      Returns:
      the space's id and name, null when the space is
    • toActivityCommentModel

      public static ActivityCommentModel toActivityCommentModel(org.exoplatform.social.core.manager.ActivityManager activityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.portal.config.UserACL userAcl, io.meeds.portal.permlink.service.PermanentLinkService permanentLinkService, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, io.meeds.social.translation.service.TranslationService translationService, org.exoplatform.social.core.processor.I18NActivityProcessor i18NActivityProcessor, org.exoplatform.portal.config.UserPortalConfigService portalConfigService, String commentId, org.exoplatform.services.security.Identity currentUserAclIdentity, Locale currentUserLocale)