Examples of allowsSameNameSiblings()


Examples of javax.jcr.nodetype.NodeDefinition.allowsSameNameSiblings()

        if (parent.hasNode(nodeName)) {
            // a node with that name already exists...
            NodeImpl existing = parent.getNode(nodeName);
            NodeDefinition def = existing.getDefinition();
            if (!def.allowsSameNameSiblings()) {
                // existing doesn't allow same-name siblings,
                // check for potential conflicts
                if (def.isProtected() && existing.isNodeType(ntName)) {
                    /*
                     use the existing node as parent for the possible subsequent
View Full Code Here

Examples of javax.jcr.nodetype.NodeDefinition.allowsSameNameSiblings()

        if (parent.hasChild(nodeName)) {
            // a node with that name already exists...
            Tree existing = parent.getChild(nodeName);
            NodeDefinition def = getDefinition(existing);
            if (!def.allowsSameNameSiblings()) {
                // existing doesn't allow same-name siblings,
                // check for potential conflicts
                if (def.isProtected() && isNodeType(existing, ntName)) {
                    /*
                     use the existing node as parent for the possible subsequent
View Full Code Here

Examples of javax.jcr.nodetype.NodeDefinitionTemplate.allowsSameNameSiblings()

        assertNull(ndt.getRequiredPrimaryTypes());
        assertNull(ndt.getRequiredPrimaryTypeNames());
        assertNull(ndt.getDefaultPrimaryType());
        assertNull(ndt.getDefaultPrimaryTypeName());
        assertFalse(ndt.allowsSameNameSiblings());
    }

    public void testNodeDefinitionTemplate() throws Exception {
        NodeDefinitionTemplate ndt = ntm.createNodeDefinitionTemplate();
View Full Code Here

Examples of org.apache.jackrabbit.core.nodetype.NodeDef.allowsSameNameSiblings()

                        parent.getChildNodeEntry(nodeName, 1);
                NodeId idExisting = entry.getId();
                NodeState existing = (NodeState) itemOps.getItemState(idExisting);
                NodeDef def = ntReg.getNodeDef(existing.getDefinitionId());

                if (!def.allowsSameNameSiblings()) {
                    // existing doesn't allow same-name siblings,
                    // check for potential conflicts
                    EffectiveNodeType entExisting =
                            itemOps.getEffectiveNodeType(existing);
                    if (def.isProtected() && entExisting.includesNodeType(ntName)) {
View Full Code Here

Examples of org.apache.jackrabbit.core.nodetype.NodeDef.allowsSameNameSiblings()

                        parent.getChildNodeEntry(nodeName, 1);
                NodeId idExisting = entry.getId();
                NodeState existing = (NodeState) itemOps.getItemState(idExisting);
                NodeDef def = ntReg.getNodeDef(existing.getDefinitionId());

                if (!def.allowsSameNameSiblings()) {
                    // existing doesn't allow same-name siblings,
                    // check for potential conflicts
                    EffectiveNodeType entExisting =
                            itemOps.getEffectiveNodeType(existing);
                    if (def.isProtected() && entExisting.includesNodeType(ntName)) {
View Full Code Here

Examples of org.apache.jackrabbit.core.nodetype.NodeDef.allowsSameNameSiblings()

                    throw new RepositoryException(msg, ise);
                }
                NodeDef conflictingTargetDef =
                        ntReg.getNodeDef(conflictingState.getDefinitionId());
                // check same-name sibling setting of both target and existing node
                if (!conflictingTargetDef.allowsSameNameSiblings()
                        || !newNodeDef.allowsSameNameSiblings()) {
                    throw new ItemExistsException("cannot add child node '"
                            + nodeName.getLocalName() + "' to "
                            + safeGetJCRPath(parentState.getNodeId())
                            + ": colliding with same-named existing node");
View Full Code Here

Examples of org.apache.jackrabbit.core.nodetype.NodeDef.allowsSameNameSiblings()

                    throw new RepositoryException(msg, ise);
                }
                NodeDef conflictingTargetDef =
                        ntReg.getNodeDef(conflictingState.getDefinitionId());
                // check same-name sibling setting of both target and existing node
                if (!conflictingTargetDef.allowsSameNameSiblings()
                        || !newNodeDef.allowsSameNameSiblings()) {
                    throw new ItemExistsException(
                            "cannot add child node '" + nodeName.getLocalName()
                            + "' to " + safeGetJCRPath(parentState.getNodeId())
                            + ": colliding with same-named existing node");
View Full Code Here

Examples of org.apache.jackrabbit.core.nodetype.NodeDef.allowsSameNameSiblings()

                        parent.getChildNodeEntry(nodeName, 1);
                NodeId idExisting = entry.getId();
                NodeState existing = (NodeState) itemOps.getItemState(idExisting);
                NodeDef def = ntReg.getNodeDef(existing.getDefinitionId());

                if (!def.allowsSameNameSiblings()) {
                    // existing doesn't allow same-name siblings,
                    // check for potential conflicts
                    EffectiveNodeType entExisting =
                            itemOps.getEffectiveNodeType(existing);
                    if (def.isProtected() && entExisting.includesNodeType(ntName)) {
View Full Code Here

Examples of org.apache.jackrabbit.core.nodetype.NodeDef.allowsSameNameSiblings()

                                                }
                                            } catch (ItemStateException e) {
                                                return false;
                                            }
                                            NodeDef def = ntReg.getNodeDef(ns.getDefinitionId());
                                            return def != null ? def.allowsSameNameSiblings() : false;
                                        }
                                    };

                            merged = NodeStateMerger.merge((NodeState) state, context);
                        }
View Full Code Here

Examples of org.apache.jackrabbit.core.nodetype.NodeDef.allowsSameNameSiblings()

                                        ns = (NodeState) getItemState(id);
                                    } catch (ItemStateException e) {
                                        return false;
                                    }
                                    NodeDef def = ntReg.getNodeDef(ns.getDefinitionId());
                                    return def != null ? def.allowsSameNameSiblings() : false;
                                }
                            };
                    if (NodeStateMerger.merge((NodeState) transientState, context)) {
                        // merge succeeded
                        return;
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.