Package javax.jcr

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
                Iterator it = mixins.iterator();
View Full Code Here


            // remove all mixin nodetypes
            try {
                Node n = (Node)item;
                NodeType[] mixins = n.getMixinNodeTypes();
                for (int i = 0; i < mixins.length; i++) {
                    n.removeMixin(mixins[i].getName());
                }
            } catch (RepositoryException e) {
                // NoSuchNodeTypeException, ConstraintViolationException should never occur...
                throw new JcrDavException(e);
            }
View Full Code Here

        node.addMixin(mixinName);
        testRootNode.save();

        try {
            node.removeMixin(mixinName);
        } catch (ConstraintViolationException e) {
            /**
             * In some implementations it may not be possible to remove mixin node
             * types (short of removing the node itself). In these cases this
             * method will throw a ConstraintViolationException.
View Full Code Here

        if (notAssignedMixin == null) {
            throw new NotExecutableException("No testable mixin node type found");
        }

        try {
            node.removeMixin(notAssignedMixin);
            fail("Node.removeMixin(String mixinName) must throw a " +
                    "NoSuchNodeTypeException if Node does not have the " +
                    "specified mixin.");
        } catch (NoSuchNodeTypeException e) {
            // success
View Full Code Here

        node.addMixin(mixinName);
        testRootNode.save();
        node.checkin();

        try {
            node.removeMixin(mixinName);
            fail("Node.removeMixin(String mixinName) must throw a " +
                    "VersionException if the node is checked-in.");
        } catch (VersionException e) {
            // success
        }
View Full Code Here

        testRootNode.getSession().save();
        assertTrue(n.hasProperty("jcr:uuid"));

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

        // add mix:referenceable to a nt:unstructured node, jcr:uuid is
        // automatically added
View Full Code Here

        testRootNode.getSession().save();
        assertTrue(n2.hasProperty("jcr:uuid"));

        // 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

        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

        }
        finally {
            session2.logout();
        }

        testNode.removeMixin("mix:test");
        testNode.getSession().save();

        session2 = createAnonymousSession();
        try {
            mix = session2.getNode(TEST_PATH).getMixinNodeTypes();
View Full Code Here

                    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
                Iterator it = mixins.iterator();
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.