Class ACE
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.ACE
-
- All Implemented Interfaces:
AccessControlEntry
,org.apache.jackrabbit.api.security.JackrabbitAccessControlEntry
@ProviderType public abstract class ACE extends java.lang.Object implements org.apache.jackrabbit.api.security.JackrabbitAccessControlEntry
Default implementation of theJackrabbitAccessControlEntry
interface. It asserts that the basic contract is fulfilled but does perform any additional validation on the principal, the privileges or the specified restrictions.
-
-
Constructor Summary
Constructors Constructor Description ACE(@Nullable java.security.Principal principal, @Nullable PrivilegeBits privilegeBits, boolean isAllow, @Nullable java.util.Set<Restriction> restrictions, @NotNull org.apache.jackrabbit.oak.namepath.NamePathMapper namePathMapper)
Creates a new access control entry.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
@NotNull java.security.Principal
getPrincipal()
@NotNull PrivilegeBits
getPrivilegeBits()
protected abstract @NotNull PrivilegeBitsProvider
getPrivilegeBitsProvider()
@NotNull org.apache.jackrabbit.api.security.authorization.PrivilegeCollection
getPrivilegeCollection()
@Nullable Value
getRestriction(@NotNull java.lang.String restrictionName)
@NotNull java.lang.String[]
getRestrictionNames()
@NotNull java.util.Set<Restriction>
getRestrictions()
@Nullable Value[]
getRestrictions(@NotNull java.lang.String restrictionName)
int
hashCode()
boolean
isAllow()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.jcr.security.AccessControlEntry
getPrivileges
-
-
-
-
Constructor Detail
-
ACE
public ACE(@Nullable @Nullable java.security.Principal principal, @Nullable @Nullable PrivilegeBits privilegeBits, boolean isAllow, @Nullable @Nullable java.util.Set<Restriction> restrictions, @NotNull @NotNull org.apache.jackrabbit.oak.namepath.NamePathMapper namePathMapper) throws AccessControlException
Creates a new access control entry.- Parameters:
principal
- The principal associated with this entry.privilegeBits
- The privilege bits defined for this entry.isAllow
-true
if the entry is granting privileges.restrictions
- A optional set of restrictions.namePathMapper
- The name-path mapper- Throws:
AccessControlException
- If the givenprincipal
orprivilegeBits
arenull
or ifprivilegeBits
areempty
.
-
-
Method Detail
-
getPrivilegeBits
@NotNull public @NotNull PrivilegeBits getPrivilegeBits()
-
getRestrictions
@NotNull public @NotNull java.util.Set<Restriction> getRestrictions()
-
getPrivilegeBitsProvider
@NotNull protected abstract @NotNull PrivilegeBitsProvider getPrivilegeBitsProvider()
-
getPrincipal
@NotNull public @NotNull java.security.Principal getPrincipal()
- Specified by:
getPrincipal
in interfaceAccessControlEntry
-
isAllow
public boolean isAllow()
- Specified by:
isAllow
in interfaceorg.apache.jackrabbit.api.security.JackrabbitAccessControlEntry
-
getRestrictionNames
@NotNull public @NotNull java.lang.String[] getRestrictionNames()
- Specified by:
getRestrictionNames
in interfaceorg.apache.jackrabbit.api.security.JackrabbitAccessControlEntry
-
getRestriction
@Nullable public @Nullable Value getRestriction(@NotNull @NotNull java.lang.String restrictionName) throws RepositoryException
- Specified by:
getRestriction
in interfaceorg.apache.jackrabbit.api.security.JackrabbitAccessControlEntry
- Throws:
RepositoryException
-
getRestrictions
@Nullable public @Nullable Value[] getRestrictions(@NotNull @NotNull java.lang.String restrictionName)
- Specified by:
getRestrictions
in interfaceorg.apache.jackrabbit.api.security.JackrabbitAccessControlEntry
-
getPrivilegeCollection
@NotNull public @NotNull org.apache.jackrabbit.api.security.authorization.PrivilegeCollection getPrivilegeCollection()
- Specified by:
getPrivilegeCollection
in interfaceorg.apache.jackrabbit.api.security.JackrabbitAccessControlEntry
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-