com.liferay.portal.service.permission
Class SubscriptionPermissionImpl
java.lang.Object
com.liferay.portal.service.permission.SubscriptionPermissionImpl
- All Implemented Interfaces:
- SubscriptionPermission
public class SubscriptionPermissionImpl
- extends Object
- implements SubscriptionPermission
|
Method Summary |
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 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. |
protected Boolean |
hasPermission(PermissionChecker permissionChecker,
String className,
long classPK,
String actionId)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SubscriptionPermissionImpl
public SubscriptionPermissionImpl()
check
public void check(PermissionChecker permissionChecker,
String subscriptionClassName,
long subscriptionClassPK,
String inferredClassName,
long inferredClassPK)
throws PortalException,
SystemException
- Description copied from interface:
SubscriptionPermission
- Checks if the user has permission to subscribe to the subscription entity
and receive notifications about the inferred entity.
- Specified by:
check in interface SubscriptionPermission
- Parameters:
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.
- 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:
SubscriptionPermission.contains(PermissionChecker, String, long, String, long)
contains
public boolean contains(PermissionChecker permissionChecker,
String subscriptionClassName,
long subscriptionClassPK,
String inferredClassName,
long inferredClassPK)
throws PortalException,
SystemException
- Description copied from interface:
SubscriptionPermission
- 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.
- Specified by:
contains in interface SubscriptionPermission
- Parameters:
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 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
hasPermission
protected Boolean hasPermission(PermissionChecker permissionChecker,
String className,
long classPK,
String actionId)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException