Package org.apache.jackrabbit.oak.core

Examples of org.apache.jackrabbit.oak.core.ImmutableRoot


    private static ImmutableRoot getImmutableRoot(@Nonnull Root base, @Nonnull SecurityConfiguration acConfig) {
        if (base instanceof ImmutableRoot) {
            return (ImmutableRoot) base;
        } else {
            return new ImmutableRoot(base, new TreeTypeProviderImpl(acConfig.getContext()));
        }
    }
View Full Code Here


    @Override
    public NodeState processCommit(final NodeState before, NodeState after) throws CommitFailedException {
        NodeBuilder rootAfter = after.builder();

        permissionRoot = getPermissionRoot(rootAfter);
        bitsProvider = new PrivilegeBitsProvider(new ImmutableRoot(before));

        isACL = new TypePredicate(after, NT_REP_ACL);
        isACE = new TypePredicate(after, NT_REP_ACE);
        isGrantACE = new TypePredicate(after, NT_REP_GRANT_ACE);
View Full Code Here

    }

    @Nonnull
    @Override
    protected Root getWorkspaceRoot() {
        return new ImmutableRoot(workspaceRoot.getNodeState());
    }
View Full Code Here

    //--------------------------------------------------< ValidatorProvider >---
    @Nonnull
    @Override
    public Validator getRootValidator(NodeState before, NodeState after) {
        membershipProvider = new MembershipProvider(new ImmutableRoot(after), config);
        return new UserValidator(new ImmutableTree(before), new ImmutableTree(after), this);
    }
View Full Code Here

    @Override
    public Validator getRootValidator(NodeState before, NodeState after) {
        TreeTypeProvider tp =
                new TreeTypeProviderImpl(getAccessControlContext());
        PermissionProvider pp = acConfig.getPermissionProvider(
                new ImmutableRoot(before), workspaceName, principals);

        if (moveTracker.isEmpty()) {
            return new PermissionValidator(before, after, tp, pp, this);
        } else {
            return new MoveAwarePermissionValidator(before, after, tp, pp, this, moveTracker);
View Full Code Here

        return new SubtreeValidator(new PrivilegeValidator(createRoot(before), createRoot(after)),
                JCR_SYSTEM, REP_PRIVILEGES);
    }

    private Root createRoot(NodeState nodeState) {
        return new ImmutableRoot(nodeState);
    }
View Full Code Here

        }
        previousRoot = root;
    }

    private static ImmutableTree getTree(NodeState nodeState, String path) {
        return new ImmutableRoot(nodeState).getTree(path);
    }
View Full Code Here

        private MoveContext(@Nonnull MoveTracker moveTracker,
                            @Nonnull NodeState before,
                            @Nonnull NodeState after) {
            this.moveTracker = moveTracker;
            rootBefore = new ImmutableRoot(before);
            rootAfter = new ImmutableRoot(after);
        }
View Full Code Here

    private static ImmutableRoot getImmutableRoot(@Nonnull Root base, @Nonnull SecurityConfiguration acConfig) {
        if (base instanceof ImmutableRoot) {
            return (ImmutableRoot) base;
        } else {
            return new ImmutableRoot(base, new TreeTypeProviderImpl(acConfig.getContext()));
        }
    }
View Full Code Here

    public Validator getRootValidator(NodeState before, NodeState after) {
        ImmutableTree rootAfter = new ImmutableTree(after);

        RestrictionProvider restrictionProvider = getConfig(AuthorizationConfiguration.class).getRestrictionProvider();

        Root root = new ImmutableRoot(before);
        PrivilegeManager privilegeManager = getConfig(PrivilegeConfiguration.class).getPrivilegeManager(root, NamePathMapper.DEFAULT);
        PrivilegeBitsProvider privilegeBitsProvider = new PrivilegeBitsProvider(root);

        return new AccessControlValidator(rootAfter, privilegeManager, privilegeBitsProvider, restrictionProvider);
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.core.ImmutableRoot

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.