Class AuthorizableFolderEditor

  • All Implemented Interfaces:
    org.apache.jackrabbit.oak.spi.commit.Editor

    public class AuthorizableFolderEditor
    extends org.apache.jackrabbit.oak.spi.commit.DefaultEditor
    There are occasions where in old JR2 repositories not all ancestors on the users path are of type rep:AuthorizableFolder, thus leading to exceptions after repository upgrade.
    In order to avoid such situations, this hook verifies that all nodes on the users and groups paths are of type rep:AuthorizableFolder and fixes the node-type if it is incorrect.
    • Field Summary

      • Fields inherited from class org.apache.jackrabbit.oak.spi.commit.DefaultEditor

        INSTANCE
    • Constructor Detail

      • AuthorizableFolderEditor

        public AuthorizableFolderEditor​(org.apache.jackrabbit.oak.spi.state.NodeBuilder builder,
                                        String path,
                                        String groupsPath,
                                        String usersPath)
    • Method Detail

      • provider

        public static org.apache.jackrabbit.oak.spi.commit.EditorProvider provider​(String groupsPath,
                                                                                   String usersPath)
      • propertyAdded

        public void propertyAdded​(org.apache.jackrabbit.oak.api.PropertyState after)
                           throws org.apache.jackrabbit.oak.api.CommitFailedException
        Specified by:
        propertyAdded in interface org.apache.jackrabbit.oak.spi.commit.Editor
        Overrides:
        propertyAdded in class org.apache.jackrabbit.oak.spi.commit.DefaultEditor
        Throws:
        org.apache.jackrabbit.oak.api.CommitFailedException
      • propertyChanged

        public void propertyChanged​(org.apache.jackrabbit.oak.api.PropertyState before,
                                    org.apache.jackrabbit.oak.api.PropertyState after)
                             throws org.apache.jackrabbit.oak.api.CommitFailedException
        Specified by:
        propertyChanged in interface org.apache.jackrabbit.oak.spi.commit.Editor
        Overrides:
        propertyChanged in class org.apache.jackrabbit.oak.spi.commit.DefaultEditor
        Throws:
        org.apache.jackrabbit.oak.api.CommitFailedException
      • childNodeAdded

        public org.apache.jackrabbit.oak.spi.commit.Editor childNodeAdded​(String name,
                                                                          org.apache.jackrabbit.oak.spi.state.NodeState after)
                                                                   throws org.apache.jackrabbit.oak.api.CommitFailedException
        Specified by:
        childNodeAdded in interface org.apache.jackrabbit.oak.spi.commit.Editor
        Overrides:
        childNodeAdded in class org.apache.jackrabbit.oak.spi.commit.DefaultEditor
        Throws:
        org.apache.jackrabbit.oak.api.CommitFailedException
      • childNodeChanged

        public org.apache.jackrabbit.oak.spi.commit.Editor childNodeChanged​(String name,
                                                                            org.apache.jackrabbit.oak.spi.state.NodeState before,
                                                                            org.apache.jackrabbit.oak.spi.state.NodeState after)
                                                                     throws org.apache.jackrabbit.oak.api.CommitFailedException
        Specified by:
        childNodeChanged in interface org.apache.jackrabbit.oak.spi.commit.Editor
        Overrides:
        childNodeChanged in class org.apache.jackrabbit.oak.spi.commit.DefaultEditor
        Throws:
        org.apache.jackrabbit.oak.api.CommitFailedException