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 Details

    • ENABLE_NOTIFICATION_PARAM

      public static final String ENABLE_NOTIFICATION_PARAM
      See Also:
    • ACTIVITY_TYPE_PARAM

      public static final String ACTIVITY_TYPE_PARAM
      See Also:
    • activityType

      protected String 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 - ExoSocialActivity
      userAclIdentity - user Identity making 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 - ExoSocialActivity
      userAclIdentity - user Identity making the change
      Returns:
      true is user can edit the activity, else false
    • isEnableNotification

      public boolean isEnableNotification(ExoSocialActivity activity, String username)
      Makes a check whether the activity notification is enabled for a given user or not.
      Parameters:
      activity - ExoSocialActivity
      username - Identity remote 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 - ExoSocialActivity
      userAclIdentity - user Identity making the change
      Returns:
      true is user can view the activity, else false
    • getActivityTitle

      public String getActivityTitle(ExoSocialActivity activity)
      Return specific activity title
      Parameters:
      activity - ExoSocialActivity
      Returns:
      activity title to use in notification by example