Class SocialNotificationUtils
java.lang.Object
org.exoplatform.social.notification.plugin.SocialNotificationUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.social.core.activity.model.ExoSocialActivity>static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String>static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String>static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String>static final Stringstatic final Stringstatic final Patternstatic final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String>static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String>static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String>static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String>static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String>static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String>static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String>static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.social.core.identity.model.Profile>static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.social.core.relationship.model.Relationship>static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String>static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String>static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String>static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String>static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.social.core.space.model.Space>static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String>static final Stringstatic final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddFooterAndFirstName(String remoteId, org.exoplatform.commons.api.notification.service.template.TemplateContext templateContext) static org.exoplatform.commons.api.notification.model.NotificationInfoaddUserToPreviousNotification(org.exoplatform.commons.api.notification.model.NotificationInfo notification, String propertyName, String activityId, String userId) static StringbuildRedirecActivityUrl(String type, String id, String activityTitle) static StringbuildRedirecUrl(String type, String id, String name) static StringgetBody(org.exoplatform.commons.api.notification.NotificationContext ctx, org.exoplatform.commons.api.notification.service.template.TemplateContext context, org.exoplatform.social.core.activity.model.ExoSocialActivity activity) static StringgetImagePlaceHolder(String language) static StringgetMessageByIds(Map<String, List<String>> receiversMap, Map<String, List<org.apache.commons.lang3.tuple.Pair<String, String>>> activityUserComments, org.exoplatform.commons.api.notification.service.template.TemplateContext templateContext) static StringgetMessageByIds(Map<String, List<String>> receiversMap, org.exoplatform.commons.api.notification.service.template.TemplateContext templateContext) static StringgetMessageByIds(Map<String, List<String>> receiversMap, org.exoplatform.commons.api.notification.service.template.TemplateContext templateContext, String type) static StringgetMessageInSpace(Map<String, List<String>> receiversMap, org.exoplatform.commons.api.notification.service.template.TemplateContext templateContext) static Stringstatic booleanisSpaceActivity(org.exoplatform.social.core.activity.model.ExoSocialActivity activity) mergeUsers(org.exoplatform.commons.api.notification.model.NotificationInfo notification, String propertyName, String activityId, String userId) static StringprocessImageTitle(String body, String placeholder) static voidstatic voidprocessInforUserComments(Map<String, List<org.apache.commons.lang3.tuple.Pair<String, String>>> map, String key, org.apache.commons.lang3.tuple.Pair<String, String> value) toListUserIds(String... userIds)
-
Field Details
-
IMG_SRC_REGEX
-
ACTIVITY_ID
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String> ACTIVITY_ID -
COMMENT_ID
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String> COMMENT_ID -
COMMENT_REPLY_ID
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String> COMMENT_REPLY_ID -
PARENT_ACTIVITY_ID
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String> PARENT_ACTIVITY_ID -
POSTER
-
WATCHED
-
LIKER
-
LIKERS
-
SENDER
-
ACTIVITY
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.social.core.activity.model.ExoSocialActivity> ACTIVITY -
ORIGINAL_TITLE
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String> ORIGINAL_TITLE -
ORIGINAL_TITLE_SHARED
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String> ORIGINAL_TITLE_SHARED -
PROFILE
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.social.core.identity.model.Profile> PROFILE -
SPACE
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.social.core.space.model.Space> SPACE -
REMOTE_ID
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String> REMOTE_ID -
SPACE_ID
-
REQUEST_FROM
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String> REQUEST_FROM -
PRETTY_NAME
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String> PRETTY_NAME -
RELATIONSHIP
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.social.core.relationship.model.Relationship> RELATIONSHIP -
RELATIONSHIP_ID
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String> RELATIONSHIP_ID -
EMPTY_STR
- See Also:
-
SPACE_STR
- See Also:
-
DOT_STRING
- See Also:
-
A_HREF_TAG_REGEX
- See Also:
-
-
Constructor Details
-
SocialNotificationUtils
public SocialNotificationUtils()
-
-
Method Details
-
getUserId
-
toListUserIds
-
isSpaceActivity
public static boolean isSpaceActivity(org.exoplatform.social.core.activity.model.ExoSocialActivity activity) -
getMessageInSpace
public static String getMessageInSpace(Map<String, List<String>> receiversMap, org.exoplatform.commons.api.notification.service.template.TemplateContext templateContext) - Parameters:
receiversMap-templateContext-- Returns:
-
getMessageByIds
-
getMessageByIds
public static String getMessageByIds(Map<String, List<String>> receiversMap, Map<String, List<org.apache.commons.lang3.tuple.Pair<String, String>>> activityUserComments, org.exoplatform.commons.api.notification.service.template.TemplateContext templateContext) - Parameters:
receiversMap-activityUserComments-templateContext-- Returns:
-
getMessageByIds
public static String getMessageByIds(Map<String, List<String>> receiversMap, org.exoplatform.commons.api.notification.service.template.TemplateContext templateContext, String type) - Parameters:
receiversMap-templateContext-type-- Returns:
-
processInforSendTo
-
processInforUserComments
-
buildRedirecUrl
-
buildRedirecActivityUrl
-
processImageTitle
-
getImagePlaceHolder
-
getBody
public static String getBody(org.exoplatform.commons.api.notification.NotificationContext ctx, org.exoplatform.commons.api.notification.service.template.TemplateContext context, org.exoplatform.social.core.activity.model.ExoSocialActivity activity) -
addUserToPreviousNotification
-
mergeUsers
-