Package org.apache.jackrabbit.oak.plugins.nodetype

Examples of org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager


        Tree parent = propertyLocation.getParent().getTree();
        if (parent == null) {
            log.debug("Unable to determine definition of authorizable property at " + propertyLocation.getPath());
            return null;
        }
        ReadOnlyNodeTypeManager nodeTypeManager = authorizable.getUserManager().getNodeTypeManager();
        PropertyDefinition def = nodeTypeManager.getDefinition(parent, property, true);
        if (def.isProtected() || (authorizablePath.equals(parent.getPath())
                && !def.getDeclaringNodeType().isNodeType(UserConstants.NT_REP_AUTHORIZABLE))) {
            return null;
        } // else: non-protected property somewhere in the subtree of the user tree.
View Full Code Here


        return property;
    }

    private void checkProtectedProperty(Tree parent, PropertyState property) throws RepositoryException {
        ReadOnlyNodeTypeManager nodeTypeManager = authorizable.getUserManager().getNodeTypeManager();
        PropertyDefinition def = nodeTypeManager.getDefinition(parent, property, false);
        if (def.isProtected()) {
            throw new ConstraintViolationException(
                    "Attempt to set an protected property " + property.getName());
        }
    }
View Full Code Here

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

        Root root = new ImmutableRoot(before);
        Map<String, Privilege> privileges = getPrivileges(root);
        PrivilegeBitsProvider privilegeBitsProvider = new PrivilegeBitsProvider(root);
        ReadOnlyNodeTypeManager ntMgr = ReadOnlyNodeTypeManager.getInstance(before);

        return new AccessControlValidator(rootBefore, rootAfter, privileges, privilegeBitsProvider, restrictionProvider, ntMgr);
    }
View Full Code Here

        Tree parent = propertyLocation.getParent().getTree();
        if (parent == null) {
            log.debug("Unable to determine definition of authorizable property at " + propertyLocation.getPath());
            return null;
        }
        ReadOnlyNodeTypeManager nodeTypeManager = authorizable.getUserManager().getNodeTypeManager();
        PropertyDefinition def = nodeTypeManager.getDefinition(parent, property, true);
        if (def.isProtected() || (authorizablePath.equals(parent.getPath())
                && !def.getDeclaringNodeType().isNodeType(UserConstants.NT_REP_AUTHORIZABLE))) {
            return null;
        } // else: non-protected property somewhere in the subtree of the user tree.
View Full Code Here

        return property;
    }

    private void checkProtectedProperty(Tree parent, PropertyState property) throws RepositoryException {
        ReadOnlyNodeTypeManager nodeTypeManager = authorizable.getUserManager().getNodeTypeManager();
        PropertyDefinition def = nodeTypeManager.getDefinition(parent, property, false);
        if (def.isProtected()) {
            throw new ConstraintViolationException(
                    "Attempt to set an protected property " + property.getName());
        }
    }
View Full Code Here

        Tree rootAfter = new ImmutableTree(after);

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

        Map<String, Privilege> privileges = getPrivileges(before);
        ReadOnlyNodeTypeManager ntMgr = ReadOnlyNodeTypeManager.getInstance(before);

        return new AccessControlValidator(rootBefore, rootAfter, privileges, restrictionProvider, ntMgr);
    }
View Full Code Here

    private static Iterable<ListenerSpec> getListenerSpecs(NodeState after) {
        NodeState listeners = after.getChildNode(JCR_SYSTEM)
                .getChildNode(REP_OBSERVATION)
                .getChildNode(LISTENERS);

        ReadOnlyNodeTypeManager ntMgr = ReadOnlyNodeTypeManager.getInstance(after);
        Set<ListenerSpec> specs = Sets.newHashSet();
        for (ChildNodeEntry listener : listeners.getChildNodeEntries()) {
            ListenerSpec spec = ListenerSpec.create(ntMgr, listener.getName(), listener.getNodeState());
            if (spec != null) {
                specs.add(spec);
View Full Code Here

        Tree parent = propertyLocation.getParent().getTree();
        if (parent == null) {
            log.debug("Unable to determine definition of authorizable property at " + propertyLocation.getPath());
            return null;
        }
        ReadOnlyNodeTypeManager nodeTypeManager = authorizable.getUserManager().getNodeTypeManager();
        PropertyDefinition def = nodeTypeManager.getDefinition(parent, property, true);
        if (def.isProtected() || (authorizablePath.equals(parent.getPath())
                && !def.getDeclaringNodeType().isNodeType(UserConstants.NT_REP_AUTHORIZABLE))) {
            return null;
        } // else: non-protected property somewhere in the subtree of the user tree.
View Full Code Here

        return property;
    }

    private void checkProtectedProperty(Tree parent, PropertyState property) throws RepositoryException {
        ReadOnlyNodeTypeManager nodeTypeManager = authorizable.getUserManager().getNodeTypeManager();
        PropertyDefinition def = nodeTypeManager.getDefinition(parent, property, false);
        if (def.isProtected()) {
            throw new ConstraintViolationException(
                    "Attempt to set an protected property " + property.getName());
        }
    }
View Full Code Here

        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);
        ReadOnlyNodeTypeManager ntMgr = ReadOnlyNodeTypeManager.getInstance(before);

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

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager

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.