Copyright© 2008-2022 Sitevision AB, all rights reserved.
public interface RoleAssignment
A role assignment instance is a representation of a sv:role and a
principal (sv:user, sv:simpleUser, sv:userGroup or sv:virtualGroup)
that can be applied to various nodes using the apply(Node) method.
An instance of the Sitevision class implementing this interface can be obtained via RoleAssignmentBuilder.build().
See RoleAssignmentBuilder for how to obtain an instance of the RoleAssignmentBuilder interface.
| Modifier and Type | Method and Description |
|---|---|
void |
apply(Node aNode)
Applies this role assignment on a given node.
|
boolean |
isApplicable(Node aNode)
Whether or not current user is allowed to
apply(Node) or revoke(Node) this role assignment for a given node. |
boolean |
isApplied(Node aNode)
Whether or not a given node already has this role assignment applied.
|
void |
revoke(Node aNode)
Revokes this role assignment on a given node.
|
void apply(Node aNode) throws ConstraintViolationException, RepositoryException
aNode - the node of the role assignment operation, typically a sv:pageConstraintViolationException - if current user doesn't have permission to do the role assignment on aNodeRepositoryException - if something else goes wrong (e.g. mutation might fail if no lock can be acquired for aNode)isApplicable(Node)boolean isApplicable(Node aNode)
apply(Node) or revoke(Node) this role assignment for a given node.
Permission note! Current user must have PermissionUtil.Permission.MANAGE_RIGHTS on aNode
and current user must also have the role (that this role assignment contains) on aNode.
aNode - the node of the role assignment operation, typically a sv:pageboolean isApplied(Node aNode)
Note! If this method returns true, there is no need to execute apply(Node).
aNode - the node of the role assignment operation, typically a sv:pagevoid revoke(Node aNode) throws ConstraintViolationException, RepositoryException
aNode - the node of the revoke operation, typically a sv:pageConstraintViolationException - if current user doesn't have permission to revoke the role assignment on aNodeRepositoryException - if something else goes wrong (e.g. mutation might fail if no lock can be acquired for aNode)isApplicable(Node)Sitevision - Portal and Content Management Made Easy
Sitevision is an advanced Java enterprise portal product and a portlet container (JSR 286) that implements Java Content Repository (JSR 283).
Copyright© 2008-2022 Sitevision AB, all rights reserved.