Package lumis.content.activitystream
Class ContentActivityStreamUtil
- java.lang.Object
-
- lumis.content.activitystream.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 Summary
Constructors Constructor Description ContentActivityStreamUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addViewActivityPriorityRestrictions(SessionConfig sessionConfig, Collection<Collection<String>> principalsWithAllowViewPermission, Collection<String> principalsWithDenyViewPermission, ContentLocale contentLocale, ITransaction transaction)
Add view activity priority restrictions.static ActivityObjectType
getObjectType(String serviceId, String sourceId)
Get theActivityObjectType
for the specified service and sourcestatic String
getObjectTypeId(String serviceId, String sourceId)
Get theActivityObjectType
identifier for the specified service and sourcestatic 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.
-
-
-
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 validatedcontent
- the content to checktransaction
- the transaction to use- Returns:
- Since:
- 8.2.0
-
getObjectType
public static ActivityObjectType getObjectType(String serviceId, String sourceId) throws PortalException
Get theActivityObjectType
for the specified service and source- Parameters:
serviceId
- the service identifiersourceId
- the source identifier- Returns:
- the
ActivityObjectType
- Throws:
PortalException
- Since:
- 8.2.0
-
getObjectTypeId
public static String getObjectTypeId(String serviceId, String sourceId)
Get theActivityObjectType
identifier for the specified service and source- Parameters:
serviceId
- the service identifiersourceId
- 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
-
-