|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
---|
void check(PermissionChecker permissionChecker, String className, long classPK) throws PortalException, SystemException
check(PermissionChecker,
String, long, String, long)
PortalException
SystemException
void check(PermissionChecker permissionChecker, String subscriptionClassName, long subscriptionClassPK, 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 occurred
SystemException
- if a system exception occurredcontains(PermissionChecker, String, long, String, long)
boolean contains(PermissionChecker permissionChecker, String className, long classPK) throws PortalException, SystemException
contains(PermissionChecker,
String, long, String, long)
PortalException
SystemException
boolean contains(PermissionChecker permissionChecker, String subscriptionClassName, long subscriptionClassPK, 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 entity
true
if the user has permission to subscribe to the
subscribed entity and receive notifications about the inferred
entity; false
otherwise
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 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |