Examples of backupRepository()


Examples of org.modeshape.jcr.api.RepositoryManager.backupRepository()

        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());
        }

        problems = session.getWorkspace().getRepositoryManager().restoreRepository(backupDirectory);
View Full Code Here

Examples of org.modeshape.jcr.api.RepositoryManager.backupRepository()

    @Override
    public void backup( String name ) throws RemoteException {
        try {
            File backupDir = new File(name);
            RepositoryManager mgr = ((org.modeshape.jcr.api.Session)session()).getWorkspace().getRepositoryManager();
            mgr.backupRepository(backupDir);
        } catch (Exception e) {
            throw new RemoteException(e.getMessage());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.