Package org.exoplatform.social.core
Class ActivityTypePlugin
java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.social.core.ActivityTypePlugin
- All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin
public class ActivityTypePlugin
extends org.exoplatform.container.component.BaseComponentPlugin
A plugin to allow extending A new Activity Type behavior such as enabling
activity/comment type notification.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected Stringstatic final Stringprotected booleanFields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetActivityTitle(ExoSocialActivity activity) Return specific activity titlebooleanisActivityDeletable(ExoSocialActivity activity, org.exoplatform.services.security.Identity userAclIdentity) Return whether an activity is deletable or notbooleanisActivityEditable(ExoSocialActivity activity, org.exoplatform.services.security.Identity userAclIdentity) Return whether an activity is editable or notbooleanisActivityViewable(ExoSocialActivity activity, org.exoplatform.services.security.Identity userAclIdentity) Return whether an activity is viewable by a user or notbooleanisEnableNotification(ExoSocialActivity activity, String username) Makes a check whether the activity notification is enabled for a given user or not.Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setName
-
Field Details
-
ENABLE_NOTIFICATION_PARAM
- See Also:
-
ACTIVITY_TYPE_PARAM
- See Also:
-
activityType
-
enableNotification
protected boolean enableNotification
-
-
Constructor Details
-
ActivityTypePlugin
public ActivityTypePlugin(org.exoplatform.container.xml.InitParams params)
-
-
Method Details
-
isActivityDeletable
public boolean isActivityDeletable(ExoSocialActivity activity, org.exoplatform.services.security.Identity userAclIdentity) Return whether an activity is deletable or not- Parameters:
activity-ExoSocialActivityuserAclIdentity- userIdentitymaking the change- Returns:
- true is user can delete activity, else false
-
isActivityEditable
public boolean isActivityEditable(ExoSocialActivity activity, org.exoplatform.services.security.Identity userAclIdentity) Return whether an activity is editable or not- Parameters:
activity-ExoSocialActivityuserAclIdentity- userIdentitymaking the change- Returns:
- true is user can edit the activity, else false
-
isEnableNotification
Makes a check whether the activity notification is enabled for a given user or not.- Parameters:
activity-ExoSocialActivityusername-Identityremote id- Returns:
- true if enabled, else false
-
isActivityViewable
public boolean isActivityViewable(ExoSocialActivity activity, org.exoplatform.services.security.Identity userAclIdentity) Return whether an activity is viewable by a user or not- Parameters:
activity-ExoSocialActivityuserAclIdentity- userIdentitymaking the change- Returns:
- true is user can view the activity, else false
-
getActivityTitle
Return specific activity title- Parameters:
activity-ExoSocialActivity- Returns:
- activity title to use in notification by example
-