Package org.apache.jackrabbit.oak.jcr

Examples of org.apache.jackrabbit.oak.jcr.Jcr


    @Before
    public void setUp() throws Exception {
        executor = Executors.newSingleThreadExecutor();
        final Oak oak = new Oak(new SegmentNodeStore());
        this.whiteboard = oak.getWhiteboard();
        final Repository repository = new Jcr(oak).createRepository();
        this.slingRepository = new RepositoryWrapper(repository);

        session = this.slingRepository.loginAdministrative(null);

        ResourceResolver resolver = mock(ResourceResolver.class);
View Full Code Here


    @Before
    public void setUp() throws Exception {
        super.setUp();

        // create a separate repository in order to be able to remove registered privileges.
        repository = new Jcr().createRepository();
        session = getAdminSession();
        privilegeManager = getPrivilegeManager(session);

        // make sure the guest session has read access
        try {
View Full Code Here

            } finally {
                repository.shutdown();
            }
            NodeStore target = new KernelNodeStore(new MicroKernelImpl());
            RepositoryUpgrade.copy(source, target);
            targetRepository = new Jcr(new Oak(target)).createRepository();
        }
    }
View Full Code Here

        // to test in a cluster, use:
        // nodeStore = fixture.createNodeStore(1);
        nodeStore = fixture.createNodeStore();
       
        if (nodeStore != null) {
            Repository rep  = new Jcr(nodeStore).createRepository();
            session = rep.login(new SimpleCredentials("admin", "admin".toCharArray()));
        }
    }
View Full Code Here

    public void login() throws RepositoryException {
        ns1 = fixture.createNodeStore(1);
        if (ns1 == null) {
            return;
        }
        r1  = new Jcr(ns1).createRepository();
        s1 = r1.login(new SimpleCredentials("admin", "admin".toCharArray()));
        ns2 = fixture.createNodeStore(2);
        r2  = new Jcr(ns2).createRepository();
        s2 = r2.login(new SimpleCredentials("admin", "admin".toCharArray()));
    }
View Full Code Here

    private Repository repository;
    private List<Session> sessions = new ArrayList<Session>();

    @Before
    public void before() throws Exception {
        repository = new Jcr().createRepository();

        Session admin = repository.login(new SimpleCredentials("admin", "admin".toCharArray()));
        sessions.add(admin);
        Node testNode = admin.getRootNode().addNode("testNode");
        AccessControlUtils.addAccessControlEntry(admin, testNode.getPath(),
View Full Code Here

            protected Repository[] internalSetUpCluster(int n) throws Exception {
                Repository[] cluster = new Repository[n];
                MicroKernel kernel = new MicroKernelImpl();
                for (int i = 0; i < cluster.length; i++) {
                    Oak oak = new Oak(new KernelNodeStore(kernel, cacheSize));
                    cluster[i] = new Jcr(oak).createRepository();
                }
                return cluster;
            }
        };
    }
View Full Code Here

                kernels = new MicroKernelImpl[cluster.length];
                for (int i = 0; i < cluster.length; i++) {
                    kernels[i] = new MicroKernelImpl(
                            new File(base, unique).getPath());
                    Oak oak = new Oak(new KernelNodeStore(kernels[i], cacheSize));
                    cluster[i] = new Jcr(oak).createRepository();
                }
                return cluster;
            }
            @Override
            public void tearDownCluster() {
View Full Code Here

                            new MongoConnection(host, port, dbName);
                    kernels[i] = new MongoMK.Builder().
                            setMongoDB(mongo.getDB()).
                            setClusterId(i).setLogging(false).open();
                    Oak oak = new Oak(new KernelNodeStore(kernels[i], cacheSize));
                    cluster[i] = new Jcr(oak).createRepository();
                }
                return cluster;
            }
            @Override
            public void tearDownCluster() {
View Full Code Here

                    stores[i] = new MongoMK.Builder().
                            setMongoDB(mongo.getDB()).
                            memoryCacheSize(cacheSize).
                            setClusterId(i).setLogging(false).getNodeStore();
                    Oak oak = new Oak(stores[i]);
                    cluster[i] = new Jcr(oak).createRepository();
                }
                return cluster;
            }
            @Override
            public void tearDownCluster() {
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.jcr.Jcr

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.