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

        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

Examples of javax.jcr.Node.removeMixin()

        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

Examples of javax.jcr.Node.removeMixin()

        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

Examples of javax.jcr.Node.removeMixin()

        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

Examples of javax.jcr.Node.removeMixin()

        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

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 org.exoplatform.portal.mop.i18n.I18NAdapter.removeMixin()

        I18NAdapter able = obj.adapt(I18NAdapter.class);
        if (description != null) {
            Described desc = able.getMixin(Described.class, true);
            desc.setState(description);
        } else {
            able.removeMixin(Described.class);
        }
    }

    public Map<Locale, Described.State> getDescriptions(String id) {
        if (id == null) {
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.NodeImpl.removeMixin()

         }

         // remove old "dc:elementSet" properties
         if (parent.isNodeType("dc:elementSet"))
         {
            parent.removeMixin("dc:elementSet");
         }

         parent.addMixin("dc:elementSet");

         DocumentReaderService readerService =
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.