Class ActivityToolUtils
java.lang.Object
io.meeds.mcp.server.tool.util.ActivityToolUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic ActivityCommentModeltoActivityCommentModel(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) static ActivityModeltoActivityModel(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.static ActivityModeltoActivityModel(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.static ActivitySummaryModeltoActivitySummaryModel(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.static SpaceSummaryModeltoSpaceSummaryModel(SpaceModel space) static UserSummaryModeltoUserSummaryModel(UserModel user)
-
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 servicespaceService- the space serviceidentityManager- the identity serviceuserAcl- the ACL servicepermanentLinkService- the permanent link serviceprofilePropertyService- the profile property servicetranslationService- the translation servicei18NActivityProcessor- the activity i18n processorportalConfigService- the portal configuration serviceactivityId- the activity idcurrentUserAclIdentity- the current user's ACL identitycurrentUserLocale- the current user's locale- Returns:
- the activity,
nullwhen 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 servicespaceService- the space serviceidentityManager- the identity serviceuserAcl- the ACL servicepermanentLinkService- the permanent link serviceprofilePropertyService- the profile property servicetranslationService- the translation servicei18NActivityProcessor- the activity i18n processorportalConfigService- the portal configuration serviceactivity- the activity, may benullcurrentUserAclIdentity- the current user's ACL identitycurrentUserLocale- the current user's locale- Returns:
- the activity model,
nullwhen the activity is
-
toActivitySummaryModel
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 benull- Returns:
- the list item,
nullwhen the activity is
-
toUserSummaryModel
- Parameters:
user- the user, may benull- Returns:
- the user's username and display name,
nullwhen the user is
-
toSpaceSummaryModel
- Parameters:
space- the space, may benull- Returns:
- the space's id and name,
nullwhen 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)
-