Class AbstractAccessControlList

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      boolean addAccessControlEntry​(java.security.Principal principal, javax.jcr.security.Privilege[] privileges)  
      boolean addEntry​(@NotNull java.security.Principal principal, @NotNull javax.jcr.security.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 javax.jcr.security.Privilege[] privileges, boolean isAllow, @Nullable java.util.Map<java.lang.String,​javax.jcr.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.
      javax.jcr.security.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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.jcr.security.AccessControlList

        removeAccessControlEntry
    • Constructor Detail

      • AbstractAccessControlList

        public AbstractAccessControlList​(@Nullable
                                         @Nullable java.lang.String oakPath,
                                         @NotNull
                                         @NotNull NamePathMapper namePathMapper)
    • Method Detail

      • getOakPath

        @Nullable
        public @Nullable java.lang.String getOakPath()
      • getNamePathMapper

        @NotNull
        public @NotNull NamePathMapper getNamePathMapper()
      • getRestrictionProvider

        @NotNull
        public abstract @NotNull RestrictionProvider getRestrictionProvider()
      • getPath

        @Nullable
        public @Nullable java.lang.String getPath()
        Description copied from interface: JackrabbitAccessControlPolicy
        Returns the path of the node this policy has been created for.
        Specified by:
        getPath in interface JackrabbitAccessControlPolicy
        Returns:
        the path of the node this policy has been created for.
      • getAccessControlEntries

        public javax.jcr.security.AccessControlEntry[] getAccessControlEntries()
        Specified by:
        getAccessControlEntries in interface javax.jcr.security.AccessControlList
      • addAccessControlEntry

        public boolean addAccessControlEntry​(java.security.Principal principal,
                                             javax.jcr.security.Privilege[] privileges)
                                      throws javax.jcr.RepositoryException
        Specified by:
        addAccessControlEntry in interface javax.jcr.security.AccessControlList
        Throws:
        javax.jcr.RepositoryException
      • addEntry

        public boolean addEntry​(@NotNull
                                @NotNull java.security.Principal principal,
                                @NotNull
                                @NotNull javax.jcr.security.Privilege[] privileges,
                                boolean isAllow)
                         throws javax.jcr.RepositoryException
        Description copied from interface: JackrabbitAccessControlList
        Same as JackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean, Map) using some implementation specific restrictions.
        Specified by:
        addEntry in interface JackrabbitAccessControlList
        Parameters:
        principal - the principal to add the entry for
        privileges - the privileges to add
        isAllow - if true if this is a positive (allow) entry
        Returns:
        true if this policy has changed by incorporating the given entry; false otherwise.
        Throws:
        javax.jcr.security.AccessControlException - If any of the given parameter is invalid or cannot be handled by the implementation.
        javax.jcr.RepositoryException - If another error occurs.
        See Also:
        AccessControlList.addAccessControlEntry(Principal, Privilege[])
      • addEntry

        public boolean addEntry​(@NotNull
                                @NotNull java.security.Principal principal,
                                @NotNull
                                @NotNull javax.jcr.security.Privilege[] privileges,
                                boolean isAllow,
                                @Nullable
                                @Nullable java.util.Map<java.lang.String,​javax.jcr.Value> restrictions)
                         throws javax.jcr.RepositoryException
        Description copied from interface: JackrabbitAccessControlList
        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.

        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.

        Specified by:
        addEntry in interface JackrabbitAccessControlList
        Parameters:
        principal - the principal to add the entry for
        privileges - the privileges to add
        isAllow - if true if this is a positive (allow) entry
        restrictions - 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.
        Returns:
        true if this policy has changed by incorporating the given entry; false otherwise.
        Throws:
        javax.jcr.security.AccessControlException - If any of the given parameter is invalid or cannot be handled by the implementation.
        javax.jcr.RepositoryException - If another error occurs.
        See Also:
        AccessControlList.addAccessControlEntry(Principal, Privilege[])