Package org.apache.jackrabbit.oak.core

Examples of org.apache.jackrabbit.oak.core.ContentRepositoryImpl


        // add index hooks later to prevent the OakInitializer to do excessive indexing
        with(new IndexUpdateProvider(indexEditors));
        withEditorHook();
        CommitHook commitHook = CompositeHook.compose(commitHooks);
        return new ContentRepositoryImpl(
                store,
                commitHook,
                defaultWorkspaceName,
                indexProvider,
                securityProvider);
View Full Code Here


            server.stop();
        }

        private void addServlets(MicroKernel kernel, String path) {
            ContentRepository repository =
                    new ContentRepositoryImpl(kernel, null, null);

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

 
View Full Code Here

    /**
     * Utility constructor that creates a new in-memory repository for use
     * mostly in test cases.
     */
    public RepositoryImpl() {
        this(new ContentRepositoryImpl());
    }
View Full Code Here

     */
    public OakRepositoryStub(Properties settings) throws RepositoryException, IOException {
        super(settings);

        MicroKernel microkernel = new MicroKernelImpl("target/mk-tck-" + System.currentTimeMillis());
        ContentRepository contentRepository = new ContentRepositoryImpl(microkernel, null, buildDefaultCommitEditor());
        repository = new RepositoryImpl(contentRepository, Executors.newScheduledThreadPool(1));

        Session session = repository.login(superuser);
        try {
            TestContentLoader loader = new TestContentLoader();
View Full Code Here

public class NamespaceRegistryImplTest {

    @Test
    public void testMappings() throws Exception {
        ContentRepository repository = new ContentRepositoryImpl();
        ContentSession session = repository.login(new GuestCredentials(), null);
        NamespaceRegistry r = new NamespaceRegistryImpl(session);

        assertEquals("", r.getURI(""));
        assertEquals("http://www.jcp.org/jcr/1.0", r.getURI("jcr"));
        assertEquals("http://www.jcp.org/jcr/nt/1.0", r.getURI("nt"));
View Full Code Here

            server.stop();
        }

        private void addServlets(MicroKernel kernel, String path) {
            ContentRepository repository =
                    new ContentRepositoryImpl(kernel, null, buildDefaultCommitEditor());

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

 
View Full Code Here

     * empty thread pool, so things like observation won't work by default.
     * Use the other constructor with a properly managed executor service
     * if such features are needed.
     */
    public RepositoryImpl() {
        this(new ContentRepositoryImpl(), Executors.newScheduledThreadPool(0));
    }
View Full Code Here

    protected QueryEngine qe;
    protected Root root;

    @Before
    public void before() throws Exception {
        repository = new ContentRepositoryImpl(new MicroKernelImpl(),
                new LuceneIndexProvider(DEFAULT_INDEX_HOME),
                buildDefaultCommitEditor());
        session = repository.login(new GuestCredentials(), null);
        cleanupIndexNode();
View Full Code Here

    }

    protected Repository getRepository() throws RepositoryException {
        if (repository == null) {
            executor = Executors.newScheduledThreadPool(1);
            repository = new RepositoryImpl(new ContentRepositoryImpl(
                    new MicroKernelImpl(), null, buildDefaultCommitEditor()),
                    executor);
        }
        return repository;
    }
View Full Code Here

        Object service = context.getService(reference);
        if (service instanceof MicroKernel) {
            MicroKernel kernel = (MicroKernel) service;
            services.put(reference, context.registerService(
                    ContentRepository.class.getName(),
                    new ContentRepositoryImpl(kernel, indexProvider, validatorProvider),
                    new Properties()));
            return service;
        } else {
            context.ungetService(reference);
            return null;
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.core.ContentRepositoryImpl

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.