Package org.apache.jackrabbit.oak

Examples of org.apache.jackrabbit.oak.Oak


        ns1 = builder.setClusterId(1).getNodeStore();
        builder = new DocumentMK.Builder();
        builder.setDocumentStore(ds).setBlobStore(bs).setAsyncDelay(1);
        ns2 = builder.setClusterId(2).getNodeStore();

        Oak oak = new Oak(ns1)
                .with(new InitialContent())
                .with(new ReferenceEditorProvider())
                .with(new ReferenceIndexProvider())
                .with(new PropertyIndexEditorProvider())
                .with(new PropertyIndexProvider())
                .with(new TypeEditorProvider())
                .with(securityProvider1 = new SecurityProviderImpl(getSecurityConfigParameters()));
        contentRepository1 = oak.createContentRepository();
        adminSession1 = login1(getAdminCredentials());
        root1 = adminSession1.getLatestRoot();
        userManager1 = securityProvider1.getConfiguration(UserConfiguration.class).getUserManager(root1, namePathMapper);
        aclMgr1 = securityProvider1.getConfiguration(AuthorizationConfiguration.class).getAccessControlManager(root1, namePathMapper);

        oak = new Oak(ns2)
                .with(new InitialContent())
                .with(new ReferenceEditorProvider())
                .with(new ReferenceIndexProvider())
                .with(new PropertyIndexEditorProvider())
                .with(new PropertyIndexProvider())
                .with(new TypeEditorProvider())
                .with(securityProvider2 = new SecurityProviderImpl(getSecurityConfigParameters()));

        contentRepository2 = oak.createContentRepository();
        adminSession2 = login2(getAdminCredentials());
        root2 = adminSession2.getLatestRoot();
        userManager2 = securityProvider2.getConfiguration(UserConfiguration.class).getUserManager(root2, namePathMapper);
        aclMgr2 = securityProvider2.getConfiguration(AuthorizationConfiguration.class).getAccessControlManager(root2, namePathMapper);
    }
View Full Code Here


        assertEquals(store.getRoot(), new SegmentNodeStore(backup).getRoot());
        backup.close();
    }

    private static void init(NodeStore store) {
        new Oak(store).with(new OpenSecurityProvider())
                .with(new InitialContent()).createContentRepository();
    }
View Full Code Here

public class MultipleIndicesTest extends AbstractQueryTest {

    @Override
    protected ContentRepository createRepository() {
        return new Oak()
                .with(new InitialContent())
                .with(new RepositoryInitializer() {
                    @Override
                    public void initialize(NodeBuilder builder) {
                        createIndexDefinition(
View Full Code Here

        root.commit();
    }

    @Override
    protected ContentRepository createRepository() {
        return new Oak().with(new InitialContent())
                .with(new OpenSecurityProvider())
                .with(new LowCostLuceneIndexProvider())
                .with(new LuceneIndexEditorProvider())
                .createContentRepository();
    }
View Full Code Here

                    new KernelNodeStore(kernel),
                    new Properties()));
        } else if (service instanceof NodeStore) {
            NodeStore store = (NodeStore) service;
            OakInitializer.initialize(store, repositoryInitializerTracker, indexEditorProvider);
            Oak oak = new Oak(store)
                // FIXME: proper osgi setup for security provider (see OAK-17 and sub-tasks)
                .with(new SecurityProviderImpl())
                .with(validatorProvider)
                .with(indexProvider)
                .with(indexEditorProvider);
            services.put(reference, context.registerService(
                    ContentRepository.class.getName(),
                    oak.createContentRepository(),
                    new Properties()));
        }
        return service;
    }
View Full Code Here

            server.stop();
            executor.shutdown();
        }

        private void addServlets(NodeStore store, String path) {
            Oak oak = new Oak(store);
            Jcr jcr = new Jcr(oak).with(executor);

            ContentRepository repository = oak.createContentRepository();

            ServletHolder holder =
                    new ServletHolder(new OakServlet(repository));
            context.addServlet(holder, path + "/*");

 
View Full Code Here

        with(new PropertyIndexProvider());
        with(new NodeTypeIndexProvider());
    }

    public Jcr() {
        this(new Oak());
    }
View Full Code Here

    public Jcr() {
        this(new Oak());
    }

    public Jcr(MicroKernel kernel) {
        this(new Oak(kernel));
    }
View Full Code Here

        super(settings);

        Session session = null;
        try {
            this.connection = new Mongo(HOST, PORT);
            Jcr jcr = new Jcr(new Oak(new SegmentNodeStore(
                    new MongoStore(connection.getDB(DB), 100 * 1024 * 1024))));
            jcr.with(Executors.newScheduledThreadPool(1));
            this.repository = jcr.createRepository();

            session = getRepository().login(superuser);
View Full Code Here

            @Override
            public Repository[] setUpCluster(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

TOP

Related Classes of org.apache.jackrabbit.oak.Oak

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.