001/**
002 * Copyright 2015 DuraSpace, Inc.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.fcrepo.kernel.services;
017
018import java.io.File;
019
020import javax.jcr.Session;
021
022import org.modeshape.jcr.api.Problems;
023
024/**
025 * @author bbpennel
026 * @since Feb 20, 2014
027 */
028public interface RepositoryService {
029
030    /**
031     * Calculate the total size of all the binary properties in the repository
032     *
033     * @return size in bytes
034     */
035    Long getRepositorySize();
036
037    /**
038     * Calculate the number of objects in the repository
039     *
040     * @return number of objects in the repository
041     */
042    Long getRepositoryObjectCount();
043
044    /**
045     * This method backups up a running repository
046     *
047     * @param session the session
048     * @param backupDirectory the backup directory
049     * @return problems
050     */
051    Problems backupRepository(Session session, File backupDirectory);
052
053    /**
054     * This methods restores the repository from a backup
055     *
056     * @param session the session
057     * @param backupDirectory the backup directory
058     * @return problems
059     */
060    Problems restoreRepository(Session session, File backupDirectory);
061
062}