public abstract class AbstractAccessControlList extends java.lang.Object implements JackrabbitAccessControlList
JackrabbitAccessControlList
interface.Constructor and Description |
---|
AbstractAccessControlList(java.lang.String oakPath,
NamePathMapper namePathMapper) |
Modifier and Type | Method and Description |
---|---|
boolean |
addAccessControlEntry(java.security.Principal principal,
Privilege[] privileges) |
boolean |
addEntry(java.security.Principal principal,
Privilege[] privileges,
boolean isAllow)
Same as
JackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean, Map) using
some implementation specific restrictions. |
boolean |
addEntry(java.security.Principal principal,
Privilege[] privileges,
boolean isAllow,
java.util.Map<java.lang.String,Value> restrictions)
Adds an access control entry to this policy consisting of the specified
principal , the specified privileges , the
isAllow flag and an optional map containing additional
restrictions. |
AccessControlEntry[] |
getAccessControlEntries() |
abstract java.util.List<? extends JackrabbitAccessControlEntry> |
getEntries() |
NamePathMapper |
getNamePathMapper() |
java.lang.String |
getOakPath() |
java.lang.String |
getPath()
Returns the path of the node this policy has been created for.
|
java.lang.String[] |
getRestrictionNames()
Returns the names of the supported restrictions or an empty array
if no restrictions are respected.
|
abstract RestrictionProvider |
getRestrictionProvider() |
int |
getRestrictionType(java.lang.String restrictionName)
Return the expected
property type of the
restriction with the specified restrictionName . |
boolean |
isEmpty()
Returns
true if this policy does not yet define any
entries. |
boolean |
isMultiValueRestriction(java.lang.String restrictionName)
Returns
true if the restriction is multivalued; false
otherwise. |
int |
size()
Returns the number of entries or 0 if the policy
is empty . |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addEntry, orderBefore
public AbstractAccessControlList(java.lang.String oakPath, NamePathMapper namePathMapper)
public java.lang.String getOakPath()
public NamePathMapper getNamePathMapper()
public abstract java.util.List<? extends JackrabbitAccessControlEntry> getEntries()
public abstract RestrictionProvider getRestrictionProvider()
public java.lang.String getPath()
JackrabbitAccessControlPolicy
getPath
in interface JackrabbitAccessControlPolicy
public AccessControlEntry[] getAccessControlEntries() throws RepositoryException
RepositoryException
public boolean addAccessControlEntry(java.security.Principal principal, Privilege[] privileges) throws RepositoryException
RepositoryException
public boolean isEmpty()
JackrabbitAccessControlList
true
if this policy does not yet define any
entries.isEmpty
in interface JackrabbitAccessControlList
public int size()
JackrabbitAccessControlList
is empty
.size
in interface JackrabbitAccessControlList
is empty
.public java.lang.String[] getRestrictionNames() throws RepositoryException
JackrabbitAccessControlList
getRestrictionNames
in interface JackrabbitAccessControlList
RepositoryException
- If an error occurs.JackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean, Map)
public int getRestrictionType(java.lang.String restrictionName) throws RepositoryException
JackrabbitAccessControlList
property type
of the
restriction with the specified restrictionName
.getRestrictionType
in interface JackrabbitAccessControlList
restrictionName
- Any of the restriction names retrieved from
JackrabbitAccessControlList.getRestrictionNames()
.property type
.RepositoryException
- If an error occurs.public boolean isMultiValueRestriction(java.lang.String restrictionName) throws RepositoryException
JackrabbitAccessControlList
true
if the restriction is multivalued; false
otherwise. If an given implementation doesn't support multivalued restrictions,
this method always returns false
.isMultiValueRestriction
in interface JackrabbitAccessControlList
restrictionName
- Any of the restriction names retrieved from
JackrabbitAccessControlList.getRestrictionNames()
.true
if the restriction is multivalued; false
if the restriction with the given name is single value or if the implementation
doesn't support multivalued restrictions, this method always returns false
.RepositoryException
- If an error occurs.JackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean, Map, Map)
public boolean addEntry(java.security.Principal principal, Privilege[] privileges, boolean isAllow) throws RepositoryException
JackrabbitAccessControlList
JackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean, Map)
using
some implementation specific restrictions.addEntry
in interface JackrabbitAccessControlList
principal
- the principal to add the entry forprivileges
- the privileges to addisAllow
- if true
if this is a positive (allow) entryRepositoryException
- If another error occurs.AccessControlList#addAccessControlEntry(Principal, Privilege[])
public boolean addEntry(java.security.Principal principal, Privilege[] privileges, boolean isAllow, java.util.Map<java.lang.String,Value> restrictions) throws RepositoryException
JackrabbitAccessControlList
principal
, the specified privileges
, the
isAllow
flag and an optional map containing additional
restrictions.
This method returns true
if this policy was modified,
false
otherwise.
An AccessControlException
is thrown if any of the specified
parameters is invalid or if some other access control related exception occurs.
addEntry
in interface JackrabbitAccessControlList
principal
- the principal to add the entry forprivileges
- the privileges to addisAllow
- if true
if this is a positive (allow) entryrestrictions
- A map of additional restrictions used to narrow the
effect of the entry to be created. The map must map JCR names to a single
javax.jcr.Value
object.RepositoryException
- If another error occurs.AccessControlList#addAccessControlEntry(Principal, Privilege[])
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"