Examples of removeMixin()


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()

                    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

Examples of javax.jcr.Node.removeMixin()

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

Examples of javax.jcr.Node.removeMixin()

        } finally {
            session2.logout();
        }

        try {
            testNode.removeMixin("mix:test");
            fail("Expected ConstraintViolationException");
        } catch (ConstraintViolationException expected) {
        }
    }
View Full Code Here

Examples of javax.jcr.Node.removeMixin()

        }
        finally {
            session2.logout();
        }

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

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

Examples of javax.jcr.Node.removeMixin()

        deny(path, readPrivileges);

        assertTrue(n.hasNode("rep:policy"));
        assertTrue(n.isNodeType("rep:AccessControllable"));

        n.removeMixin("rep:AccessControllable");

        superuser.save();
        assertFalse(n.hasNode("rep:policy"));
        assertFalse(n.isNodeType("rep:AccessControllable"));
    }
View Full Code Here

Examples of javax.jcr.Node.removeMixin()

            assertEquals("mix:test", mix[0].getName());
        } finally {
            session2.logout();
        }

        testNode.removeMixin("mix:test");
    }

    @Test
    public void liveNode() throws RepositoryException {
        Session session = getAdminSession();
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
                Iterator it = mixins.iterator();
View Full Code Here

Examples of javax.jcr.Node.removeMixin()

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

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