Examples of removeMixin()


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

                    if (property.getName().equals("jcr:mixinTypes")) {

                        // clear all mixins
                        for (NodeType mixin : parentNode.getMixinNodeTypes()) {
                            parentNode.removeMixin(mixin.getName());
                        }

                    } else {
                        if ( parentNode.hasProperty(property.getName())) {
                            parentNode.getProperty(property.getName()).remove();
View Full Code Here

Examples of javax.jcr.Node.removeMixin()

                if ( node != null ) {
                    checkoutIfNecessary(node, changes, versioningConfiguration);
                    for (NodeType mixin : node.getMixinNodeTypes()) {
                        String mixinName = mixin.getName();
                        if (!newMixins.remove(mixinName)) {
                            node.removeMixin(mixinName);
                        }
                    }

                    // add new mixins
                    for (String mixin : newMixins) {
View Full Code Here

Examples of javax.jcr.Node.removeMixin()

            assertNotNull(res.adaptTo(Node.class));
            assertTrue(childNode.isSame(res.adaptTo(Node.class)));
           
            //remove mixin 
            childNode.removeMixin("sling:VanityPath");
            saveMappings(session);

            path = ResourceUtil.normalize(ResourceUtil.getParent(rootPath)
                    + "/childVanity.print.html");
            request = new FakeSlingHttpServletRequest(path);
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()

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