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 TypeMethodDescriptiongetActivityIds(List<String> metadataObjectIds) Resolve the ids of the activities displaying the given specific Metadata objects (of typegetMetadataObjectType())getActivityTitle(ExoSocialActivity activity) Return specific activity titleReturn the specific Metadata Object Type that the activities of this type redirect their Metadata facts to (see ExoSocialActivity#hasSpecificMetadataObject) activities.booleanisActivityDeletable(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
-
getMetadataObjectType
Return the specific Metadata Object Type that the activities of this type redirect their Metadata facts to (see ExoSocialActivity#hasSpecificMetadataObject) activities. Used to resolve Metadata items (favorites by example) attached to the specific object back to their displaying activities.- Returns:
- the specific Metadata Object Type, or null when activities of this type hold their Metadata facts themselves (the default)
-
getActivityIds
Resolve the ids of the activities displaying the given specific Metadata objects (of typegetMetadataObjectType())
-