Class ContentActivityStreamUtil


  • public class ContentActivityStreamUtil
    extends Object
    Utility class with methods related to contents and the activity stream framework
    Since:
    8.2.0
    Version:
    $Revision: 19927 $ $Date: 2017-02-15 17:43:02 -0200 (Wed, 15 Feb 2017) $
    • Constructor Detail

      • ContentActivityStreamUtil

        public ContentActivityStreamUtil()
    • Method Detail

      • isActivityStreamAutomaticGenerationEnabledByScope

        public static boolean isActivityStreamAutomaticGenerationEnabledByScope​(String scope,
                                                                                Content content,
                                                                                ITransaction transaction)
        Checks if this content's service and source have the automatic generation of activities by the activity stream framework enabled with a specific scope.
        Parameters:
        scope - scope to be validated
        content - the content to check
        transaction - the transaction to use
        Returns:
        Since:
        8.2.0
      • getObjectTypeId

        public static String getObjectTypeId​(String serviceId,
                                             String sourceId)
        Get the ActivityObjectType identifier for the specified service and source
        Parameters:
        serviceId - the service identifier
        sourceId - the source identifier
        Returns:
        the ActivityObjectType identifier
        Since:
        8.2.0
      • addViewActivityPriorityRestrictions

        public static void addViewActivityPriorityRestrictions​(SessionConfig sessionConfig,
                                                               Collection<Collection<String>> principalsWithAllowViewPermission,
                                                               Collection<String> principalsWithDenyViewPermission,
                                                               ContentLocale contentLocale,
                                                               ITransaction transaction)
                                                        throws PortalException
        Add view activity priority restrictions.
        Parameters:
        sessionConfig - user session information.
        principalsWithAllowViewPermission - collection where will be added collections of principals with allow permission that the user must belong to for allowing access to the activity priority.
        principalsWithDenyViewPermission - collection where the principals with deny permission will be added to.
        contentLocale - the content locale that will be verified which principals may view.
        transaction - transaction for persistence access.
        Throws:
        PortalException
        Since:
        8.2.0