Examples of unregisterNodeType()


Examples of javax.jcr.nodetype.NodeTypeManager.unregisterNodeType()

            if (parent != null) {
                parent.remove();
                session.save();
            }
            // Be sure to always unregister the node type ...
            ntMgr.unregisterNodeType(nodeType.getName());
        }
    }

    @FixFor( {"MODE-694", "MODE-1525"} )
    @Test
View Full Code Here

Examples of javax.jcr.nodetype.NodeTypeManager.unregisterNodeType()

        NodeTypeTemplate ntd = ntMgr.createNodeTypeTemplate();
        ntd.setName("foo");
        ntMgr.registerNodeType(ntd, false);
        assertTrue(ntMgr.hasNodeType("foo"));

        ntMgr.unregisterNodeType("foo");
        assertFalse(ntMgr.hasNodeType("foo"));
    }

    @Test
    public void testNamespaceRegistry() throws RepositoryException {
View Full Code Here

Examples of javax.jcr.nodetype.NodeTypeManager.unregisterNodeType()

        n.setProperty("jcr:statement", vf.createValue("statement"));
        n.setProperty("jcr:language", vf.createValue("language"));
        session.save();

        try {
            manager.unregisterNodeType("nt:query");
            fail();
        } catch (ConstraintViolationException expected) {
            // this type is referenced in content, so it can't be removed
        }
View Full Code Here

Examples of javax.jcr.nodetype.NodeTypeManager.unregisterNodeType()

        n.remove();
        session.save();

        try {
            manager.unregisterNodeType("nt:query");
            // no longer referenced in content, so removal should succeed
        } catch (ConstraintViolationException unexpected) {
            fail();
        }
    }
View Full Code Here

Examples of javax.jcr.nodetype.NodeTypeManager.unregisterNodeType()

        Workspace testWsp = testSession.getWorkspace();
        try {
            try {
                NodeTypeManager testNtm = testWsp.getNodeTypeManager();
                testNtm.unregisterNodeType(ntd.getName());
                fail("Node type unregistration should be denied.");
            } catch (AccessDeniedException e) {
                // success
            }
            try {
View Full Code Here

Examples of javax.jcr.nodetype.NodeTypeManager.unregisterNodeType()

        NodeTypeTemplate ntd = ntMgr.createNodeTypeTemplate();
        ntd.setName("foo");
        ntMgr.registerNodeType(ntd, false);
        assertTrue(ntMgr.hasNodeType("foo"));

        ntMgr.unregisterNodeType("foo");
        assertFalse(ntMgr.hasNodeType("foo"));
    }

    @Test
    public void testNamespaceRegistry() throws RepositoryException {
View Full Code Here

Examples of javax.jcr.nodetype.NodeTypeManager.unregisterNodeType()

        n.setProperty("jcr:statement", vf.createValue("statement"));
        n.setProperty("jcr:language", vf.createValue("language"));
        session.save();

        try {
            manager.unregisterNodeType("nt:query");
            fail();
        } catch (ConstraintViolationException expected) {
            // this type is referenced in content, so it can't be removed
        }
View Full Code Here

Examples of javax.jcr.nodetype.NodeTypeManager.unregisterNodeType()

        n.remove();
        session.save();

        try {
            manager.unregisterNodeType("nt:query");
            // no longer referenced in content, so removal should succeed
        } catch (ConstraintViolationException unexpected) {
            fail();
        }
    }
View Full Code Here

Examples of javax.jcr.nodetype.NodeTypeManager.unregisterNodeType()

        Workspace testWsp = testSession.getWorkspace();
        try {
            try {
                NodeTypeManager testNtm = testWsp.getNodeTypeManager();
                testNtm.unregisterNodeType(ntd.getName());
                fail("Node type unregistration should be denied.");
            } catch (AccessDeniedException e) {
                // success
            }
            try {
View Full Code Here

Examples of javax.jcr.nodetype.NodeTypeManager.unregisterNodeType()

        NodeTypeTemplate ntd = ntMgr.createNodeTypeTemplate();
        ntd.setName("foo");
        ntMgr.registerNodeType(ntd, false);
        assertTrue(ntMgr.hasNodeType("foo"));

        ntMgr.unregisterNodeType("foo");
        assertFalse(ntMgr.hasNodeType("foo"));
    }

    @Test
    public void testNamespaceRegistry() throws RepositoryException {
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.