public interface JackrabbitAccessControlList extends JackrabbitAccessControlPolicy
JackrabbitAccessControlList
is an extension of the AccessControlList
.
Similar to the latter any modifications made will not take effect, until it is
written back
and saved
.Modifier and Type | Method and Description |
---|---|
boolean |
addEntry(java.security.Principal principal,
Privilege[] privileges,
boolean isAllow)
Same as
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. |
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. |
java.lang.String[] |
getRestrictionNames()
Returns the names of the supported restrictions or an empty array
if no restrictions are respected.
|
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. |
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 . |
int |
size()
Returns the number of entries or 0 if the policy
is empty . |
getPath
java.lang.String[] getRestrictionNames() throws RepositoryException
RepositoryException
- If an error occurs.addEntry(Principal, Privilege[], boolean, Map)
int getRestrictionType(java.lang.String restrictionName) throws RepositoryException
property type
of the
restriction with the specified restrictionName
.restrictionName
- Any of the restriction names retrieved from
getRestrictionNames()
.property type
.RepositoryException
- If an error occurs.boolean isMultiValueRestriction(java.lang.String restrictionName) throws RepositoryException
true
if the restriction is multivalued; false
otherwise. If an given implementation doesn't support multivalued restrictions,
this method always returns false
.restrictionName
- Any of the restriction names retrieved from
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.addEntry(Principal, Privilege[], boolean, Map, Map)
boolean isEmpty()
true
if this policy does not yet define any
entries.int size()
is empty
.is empty
.boolean addEntry(java.security.Principal principal, Privilege[] privileges, boolean isAllow) throws AccessControlException, RepositoryException
addEntry(Principal, Privilege[], boolean, Map)
using
some implementation specific restrictions.principal
- the principal to add the entry forprivileges
- the privileges to addisAllow
- if true
if this is a positive (allow) entryAccessControlException
- If any of the given parameter is invalid
or cannot be handled by the implementation.RepositoryException
- If another error occurs.AccessControlList#addAccessControlEntry(Principal, Privilege[])
boolean addEntry(java.security.Principal principal, Privilege[] privileges, boolean isAllow, java.util.Map<java.lang.String,Value> restrictions) throws AccessControlException, RepositoryException
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.RepositoryException
- If another error occurs.AccessControlList#addAccessControlEntry(Principal, Privilege[])
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, RepositoryException
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.restrictions
- A map of additional multivalued restrictions used to narrow the
effect of the entry to be created. The map must map JCR names to a
javax.jcr.Value
array.AccessControlException
- If any of the given parameter is invalid
or cannot be handled by the implementation.RepositoryException
- If another error occurs.AccessControlList#addAccessControlEntry(Principal, Privilege[])
void orderBefore(AccessControlEntry srcEntry, AccessControlEntry destEntry) throws AccessControlException, UnsupportedRepositoryOperationException, RepositoryException
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.UnsupportedRepositoryOperationException
- If ordering is not supported.RepositoryException
- If another error occurs."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"