public abstract class AbstractAccessControlList extends Object implements JackrabbitAccessControlList
JackrabbitAccessControlList
interface.| Constructor and Description |
|---|
AbstractAccessControlList(@Nullable String oakPath,
@NotNull NamePathMapper namePathMapper) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAccessControlEntry(Principal principal,
Privilege[] privileges) |
boolean |
addEntry(@NotNull Principal principal,
@NotNull Privilege[] privileges,
boolean isAllow)
Same as
JackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean, Map) using
some implementation specific restrictions. |
boolean |
addEntry(@NotNull Principal principal,
@NotNull Privilege[] privileges,
boolean isAllow,
@Nullable Map<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 List<? extends JackrabbitAccessControlEntry> |
getEntries() |
@NotNull NamePathMapper |
getNamePathMapper() |
@Nullable String |
getOakPath() |
@Nullable String |
getPath()
Returns the path of the node this policy has been created for.
|
@NotNull 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 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 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 String oakPath,
@NotNull
@NotNull NamePathMapper namePathMapper)
@Nullable public @Nullable String getOakPath()
@NotNull public @NotNull NamePathMapper getNamePathMapper()
@NotNull public abstract @NotNull List<? extends JackrabbitAccessControlEntry> getEntries()
@NotNull public abstract @NotNull RestrictionProvider getRestrictionProvider()
@Nullable public @Nullable String getPath()
JackrabbitAccessControlPolicygetPath in interface JackrabbitAccessControlPolicypublic AccessControlEntry[] getAccessControlEntries()
getAccessControlEntries in interface AccessControlListpublic boolean addAccessControlEntry(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 String[] getRestrictionNames()
JackrabbitAccessControlListgetRestrictionNames in interface JackrabbitAccessControlListJackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean, Map)public int getRestrictionType(@NotNull
@NotNull 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 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 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 Principal principal,
@NotNull
@NotNull Privilege[] privileges,
boolean isAllow,
@Nullable
@Nullable Map<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 - 2020 Adobe. All Rights Reserved