Class PermissionHook

  • All Implemented Interfaces:
    CommitHook, PostValidationHook, AccessControlConstants, PermissionConstants

    public class PermissionHook
    extends java.lang.Object
    implements PostValidationHook, AccessControlConstants, PermissionConstants
    CommitHook implementation that processes any modification made to access control content and updates persisted permission store associated with access control related data stored in the repository.

    The permission entries are grouped by principal and stored below the store root based on the hash value of the access controllable path. hash collisions are handled by adding subnodes accordingly.

              /552423  [rep:PermissionStore]
                  /0     [rep:Permissions]
                  /1     [rep:Permissions]
                  /c0     [rep:PermissionStore]
                      /0      [rep:Permissions]
                      /1      [rep:Permissions]
                      /2      [rep:Permissions]
                  /c1     [rep:PermissionStore]
                      /0      [rep:Permissions]
                      /1      [rep:Permissions]
                      /2      [rep:Permissions]
    • Constructor Detail

      • PermissionHook

        public PermissionHook​(@NotNull
                              @NotNull java.lang.String workspaceName,
                              @NotNull RestrictionProvider restrictionProvider,
                              @NotNull ProviderCtx providerCtx)
    • Method Detail

      • processCommit

        public @NotNull NodeState processCommit​(NodeState before,
                                                NodeState after,
                                                CommitInfo info)
        Description copied from interface: CommitHook
        Validates and/or modifies the given content change before it gets persisted.
        Specified by:
        processCommit in interface CommitHook
        before - content tree before the commit
        after - content tree prepared for the commit
        info - metadata associated with this commit
        content tree to be committed
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object