|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portal.service.permission.SubscriptionPermissionImpl
public class SubscriptionPermissionImpl
Constructor Summary | |
---|---|
SubscriptionPermissionImpl()
|
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. |
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 |
Constructor Detail |
---|
public SubscriptionPermissionImpl()
Method Detail |
---|
public void check(PermissionChecker permissionChecker, String className, long classPK) throws PortalException, SystemException
check(PermissionChecker,
String, long, String, long)
check
in interface SubscriptionPermission
PortalException
SystemException
public void check(PermissionChecker permissionChecker, String subscriptionClassName, long subscriptionClassPK, String inferredClassName, long inferredClassPK) throws PortalException, SystemException
SubscriptionPermission
check
in interface SubscriptionPermission
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 occurredSubscriptionPermission.contains(PermissionChecker, String, long, String, long)
public boolean contains(PermissionChecker permissionChecker, String className, long classPK) throws PortalException, SystemException
contains(PermissionChecker,
String, long, String, long)
contains
in interface SubscriptionPermission
PortalException
SystemException
public boolean contains(PermissionChecker permissionChecker, String subscriptionClassName, long subscriptionClassPK, String inferredClassName, long inferredClassPK) throws PortalException, SystemException
SubscriptionPermission
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.
contains
in interface SubscriptionPermission
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 occurredprotected Boolean hasPermission(PermissionChecker permissionChecker, String className, long classPK, String actionId) throws PortalException, SystemException
PortalException
SystemException
|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |