Package org.apache.jackrabbit.oak

Examples of org.apache.jackrabbit.oak.Oak


    private SlingRepository slingRepository;

    @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);
View Full Code Here


            public void execute(Runnable command) {
                threadPool.execute(command);
            }
        }, new Hashtable<String, Object>());

        final Oak oak = new Oak(nodeStore)
        .with(new InitialContent())
        .with(new ExtraSlingContent())

        .with(JcrConflictHandler.JCR_CONFLICT_HANDLER)
        .with(new EditorHook(new VersionEditorProvider()))

        .with(securityProvider)

        .with(new NameValidatorProvider())
        .with(new NamespaceEditorProvider())
        .with(new TypeEditorProvider())
//        .with(new RegistrationEditorProvider())
        .with(new ConflictValidatorProvider())

        // index stuff
        .with(indexProvider)
        .with(indexEditorProvider)
//        .with(new PropertyIndexEditorProvider())

//        .with(new PropertyIndexProvider())
//        .with(new NodeTypeIndexProvider())

//        .with(new LuceneIndexEditorProvider())
        .with(AggregateIndexProvider.wrap(new LuceneIndexProvider()
                .with(getNodeAggregator())))

        .with(getDefaultWorkspace())
        .withAsyncIndexing()
        .with(whiteboard)
        ;
       
        if (commitRateLimiter != null) {
            oak.with(commitRateLimiter);
        }

        final ContentRepository contentRepository = oak.createContentRepository();
        return new JcrRepositoryHacks(contentRepository, whiteboard, securityProvider, observationQueueLength, commitRateLimiter);
    }
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

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

    public Jcr(NodeStore store) {
        this(new Oak(store));
    }
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

    private ContentRepository repository;

    @Before
    public void setUp() {
        repository = new Oak().with(new OpenSecurityProvider()).with(new InitialContent()).createContentRepository();
    }
View Full Code Here

        super(fixture);
    }

    @Before
    public void setUp() {
        repository = new Oak(store)
            .with(new OpenSecurityProvider())
            .with(new ChildOrderConflictHandler(new AnnotatingConflictHandler()) {

                /**
                 * Allow deleting changed node.
View Full Code Here

        super(fixture);
    }

    @Override
    protected ContentSession createContentSession() {
        return new Oak(store).with(new OpenSecurityProvider())
                .with(new InitialContent())
                .with(new NamespaceEditorProvider()).createContentSession();
    }
View Full Code Here

            @Override
            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

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.