Package org.apache.jackrabbit.core

Examples of org.apache.jackrabbit.core.NodeImpl.addMixin()


     * @throws RepositoryException if an error occurs
     */
    private NodeImpl createRepoAclNode() throws RepositoryException {
        NodeImpl root = (NodeImpl) session.getRootNode();
        if (!root.isNodeType(NT_REP_REPO_ACCESS_CONTROLLABLE)) {
            root.addMixin(NT_REP_REPO_ACCESS_CONTROLLABLE);
        }
        return addNode(root, N_REPO_POLICY, NT_REP_ACL);
    }

    /**
 
View Full Code Here


        UUID uuid = (id == null) ? null : id.getUUID();
        node = parent.addNode(nodeName, nodeTypeName, uuid);
        // add mixins
        if (mixinNames != null) {
            for (int i = 0; i < mixinNames.length; i++) {
                node.addMixin(mixinNames[i]);
            }
        }
        return node;
    }
View Full Code Here

     * @throws RepositoryException
     */
    private NodeImpl createAclNode(String nodePath) throws RepositoryException {
        NodeImpl protectedNode = getNode(nodePath);
        if (!protectedNode.isNodeType(NT_REP_ACCESS_CONTROLLABLE)) {
            protectedNode.addMixin(NT_REP_ACCESS_CONTROLLABLE);
        }
        return addSecurityNode(protectedNode, N_POLICY, NT_REP_ACL);
    }

    /**
 
View Full Code Here

        UUID uuid = (id == null) ? null : id.getUUID();
        node = parent.addNode(nodeName, nodeTypeName, uuid);
        // add mixins
        if (mixinNames != null) {
            for (int i = 0; i < mixinNames.length; i++) {
                node.addMixin(mixinNames[i]);
            }
        }
        return node;
    }
View Full Code Here

        // add node
        node = parent.addNode(nodeName, nodeTypeName, id);
        // add mixins
        if (mixinNames != null) {
            for (Name mixinName : mixinNames) {
                node.addMixin(mixinName);
            }
        }
        return node;
    }
View Full Code Here

            PathNotFoundException, AccessDeniedException, LockException,
            VersionException, RepositoryException {

        NodeImpl n = (NodeImpl) session.getNode(absPath);
        if (!n.isNodeType(REP_RETENTION_MANAGEABLE)) {
            n.addMixin(REP_RETENTION_MANAGEABLE);
        }

        HoldImpl hold = new HoldImpl(session.getQName(name), isDeep, n.getNodeId(), session);
        Value[] vls;
        if (n.hasProperty(REP_HOLD)) {
View Full Code Here

        if (!(retentionPolicy instanceof RetentionPolicyImpl)) {
            throw new RepositoryException("Invalid retention policy.");
        }
        Value retentionReference = session.getValueFactory().createValue(retentionPolicy.getName(), PropertyType.NAME);
        if (!n.isNodeType(REP_RETENTION_MANAGEABLE)) {
            n.addMixin(REP_RETENTION_MANAGEABLE);
        }
        setProperty(n, REP_RETENTION_POLICY, retentionReference);
    }

    /**
 
View Full Code Here

     * @throws RepositoryException if an error occurs
     */
    private NodeImpl createAclNode(String nodePath) throws RepositoryException {
        NodeImpl protectedNode = getNode(nodePath);
        if (!protectedNode.isNodeType(NT_REP_ACCESS_CONTROLLABLE)) {
            protectedNode.addMixin(NT_REP_ACCESS_CONTROLLABLE);
        }
        return addNode(protectedNode, N_POLICY, NT_REP_ACL);
    }

    /**
 
View Full Code Here

        UUID uuid = (id == null) ? null : id.getUUID();
        node = parent.addNode(nodeName, nodeTypeName, uuid);
        // add mixins
        if (mixinNames != null) {
            for (int i = 0; i < mixinNames.length; i++) {
                node.addMixin(mixinNames[i]);
            }
        }
        return node;
    }
View Full Code Here

        // add node
        node = parent.addNode(nodeName, nodeTypeName, id);
        // add mixins
        if (mixinNames != null) {
            for (int i = 0; i < mixinNames.length; i++) {
                node.addMixin(mixinNames[i]);
            }
        }
        return node;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.