Package org.modeshape.jcr.api

Examples of org.modeshape.jcr.api.Repository


        if (path == null || path.trim().length() == 0) {
            throw new IllegalStateException("Cannot locate the jboss server dir");
        }
        final File backupDirectory = new File(path);

        Repository repository = (Repository)getRepositoryFromJndi("java:/jcr/sample");
        org.modeshape.jcr.api.Session session = repository.login();
        final RepositoryManager repoMgr = session.getWorkspace().getRepositoryManager();
        Problems problems = repoMgr.backupRepository(backupDirectory);
        if (problems.hasProblems()) {
            throw new IllegalStateException("Errors while backing up repository:" + problems.toString());
        }
View Full Code Here


        // Start the engine and repository again to verify the content is being persisted ...
        engine = new ModeShapeEngine();
        engine.start();
        try {
            Repository repository = engine.deploy(repositoryConfiguration);
            Session session = repository.login();
            Node library = session.getNode("/Library");
            assertThat(library, is(notNullValue()));
            assertThat(library.getPrimaryNodeType().getName(), is("nt:folder"));
            session.logout();
        } finally {
View Full Code Here

TOP

Related Classes of org.modeshape.jcr.api.Repository

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.