Class 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 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 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 given principal or privilegeBits are null or if privilegeBits are empty.
    • Method Detail

      • getPrivilegeBits

        @NotNull
        public @NotNull PrivilegeBits getPrivilegeBits()
      • getRestrictions

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

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

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

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

        @Nullable
        public @Nullable Value getRestriction​(@NotNull
                                              @NotNull java.lang.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 java.lang.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 java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object