Liferay 6.2-ce-ga5

com.liferay.portal.service.permission
Interface SubscriptionPermission


public interface SubscriptionPermission

Checks permissions with respect to subscriptions.


Method Summary
 void check(PermissionChecker permissionChecker, String className, long classPK)
          Deprecated. As of 6.2.0, replaced by check(PermissionChecker, String, long, String, long)
 void check(PermissionChecker permissionChecker, String subscriptionClassName, long subscriptionClassPK, String inferredClassName, long inferredClassPK)
          Checks if the user has permission to subscribe to the subscription entity and receive notifications about the inferred entity.
 boolean contains(PermissionChecker permissionChecker, String className, long classPK)
          Deprecated. As of 6.2.0, replaced by contains(PermissionChecker, String, long, String, long)
 boolean contains(PermissionChecker permissionChecker, String subscriptionClassName, long subscriptionClassPK, String inferredClassName, long inferredClassPK)
          Returns true if the user has permission to subscribe to the subscribed entity and receive notifications about the inferred entity.
 

Method Detail

check

void check(PermissionChecker permissionChecker,
           String className,
           long classPK)
           throws PortalException,
                  SystemException
Deprecated. As of 6.2.0, replaced by check(PermissionChecker, String, long, String, long)

Throws:
PortalException
SystemException

check

void check(PermissionChecker permissionChecker,
           String subscriptionClassName,
           long subscriptionClassPK,
           String inferredClassName,
           long inferredClassPK)
           throws PortalException,
                  SystemException
Checks if the user has permission to subscribe to the subscription entity and receive notifications about the inferred entity.

Parameters:
permissionChecker - the permission checker
subscriptionClassName - the class name of the subscribed entity
subscriptionClassPK - the primary key of the subscribed entity
inferredClassName - the class name of the inferred entity (optionally null if the the subscribed entity is the inferred entity).
inferredClassPK - the primary key of the inferred entity.
Throws:
PortalException - if the user did not have permission to view the inferred entity or receive notifications about the subscribed entity, or if a portal exception occurred
SystemException - if a system exception occurred
See Also:
contains(PermissionChecker, String, long, String, long)

contains

boolean contains(PermissionChecker permissionChecker,
                 String className,
                 long classPK)
                 throws PortalException,
                        SystemException
Deprecated. As of 6.2.0, replaced by contains(PermissionChecker, String, long, String, long)

Throws:
PortalException
SystemException

contains

boolean contains(PermissionChecker permissionChecker,
                 String subscriptionClassName,
                 long subscriptionClassPK,
                 String inferredClassName,
                 long inferredClassPK)
                 throws PortalException,
                        SystemException
Returns true if the user has permission to subscribe to the subscribed entity and receive notifications about the inferred entity.

If the subscribed entity is a container and if an inferred entity (presumably within the container) is specified, a view permission check is performed on the inferred entity. The inferred entity is the subject of the notification. A failed view check on the inferred entity short-circuits further permission checks and prevents notifications from being sent. Checking the view permission on the inferred entity is useful for enforcing permissions for private subtrees within larger container entities to which the user is subscribed.

If the subscribed entity and the inferred entity are the same, then no inferred entity needs to be specified. Without any inferred entity specified only the subscription check on the subscribed entity is performed.

Parameters:
permissionChecker - the permission checker
subscriptionClassName - the class name of the subscribed entity
subscriptionClassPK - the primary key of the subscribed entity
inferredClassName - the class name of the inferred entity if the subscribed entity is a container entity
inferredClassPK - the primary key of the inferred entity if the subscribed entity is a container entity
Returns:
true if the user has permission to subscribe to the subscribed entity and receive notifications about the inferred entity; false otherwise
Throws:
PortalException - if the user did not have permission to view the inferred entity or receive notifications about it via the subscribed entity, or if a portal exception occurred
SystemException - if a system exception occurred

Liferay 6.2-ce-ga5