public class ImmutableACL extends AbstractAccessControlList
JackrabbitAccessControlList
interface that only
allows for reading. The write methods throw an AccessControlException
.Constructor and Description |
---|
ImmutableACL(java.lang.String oakPath,
java.util.List<? extends JackrabbitAccessControlEntry> entries,
RestrictionProvider restrictionProvider,
NamePathMapper namePathMapper)
Construct a new
UnmodifiableAccessControlList |
Modifier and Type | Method and Description |
---|---|
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. |
boolean |
addEntry(java.security.Principal principal,
Privilege[] privileges,
boolean isAllow,
java.util.Map<java.lang.String,Value> restrictions,
java.util.Map<java.lang.String,Value[]> mvRestrictions)
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. |
boolean |
equals(java.lang.Object obj) |
java.util.List<JackrabbitAccessControlEntry> |
getEntries() |
RestrictionProvider |
getRestrictionProvider() |
int |
hashCode() |
void |
orderBefore(AccessControlEntry srcEntry,
AccessControlEntry destEntry)
If the
AccessControlList implementation supports
reordering of entries the specified srcEntry is inserted
at the position of the specified destEntry . |
void |
removeAccessControlEntry(AccessControlEntry ace) |
addAccessControlEntry, addEntry, getAccessControlEntries, getNamePathMapper, getOakPath, getPath, getRestrictionNames, getRestrictionType, isEmpty, isMultiValueRestriction, size
public ImmutableACL(java.lang.String oakPath, java.util.List<? extends JackrabbitAccessControlEntry> entries, RestrictionProvider restrictionProvider, NamePathMapper namePathMapper)
UnmodifiableAccessControlList
oakPath
- The Oak path of this policy or null
.entries
- The access control entries contained in this policy.restrictionProvider
- The restriction provider.namePathMapper
- The NamePathMapper
used for conversion.public void removeAccessControlEntry(AccessControlEntry ace) throws AccessControlException
AccessControlException
public boolean addEntry(java.security.Principal principal, Privilege[] privileges, boolean isAllow, java.util.Map<java.lang.String,Value> restrictions) throws AccessControlException
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
addEntry
in class AbstractAccessControlList
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.AccessControlException
- If any of the given parameter is invalid
or cannot be handled by the implementation.AccessControlList#addAccessControlEntry(Principal, Privilege[])
public boolean addEntry(java.security.Principal principal, Privilege[] privileges, boolean isAllow, java.util.Map<java.lang.String,Value> restrictions, java.util.Map<java.lang.String,Value[]> mvRestrictions) throws AccessControlException
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.
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.AccessControlException
- If any of the given parameter is invalid
or cannot be handled by the implementation.AccessControlList#addAccessControlEntry(Principal, Privilege[])
public void orderBefore(AccessControlEntry srcEntry, AccessControlEntry destEntry) throws AccessControlException
JackrabbitAccessControlList
AccessControlList
implementation supports
reordering of entries the specified srcEntry
is inserted
at the position of the specified destEntry
.
If destEntry
is null
the entry is moved to the
end of the list.
If srcEntry
and destEntry
are the same no
changes are made.
srcEntry
- The access control entry to be moved within the list.destEntry
- The entry before which the srcEntry
will be moved.AccessControlException
- If any of the given entries is invalid or
cannot be handled by the implementation.public java.util.List<JackrabbitAccessControlEntry> getEntries()
getEntries
in class AbstractAccessControlList
public RestrictionProvider getRestrictionProvider()
getRestrictionProvider
in class AbstractAccessControlList
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"