Package org.apache.jackrabbit.test

Examples of org.apache.jackrabbit.test.NotExecutableException


                existing = p;
                break;
            }
        }
        if (existing == null) {
            throw new NotExecutableException();
        }

        String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
                "<sv:node sv:name=\"t\" xmlns:mix=\"http://www.jcp.org/jcr/mix/1.0\" xmlns:nt=\"http://www.jcp.org/jcr/nt/1.0\" xmlns:fn_old=\"http://www.w3.org/2004/10/xpath-functions\" xmlns:fn=\"http://www.w3.org/2005/xpath-functions\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:sv=\"http://www.jcp.org/jcr/sv/1.0\" xmlns:rep=\"internal\" xmlns:jcr=\"http://www.jcp.org/jcr/1.0\">" +
                "   <sv:property sv:name=\"jcr:primaryType\" sv:type=\"Name\"><sv:value>rep:User</sv:value></sv:property>" +
View Full Code Here


    }

    public void testImportMembers() throws RepositoryException, IOException, SAXException, NotExecutableException {
        Authorizable admin = umgr.getAuthorizable("admin");
        if (admin == null) {
            throw new NotExecutableException();
        }

        String uuid = ((AuthorizableImpl) admin).getNode().getUUID();
        String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
                "<sv:node sv:name=\"gFolder\" xmlns:mix=\"http://www.jcp.org/jcr/mix/1.0\" xmlns:nt=\"http://www.jcp.org/jcr/nt/1.0\" xmlns:fn_old=\"http://www.w3.org/2004/10/xpath-functions\" xmlns:fn=\"http://www.w3.org/2005/xpath-functions\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:sv=\"http://www.jcp.org/jcr/sv/1.0\" xmlns:rep=\"internal\" xmlns:jcr=\"http://www.jcp.org/jcr/1.0\">" +
View Full Code Here

    public void testImportNonExistingMemberBestEffort2() throws IOException, RepositoryException, SAXException, NotExecutableException {

        String g1Id = "0120a4f9-196a-3f9e-b9f5-23f31f914da7";
        String nonExistingId = "b2f5ff47-4366-31b6-a533-d8dc3614845d"; // groupId of 'g' group.
        if (umgr.getAuthorizable("g") != null) {
            throw new NotExecutableException();
        }

        String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
                "<sv:node sv:name=\"gFolder\" xmlns:mix=\"http://www.jcp.org/jcr/mix/1.0\" xmlns:nt=\"http://www.jcp.org/jcr/nt/1.0\" xmlns:fn_old=\"http://www.w3.org/2004/10/xpath-functions\" xmlns:fn=\"http://www.w3.org/2005/xpath-functions\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:sv=\"http://www.jcp.org/jcr/sv/1.0\" xmlns:rep=\"internal\" xmlns:jcr=\"http://www.jcp.org/jcr/1.0\">" +
                "   <sv:property sv:name=\"jcr:primaryType\" sv:type=\"Name\"><sv:value>rep:AuthorizableFolder</sv:value></sv:property>" +
View Full Code Here

    @Override
    protected void setUp() throws Exception {
        super.setUp();

        if (!(userMgr instanceof UserManagerImpl)) {
            throw new NotExecutableException();
        }

        UserManagerImpl umgr = (UserManagerImpl) userMgr;
        // Workaround for testing cache behaviour that relies on observation:
        // - retrieve session attached to the userManager implementation.
View Full Code Here

        super.setUp();
        if (superuser instanceof JackrabbitSession) {
            String userID = superuser.getUserID();
            user = (User) ((JackrabbitSession) superuser).getUserManager().getAuthorizable(userID);
        } else {
            throw new NotExecutableException();
        }
    }
View Full Code Here

            return;
        }
        if (n.canAddMixin(mixReferenceable)) {
            n.addMixin(mixReferenceable);
        } else {
            throw new NotExecutableException("Node is not referenceable: " + n.getPath());
        }
    }
View Full Code Here

        throws NotExecutableException, RepositoryException {

        Session session = superuser;

        if (!isSupported(Repository.OPTION_LOCKING_SUPPORTED)) {
            throw new NotExecutableException("Locking is not supported.");
        }

        // create a node that is lockable
        Node lockableNode = testRootNode.addNode(nodeName1, testNodeType);
        // or try to make it lockable if it is not
        if (!lockableNode.isNodeType(mixLockable)) {
            if (lockableNode.canAddMixin(mixLockable)) {
                lockableNode.addMixin(mixLockable);
            } else {
                throw new NotExecutableException("Node " + nodeName1 + " is not lockable and does not " +
                        "allow to add mix:lockable");
            }
        }

        // add a sub node (the one that is tried to move later on)
View Full Code Here

        // a referenceable node
        Node n1 = testRootNode.addNode(name, testNodeType);
        if (!n1.isNodeType(mixReferenceable) && !n1.canAddMixin(mixReferenceable)) {
            n1.remove();
            session.save();
            throw new NotExecutableException("node type " + testNodeType +
                    " does not support mix:referenceable");
        }
        n1.addMixin(mixReferenceable);
        // make sure jcr:uuid is available
        testRootNode.save();
View Full Code Here

        versionableNode.checkout();
        versionableNode.checkin(); // create 1.2
        try {
            versionableNode.getVersionHistory().removeVersion(testV.getName());
        } catch (UnsupportedRepositoryOperationException e) {
            throw new NotExecutableException("Removing version is not supported: " + e.getMessage());
        }

        versionableNode.checkout();
        version = versionableNode.checkin();
        // create a second version
View Full Code Here

                found = true;
            }
        }

        if (!found) {
            throw new NotExecutableException("Failed to create an invalid name in order to test the removal of versions.");
        }

        try {
            vHistory.removeVersion(invalidName);
            fail("Removing a version that does not exist must fail with a VersionException.");
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.test.NotExecutableException

Copyright © 2018 www.massapicom. 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.