public abstract class AbstractAccessControlList extends java.lang.Object implements JackrabbitAccessControlList
JackrabbitAccessControlList
interface.| Constructor and Description |
|---|
AbstractAccessControlList(@Nullable java.lang.String oakPath,
@NotNull NamePathMapper namePathMapper) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAccessControlEntry(java.security.Principal principal,
Privilege[] privileges) |
boolean |
addEntry(@NotNull java.security.Principal principal,
@NotNull Privilege[] privileges,
boolean isAllow)
Same as
JackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean, Map) using
some implementation specific restrictions. |
boolean |
addEntry(@NotNull java.security.Principal principal,
@NotNull Privilege[] privileges,
boolean isAllow,
@Nullable 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 @NotNull java.util.List<? extends JackrabbitAccessControlEntry> |
getEntries() |
@NotNull NamePathMapper |
getNamePathMapper() |
@Nullable java.lang.String |
getOakPath() |
@Nullable java.lang.String |
getPath()
Returns the path of the node this policy has been created for.
|
@NotNull java.lang.String[] |
getRestrictionNames()
Returns the names of the supported restrictions or an empty array
if no restrictions are respected.
|
abstract @NotNull RestrictionProvider |
getRestrictionProvider() |
int |
getRestrictionType(@NotNull 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(@NotNull 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, waitaddEntry, orderBeforeremoveAccessControlEntrypublic AbstractAccessControlList(@Nullable
@Nullable java.lang.String oakPath,
@NotNull
@NotNull NamePathMapper namePathMapper)
@Nullable public @Nullable java.lang.String getOakPath()
@NotNull public @NotNull NamePathMapper getNamePathMapper()
@NotNull public abstract @NotNull java.util.List<? extends JackrabbitAccessControlEntry> getEntries()
@NotNull public abstract @NotNull RestrictionProvider getRestrictionProvider()
@Nullable public @Nullable java.lang.String getPath()
JackrabbitAccessControlPolicygetPath in interface JackrabbitAccessControlPolicypublic AccessControlEntry[] getAccessControlEntries()
getAccessControlEntries in interface AccessControlListpublic boolean addAccessControlEntry(java.security.Principal principal,
Privilege[] privileges)
throws RepositoryException
addAccessControlEntry in interface AccessControlListRepositoryExceptionpublic boolean isEmpty()
JackrabbitAccessControlListtrue if this policy does not yet define any
entries.isEmpty in interface JackrabbitAccessControlListpublic int size()
JackrabbitAccessControlListis empty.size in interface JackrabbitAccessControlListis empty.@NotNull public @NotNull java.lang.String[] getRestrictionNames()
JackrabbitAccessControlListgetRestrictionNames in interface JackrabbitAccessControlListJackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean, Map)public int getRestrictionType(@NotNull
@NotNull java.lang.String restrictionName)
JackrabbitAccessControlListproperty type of the
restriction with the specified restrictionName.getRestrictionType in interface JackrabbitAccessControlListrestrictionName - Any of the restriction names retrieved from
JackrabbitAccessControlList.getRestrictionNames().property type.public boolean isMultiValueRestriction(@NotNull
@NotNull java.lang.String restrictionName)
JackrabbitAccessControlListtrue if the restriction is multivalued; false
otherwise. If an given implementation doesn't support multivalued restrictions,
this method always returns false.isMultiValueRestriction in interface JackrabbitAccessControlListrestrictionName - 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.JackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean, Map, Map)public boolean addEntry(@NotNull
@NotNull java.security.Principal principal,
@NotNull
@NotNull Privilege[] privileges,
boolean isAllow)
throws RepositoryException
JackrabbitAccessControlListJackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean, Map) using
some implementation specific restrictions.addEntry in interface JackrabbitAccessControlListprincipal - 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[])public boolean addEntry(@NotNull
@NotNull java.security.Principal principal,
@NotNull
@NotNull Privilege[] privileges,
boolean isAllow,
@Nullable
@Nullable java.util.Map<java.lang.String,Value> restrictions)
throws RepositoryException
JackrabbitAccessControlListprincipal, 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 JackrabbitAccessControlListprincipal - 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
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[])Copyright © 2010 - 2022 Adobe. All Rights Reserved