Examples of removeMixin()


Examples of javax.jcr.Node.removeMixin()

                    }
                    Set remove = new HashSet(currentMixins);
                    remove.removeAll(mixinNames);
                    mixinNames.removeAll(currentMixins);
                    for (Iterator it = remove.iterator(); it.hasNext(); ) {
                        n.removeMixin((String) it.next());
                    }
                    for (Iterator it = mixinNames.iterator(); it.hasNext(); ) {
                        n.addMixin((String) it.next());
                    }
                    return null;
View Full Code Here

Examples of javax.jcr.Node.removeMixin()

                    if (mixins.contains(name)){
                        // do not add existing mixins
                        mixins.remove(name);
                    } else {
                        // remove mixin that are not contained in the new list
                        n.removeMixin(name);
                    }
                }

                // add the remaining mixing types that are not yet set
                for (String mixin : mixins) {
View Full Code Here

Examples of javax.jcr.Node.removeMixin()

        if (JCR_MIXINNODETYPES.equals(propertyName)) {
            // remove all mixin nodetypes
            try {
                Node n = (Node)item;
                for (NodeType mixin : n.getMixinNodeTypes()) {
                    n.removeMixin(mixin.getName());
                }
            } catch (RepositoryException e) {
                // NoSuchNodeTypeException, ConstraintViolationException should never occur...
                throw new JcrDavException(e);
            }
View Full Code Here

Examples of javax.jcr.Node.removeMixin()

                    }
                    Set<String> remove = new HashSet<String>(currentMixins);
                    remove.removeAll(mixinNames);
                    mixinNames.removeAll(currentMixins);
                    for (String mixName : remove) {
                        n.removeMixin(mixName);
                    }
                    for (String mixName : mixinNames) {
                        n.addMixin(mixName);
                    }
                    return null;
View Full Code Here

Examples of javax.jcr.Node.removeMixin()

        n.setProperty("jcr:title", "blah blah");
        testRootNode.getSession().save();

        // remove mix:title, jcr:title should be gone as there's no matching
        // definition in nt:folder
        n.removeMixin("mix:title");
        testRootNode.getSession().save();
        assertFalse(n.hasProperty("jcr:title"));

        // add mix:title to a nt:unstructured node and set jcr:title property
        Node n1 = testRootNode.addNode(nodeName2, ntUnstructured);
View Full Code Here

Examples of javax.jcr.Node.removeMixin()

        // remove mix:title, jcr:title should stay since it adopts the residual
        // property definition declared in nt:unstructured
        testRootNode.getSession().save();

        n1.removeMixin("mix:title");
        testRootNode.getSession().save();
        assertTrue(n1.hasProperty("jcr:title"));

        assertEquals(
                n1.getProperty("jcr:title").getDefinition().getDeclaringNodeType().getName(),
View Full Code Here

Examples of javax.jcr.Node.removeMixin()

        n2.addMixin(mixReferenceable);
        testRootNode.getSession().save();

        // remove mix:referenceable, jcr:uuid should always get removed
        // since it is a protcted property
        n2.removeMixin(mixReferenceable);
        testRootNode.getSession().save();
        assertFalse(n2.hasProperty("jcr:uuid"));
    }

View Full Code Here

Examples of javax.jcr.Node.removeMixin()

        ensureMixinType(b, mixShareable);
        b.save();

        try {
            // remove mixin
            b.removeMixin(mixShareable);
            b.save();
            fail("Removing mix:shareable should fail.");
        } catch (UnsupportedRepositoryOperationException e) {
            // expected
        }
View Full Code Here

Examples of javax.jcr.Node.removeMixin()

        ensureMixinType(b, mixShareable);
        b.save();

        try {
            // remove mixin
            b.removeMixin(mixShareable);
            b.save();
            fail("Removing mix:shareable should fail.");
        } catch (UnsupportedRepositoryOperationException e) {
            // expected
        }
View Full Code Here

Examples of javax.jcr.Node.removeMixin()

                    if (mixins.contains(name)){
                        // do not add existing mixins
                        mixins.remove(name);
                    } else {
                        // remove mixin that are not contained in the new list
                        n.removeMixin(name);
                    }
                }

                // add the remaining mixing types that are not yet set
                for (String mixin : mixins) {
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.