public abstract class PrivilegesHelper extends Object
Modifier and Type | Method and Description |
---|---|
static Map<javax.jcr.security.Privilege,Set<javax.jcr.security.Privilege>> |
buildPrivilegeToAncestorMap(javax.jcr.Session jcrSession,
String resourcePath)
Builds a map of aggregate privileges to privileges they aggregate
|
static void |
mergePrivilegeSets(javax.jcr.security.Privilege privilege,
Map<javax.jcr.security.Privilege,Set<javax.jcr.security.Privilege>> privilegeToAncestorMap,
Set<javax.jcr.security.Privilege> add,
Set<javax.jcr.security.Privilege> remove)
Update the granted and denied privilege sets by merging the result of adding
the supplied privilege.
|
public static Map<javax.jcr.security.Privilege,Set<javax.jcr.security.Privilege>> buildPrivilegeToAncestorMap(javax.jcr.Session jcrSession, String resourcePath) throws javax.jcr.RepositoryException
jcrSession
- a JCR sessionresourcePath
- the path used to look up the supported privilegesnull
javax.jcr.RepositoryException
- error accessing the repositorypublic static void mergePrivilegeSets(javax.jcr.security.Privilege privilege, Map<javax.jcr.security.Privilege,Set<javax.jcr.security.Privilege>> privilegeToAncestorMap, Set<javax.jcr.security.Privilege> add, Set<javax.jcr.security.Privilege> remove)
privilege
- the privilege to mergeprivilegeToAncestorMap
- mapping created using buildPrivilegeToAncestorMap(Session, String)add
- the first set to which the privilege should be added if missingremove
- the second set from which the privilege should be removed if presentCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.