public interface SubscriptionPermission
| Modifier and Type | Method and Description |
|---|---|
void |
check(PermissionChecker permissionChecker,
java.lang.String className,
long classPK)
Deprecated.
As of 6.2.0, replaced by
check(PermissionChecker,
String, long, String, long) |
void |
check(PermissionChecker permissionChecker,
java.lang.String subscriptionClassName,
long subscriptionClassPK,
java.lang.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,
java.lang.String className,
long classPK)
Deprecated.
As of 6.2.0, replaced by
contains(PermissionChecker,
String, long, String, long) |
boolean |
contains(PermissionChecker permissionChecker,
java.lang.String subscriptionClassName,
long subscriptionClassPK,
java.lang.String inferredClassName,
long inferredClassPK)
Returns
true if the user has permission to subscribe to the
subscribed entity and receive notifications about the inferred entity. |
void check(PermissionChecker permissionChecker, java.lang.String className, long classPK) throws PortalException, SystemException
check(PermissionChecker,
String, long, String, long)PortalExceptionSystemExceptionvoid check(PermissionChecker permissionChecker, java.lang.String subscriptionClassName, long subscriptionClassPK, java.lang.String inferredClassName, long inferredClassPK) throws PortalException, SystemException
permissionChecker - the permission checkersubscriptionClassName - the class name of the subscribed entitysubscriptionClassPK - the primary key of the subscribed entityinferredClassName - 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.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 occurredSystemException - if a system exception occurredcontains(PermissionChecker, String, long, String, long)boolean contains(PermissionChecker permissionChecker, java.lang.String className, long classPK) throws PortalException, SystemException
contains(PermissionChecker,
String, long, String, long)PortalExceptionSystemExceptionboolean contains(PermissionChecker permissionChecker, java.lang.String subscriptionClassName, long subscriptionClassPK, java.lang.String inferredClassName, long inferredClassPK) throws PortalException, SystemException
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.
permissionChecker - the permission checkersubscriptionClassName - the class name of the subscribed entitysubscriptionClassPK - the primary key of the subscribed entityinferredClassName - the class name of the inferred entity if the
subscribed entity is a container entityinferredClassPK - the primary key of the inferred entity if the
subscribed entity is a container entitytrue if the user has permission to subscribe to the
subscribed entity and receive notifications about the inferred
entity; false otherwisePortalException - 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 occurredSystemException - if a system exception occurred