public class PrivilegesInfo extends Object
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
PrivilegesInfo.AccessRights
Wrapper class that holds the set of Privileges that are granted 
 and/or denied for a specific principal. 
 | 
| Constructor and Description | 
|---|
PrivilegesInfo()  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
canAddChildren(javax.jcr.Node node)
Checks whether the current user has been granted privileges
 to add children to the specified node. 
 | 
boolean | 
canAddChildren(javax.jcr.Session session,
              String absPath)
Checks whether the current user has been granted privileges
 to add children to the specified path. 
 | 
boolean | 
canDelete(javax.jcr.Node node)
Checks whether the current user has been granted privileges
 to delete the specified node. 
 | 
boolean | 
canDelete(javax.jcr.Session session,
         String absPath)
Checks whether the current user has been granted privileges
 to delete the specified path. 
 | 
boolean | 
canDeleteChildren(javax.jcr.Node node)
Checks whether the current user has been granted privileges
 to delete children to the specified node. 
 | 
boolean | 
canDeleteChildren(javax.jcr.Session session,
                 String absPath)
Checks whether the current user has been granted privileges
 to delete children of the specified path. 
 | 
boolean | 
canModifyAccessControl(javax.jcr.Node node)
Checks whether the current user has been granted privileges
 to modify the access control of the specified node. 
 | 
boolean | 
canModifyAccessControl(javax.jcr.Session session,
                      String absPath)
Checks whether the current user has been granted privileges
 to modify the access control of the specified path. 
 | 
boolean | 
canModifyProperties(javax.jcr.Node node)
Checks whether the current user has been granted privileges
 to modify properties of the specified node. 
 | 
boolean | 
canModifyProperties(javax.jcr.Session session,
                   String absPath)
Checks whether the current user has been granted privileges
 to modify properties of the specified path. 
 | 
boolean | 
canReadAccessControl(javax.jcr.Node node)
Checks whether the current user has been granted privileges
 to read the access control of the specified node. 
 | 
boolean | 
canReadAccessControl(javax.jcr.Session session,
                    String absPath)
Checks whether the current user has been granted privileges
 to read the access control of the specified path. 
 | 
Map<Principal,PrivilegesInfo.AccessRights> | 
getDeclaredAccessRights(javax.jcr.Node node)
Returns the mapping of declared access rights that have been set for the resource at
 the given path. 
 | 
Map<Principal,PrivilegesInfo.AccessRights> | 
getDeclaredAccessRights(javax.jcr.Session session,
                       String absPath)
Returns the mapping of declared access rights that have been set for the resource at
 the given path. 
 | 
PrivilegesInfo.AccessRights | 
getDeclaredAccessRightsForPrincipal(javax.jcr.Node node,
                                   String principalId)
Returns the declared access rights for the specified Node for the given
 principalId. 
 | 
PrivilegesInfo.AccessRights | 
getDeclaredAccessRightsForPrincipal(javax.jcr.Session session,
                                   String absPath,
                                   String principalId)
Returns the declared access rights for the resource at the specified path for the given
 principalId. 
 | 
Map<Principal,PrivilegesInfo.AccessRights> | 
getEffectiveAccessRights(javax.jcr.Node node)
Returns the mapping of effective access rights that have been set for the resource at
 the given path. 
 | 
Map<Principal,PrivilegesInfo.AccessRights> | 
getEffectiveAccessRights(javax.jcr.Session session,
                        String absPath)
Returns the mapping of effective access rights that have been set for the resource at
 the given path. 
 | 
PrivilegesInfo.AccessRights | 
getEffectiveAccessRightsForPrincipal(javax.jcr.Node node,
                                    String principalId)
Returns the effective access rights for the specified Node for the given
 principalId. 
 | 
PrivilegesInfo.AccessRights | 
getEffectiveAccessRightsForPrincipal(javax.jcr.Session session,
                                    String absPath,
                                    String principalId)
Returns the effective access rights for the resource at the specified path for the given
 principalId. 
 | 
javax.jcr.security.Privilege[] | 
getSupportedPrivileges(javax.jcr.Node node)
Return the supported Privileges for the specified node. 
 | 
javax.jcr.security.Privilege[] | 
getSupportedPrivileges(javax.jcr.Session session,
                      String absPath)
Returns the supported privileges for the specified path. 
 | 
public javax.jcr.security.Privilege[] getSupportedPrivileges(javax.jcr.Node node)
                                                      throws javax.jcr.RepositoryException
node - the node to checkjavax.jcr.RepositoryExceptionpublic javax.jcr.security.Privilege[] getSupportedPrivileges(javax.jcr.Session session,
                                                             String absPath)
                                                      throws javax.jcr.RepositoryException
session - the session for the current userabsPath - the path to get the privileges forjavax.jcr.RepositoryExceptionpublic Map<Principal,PrivilegesInfo.AccessRights> getDeclaredAccessRights(javax.jcr.Node node) throws javax.jcr.RepositoryException
node - the node to get the access rights forjavax.jcr.RepositoryExceptionpublic Map<Principal,PrivilegesInfo.AccessRights> getDeclaredAccessRights(javax.jcr.Session session, String absPath) throws javax.jcr.RepositoryException
session - the current user session.absPath - the path of the resource to get the access rights forjavax.jcr.RepositoryExceptionpublic PrivilegesInfo.AccessRights getDeclaredAccessRightsForPrincipal(javax.jcr.Node node, String principalId) throws javax.jcr.RepositoryException
node - the JCR node to retrieve the access rights forprincipalId - the principalId to get the access rights forjavax.jcr.RepositoryExceptionpublic PrivilegesInfo.AccessRights getDeclaredAccessRightsForPrincipal(javax.jcr.Session session, String absPath, String principalId) throws javax.jcr.RepositoryException
session - the current JCR sessionabsPath - the path of the resource to retrieve the rights forprincipalId - the principalId to get the access rights forjavax.jcr.RepositoryExceptionpublic Map<Principal,PrivilegesInfo.AccessRights> getEffectiveAccessRights(javax.jcr.Node node) throws javax.jcr.RepositoryException
node - the node to get the access rights forjavax.jcr.RepositoryExceptionpublic Map<Principal,PrivilegesInfo.AccessRights> getEffectiveAccessRights(javax.jcr.Session session, String absPath) throws javax.jcr.RepositoryException
session - the current user session.absPath - the path of the resource to get the access rights forjavax.jcr.RepositoryExceptionpublic PrivilegesInfo.AccessRights getEffectiveAccessRightsForPrincipal(javax.jcr.Node node, String principalId) throws javax.jcr.RepositoryException
node - the JCR node to retrieve the access rights forprincipalId - the principalId to get the access rights forjavax.jcr.RepositoryExceptionpublic PrivilegesInfo.AccessRights getEffectiveAccessRightsForPrincipal(javax.jcr.Session session, String absPath, String principalId) throws javax.jcr.RepositoryException
session - the current JCR sessionabsPath - the path of the resource to retrieve the rights forprincipalId - the principalId to get the access rights forjavax.jcr.RepositoryExceptionpublic boolean canAddChildren(javax.jcr.Node node)
node - the node to checkpublic boolean canAddChildren(javax.jcr.Session session,
                              String absPath)
session - the JCR session of the current userabsPath - the path of the resource to checkpublic boolean canDeleteChildren(javax.jcr.Node node)
node - the node to checkpublic boolean canDeleteChildren(javax.jcr.Session session,
                                 String absPath)
session - the JCR session of the current userabsPath - the path of the resource to checkpublic boolean canDelete(javax.jcr.Node node)
node - the node to checkpublic boolean canDelete(javax.jcr.Session session,
                         String absPath)
session - the JCR session of the current userabsPath - the path of the resource to checkpublic boolean canModifyProperties(javax.jcr.Node node)
node - the node to checkpublic boolean canModifyProperties(javax.jcr.Session session,
                                   String absPath)
session - the JCR session of the current userabsPath - the path of the resource to checkpublic boolean canReadAccessControl(javax.jcr.Node node)
node - the node to checkpublic boolean canReadAccessControl(javax.jcr.Session session,
                                    String absPath)
session - the JCR session of the current userabsPath - the path of the resource to checkpublic boolean canModifyAccessControl(javax.jcr.Node node)
node - the node to checkpublic boolean canModifyAccessControl(javax.jcr.Session session,
                                      String absPath)
session - the JCR session of the current userabsPath - the path of the resource to checkCopyright © 2015 The Apache Software Foundation. All rights reserved.