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 Object implements org.apache.jackrabbit.api.security.JackrabbitAccessControlEntry
Default implementation of the JackrabbitAccessControlEntry 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 Details

    • ACE

      public ACE(@Nullable @Nullable Principal principal, @Nullable @Nullable PrivilegeBits privilegeBits, boolean isAllow, @Nullable @Nullable 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 given principal or privilegeBits are null or if privilegeBits are empty.
  • Method Details

    • getPrivilegeBits

      @NotNull public @NotNull PrivilegeBits getPrivilegeBits()
    • getRestrictions

      @NotNull public @NotNull Set<Restriction> getRestrictions()
    • getPrivilegeBitsProvider

      @NotNull protected abstract @NotNull PrivilegeBitsProvider getPrivilegeBitsProvider()
    • getPrincipal

      @NotNull public @NotNull Principal getPrincipal()
      Specified by:
      getPrincipal in interface AccessControlEntry
    • isAllow

      public boolean isAllow()
      Specified by:
      isAllow in interface org.apache.jackrabbit.api.security.JackrabbitAccessControlEntry
    • getRestrictionNames

      @NotNull public @NotNull String[] getRestrictionNames()
      Specified by:
      getRestrictionNames in interface org.apache.jackrabbit.api.security.JackrabbitAccessControlEntry
    • getRestriction

      @Nullable public @Nullable Value getRestriction(@NotNull @NotNull String restrictionName) throws RepositoryException
      Specified by:
      getRestriction in interface org.apache.jackrabbit.api.security.JackrabbitAccessControlEntry
      Throws:
      RepositoryException
    • getRestrictions

      @Nullable public @Nullable Value[] getRestrictions(@NotNull @NotNull String restrictionName)
      Specified by:
      getRestrictions in interface org.apache.jackrabbit.api.security.JackrabbitAccessControlEntry
    • getPrivilegeCollection

      @NotNull public @NotNull org.apache.jackrabbit.api.security.authorization.PrivilegeCollection getPrivilegeCollection()
      Specified by:
      getPrivilegeCollection in interface org.apache.jackrabbit.api.security.JackrabbitAccessControlEntry
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object