public class JCRPrivilegesInfo extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JCRPrivilegesInfo.AccessRights
Wrapper class that holds the set of Privileges that are granted
and/or denied for a specific principal.
|
| Constructor and Description |
|---|
JCRPrivilegesInfo() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canAddChildren(String user,
String absPath)
Checks whether the current user has been granted privileges
to add children to the specified path.
|
static boolean |
canDelete(String owner,
String currentUser,
String absPath,
boolean root)
Checks whether the current user has been granted privileges
to delete the specified path.
|
static boolean |
canDeleteChildren(String user,
String absPath)
Checks whether the current user has been granted privileges
to delete children of the specified path.
|
static boolean |
canModifyProperties(String owner,
String currentUser,
String absPath,
boolean root)
Checks whether the current user has been granted privileges
to modify properties of the specified path.
|
Map<Principal,JCRPrivilegesInfo.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,JCRPrivilegesInfo.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.
|
JCRPrivilegesInfo.AccessRights |
getDeclaredAccessRightsForPrincipal(javax.jcr.Node node,
String principalId)
Returns the declared access rights for the specified Node for the given
principalId.
|
JCRPrivilegesInfo.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,JCRPrivilegesInfo.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,JCRPrivilegesInfo.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.
|
JCRPrivilegesInfo.AccessRights |
getEffectiveAccessRightsForPrincipal(javax.jcr.Node node,
String principalId)
Returns the effective access rights for the specified Node for the given
principalId.
|
JCRPrivilegesInfo.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,JCRPrivilegesInfo.AccessRights> getDeclaredAccessRights(javax.jcr.Node node) throws javax.jcr.RepositoryException
node - the node to get the access rights forjavax.jcr.RepositoryExceptionpublic Map<Principal,JCRPrivilegesInfo.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 JCRPrivilegesInfo.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 JCRPrivilegesInfo.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,JCRPrivilegesInfo.AccessRights> getEffectiveAccessRights(javax.jcr.Node node) throws javax.jcr.RepositoryException
node - the node to get the access rights forjavax.jcr.RepositoryExceptionpublic Map<Principal,JCRPrivilegesInfo.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 JCRPrivilegesInfo.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 JCRPrivilegesInfo.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 static boolean canAddChildren(String user, String absPath) throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
session - the JCR session of the current userabsPath - the path of the resource to checkorg.gcube.common.homelibrary.home.exceptions.InternalErrorExceptionpublic static boolean canDeleteChildren(String user, String absPath) throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
session - the JCR session of the current userabsPath - the path of the resource to checkorg.gcube.common.homelibrary.home.exceptions.InternalErrorExceptionpublic static boolean canDelete(String owner, String currentUser, String absPath, boolean root) throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
session - the JCR session of the current userabsPath - the path of the resource to checkstring - org.gcube.common.homelibrary.home.exceptions.InternalErrorExceptionpublic static boolean canModifyProperties(String owner, String currentUser, String absPath, boolean root) throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
user - the JCR session of the current userabsPath - the path of the resource to checkorg.gcube.common.homelibrary.home.exceptions.InternalErrorExceptionCopyright © 2014. All Rights Reserved.