Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.Batch


        @Override
        public Batch createBatch(final SessionInfo sessionInfo, final ItemId itemId)
                throws RepositoryException {

            Batch result = super.createBatch(sessionInfo, itemId);
            return result == null
                ? null
                : create(result, logWriterProvider);
        }
View Full Code Here


        resolver = new DefaultNamePathResolver(nsResolver);

        try {
            rs.getNodeInfo(si, getNodeId(testPath));
        } catch (RepositoryException e) {
            Batch b = rs.createBatch(si, getNodeId("/"));
            b.addNode(getNodeId("/"), resolver.getQName("test"), NameConstants.NT_UNSTRUCTURED, null);
            rs.submit(b);
        }
    }
View Full Code Here

    @Override
    protected void tearDown() throws Exception {
        try {
            if (si != null) {
                Batch b = rs.createBatch(si, getNodeId("/"));
                b.remove(getNodeId(testPath));
                rs.submit(b);
            }
            if (sInfo != null && copiedId != null) {
                Batch b = rs.createBatch(sInfo, getNodeId("/"));
                b.remove(copiedId);
                rs.submit(b);
            }
        } catch (RepositoryException e) {
            // cleanup failed... ignore.
        } finally {
View Full Code Here

            NodeInfo nInfo2 = (NodeInfo) it.next();
            assertEquals(nInfo.getId(), nInfo2.getId());
            assertEquals(nInfo.getNodetype(), nInfo2.getNodetype());
        } finally {
            if (nid != null) {
                Batch b = rs.createBatch(si, getNodeId("/"));
                b.remove(nid);
                rs.submit(b);
            }
        }
    }
View Full Code Here

        resolver = new DefaultNamePathResolver(nsResolver);

        try {
            rs.getNodeInfo(si, getNodeId(testPath));
        } catch (RepositoryException e) {
            Batch b = rs.createBatch(si, getNodeId("/"));
            b.addNode(getNodeId("/"), resolver.getQName("test"), NameConstants.NT_UNSTRUCTURED, null);
            rs.submit(b);
        }

        // todo: retrieve second wsp-name from config
        sInfo = rs.obtain(si, "test");
View Full Code Here

    @Override
    protected void tearDown() throws Exception {
        try {
            if (si != null) {
                Batch b = rs.createBatch(si, getNodeId("/"));
                b.remove(getNodeId(testPath));
                rs.submit(b);
            }
            if (sInfo != null && clonedId != null) {
                Batch b = rs.createBatch(sInfo, getNodeId("/"));
                b.remove(clonedId);
                rs.submit(b);
            }
        } catch (RepositoryException e) {
            // cleanup failed... ignore.
        } finally {
View Full Code Here

        resolver = new DefaultNamePathResolver(nsResolver);

        try {
            rs.getNodeInfo(si, getNodeId(testPath));
        } catch (RepositoryException e) {
            Batch b = rs.createBatch(si, getNodeId("/"));
            b.addNode(getNodeId("/"), resolver.getQName("test"), NameConstants.NT_UNSTRUCTURED, null);
            rs.submit(b);
        }
    }
View Full Code Here

    }

    @Override
    protected void tearDown() throws Exception {
        try {
            Batch b = rs.createBatch(si, getNodeId("/"));
            b.remove(getNodeId(testPath));
            rs.submit(b);
        } finally {
            rs.dispose(si);
            super.tearDown();
        }
View Full Code Here

        resolver = new DefaultNamePathResolver(nsResolver);

        try {
            rs.getNodeInfo(si, getNodeId(testPath));
        } catch (RepositoryException e) {
            Batch b = rs.createBatch(si, getNodeId("/"));
            b.addNode(getNodeId("/"), resolver.getQName("test"), NameConstants.NT_UNSTRUCTURED, null);
            rs.submit(b);
        }

        lastModified = rs.getQValueFactory().create(Calendar.getInstance());
        mimeType = rs.getQValueFactory().create("text/plain", PropertyType.STRING);
View Full Code Here

    }

    @Override
    protected void tearDown() throws Exception {
        try {
            Batch b = rs.createBatch(si, getNodeId("/"));
            b.remove(getNodeId(testPath));
            rs.submit(b);
        } finally {
            rs.dispose(si);
            super.tearDown();
        }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.spi.Batch

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.