eXo JCR :: Applications :: Backup Console 1.15.6-GA

org.exoplatform.jcr.backupconsole
Class BackupClientImpl

java.lang.Object
  extended by org.exoplatform.jcr.backupconsole.BackupClientImpl
All Implemented Interfaces:
BackupClient

public class BackupClientImpl
extends Object
implements BackupClient

Created by The eXo Platform SAS.
Date:

Version:
$Id: BackupClientImpl.java 111 2008-11-11 11:11:11Z serg $
Author:
Karpenko Sergiy

Constructor Summary
BackupClientImpl(ClientTransport transport, FormAuthentication formAuthentication, String urlPath)
          Constructor.
BackupClientImpl(ClientTransport transport, String urlPath)
          Constructor.
BackupClientImpl(ClientTransport transport, String login, String pass, String urlPath)
          Constructor.
 
Method Summary
 String drop(boolean forceClose, String repositoryName, String workspaceName)
          Drop workspace or repository.
 String info()
          Get information about backup service.
 String list()
          Get information about the current backups (in progress).
 String listCompleted()
          Get information about the completed (ready to restore) backups.
 String restore(String repositoryName, String workspaceName, String backupId, InputStream config, String backupSetPath, boolean removeExists)
          Restore repository or workspace from backup file.
 String restores(String repositoryName, String workspaceName)
          Get information about current restores of repository or workspace.
 String startBackUp(String repositoryName, String workspaceName, String backupDir)
          Start backup of repository or workspace.
 String startIncrementalBackUp(String repositoryName, String workspaceName, String backupDir, long incr)
          Start Incremental Backup of repository or workspace.
 String status(String backupId)
          Get Status of backup.
 String stop(String backupId)
          Stop backup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackupClientImpl

public BackupClientImpl(ClientTransport transport,
                        String urlPath)
Constructor.

Parameters:
transport - ClientTransport implementation.
urlPath - url path.

BackupClientImpl

public BackupClientImpl(ClientTransport transport,
                        String login,
                        String pass,
                        String urlPath)
Constructor.

Parameters:
transport - ClientTransport implementation.
login - user login.
pass - user password.
urlPath - url path.

BackupClientImpl

public BackupClientImpl(ClientTransport transport,
                        FormAuthentication formAuthentication,
                        String urlPath)
Constructor.

Parameters:
transport - ClientTransport implementation.
formAuthentication - form authentication.
urlPath - url path.
Method Detail

startBackUp

public String startBackUp(String repositoryName,
                          String workspaceName,
                          String backupDir)
                   throws IOException,
                          BackupExecuteException
Start backup of repository or workspace. If workspaceName is 'null', then repository backup will be started.

Specified by:
startBackUp in interface BackupClient
Parameters:
repositoryName - String, the repository name.
workspaceName - String, the workspace name.
backupDir - path to backup folder on remote server
Returns:
String result
Throws:
IOException - transport exception.
BackupExecuteException - backup client internal exception.

startIncrementalBackUp

public String startIncrementalBackUp(String repositoryName,
                                     String workspaceName,
                                     String backupDir,
                                     long incr)
                              throws IOException,
                                     BackupExecuteException
Start Incremental Backup of repository or workspace. If workspaceName is 'null', then repository backup will be started.

Specified by:
startIncrementalBackUp in interface BackupClient
Parameters:
repositoryName - String, the repository name
workspaceName - String, the workspace name
backupDir - path to backup folder on remote server
incr - incremental job period.
Returns:
String result
Throws:
IOException - transport exception
BackupExecuteException - backup client internal exception

status

public String status(String backupId)
              throws IOException,
                     BackupExecuteException
Get Status of backup.

Specified by:
status in interface BackupClient
Parameters:
backupId - the backup identifier.
Returns:
String result.
Throws:
IOException - transport exception.
BackupExecuteException - backup client internal exception.

stop

public String stop(String backupId)
            throws IOException,
                   BackupExecuteException
Stop backup.

Specified by:
stop in interface BackupClient
Parameters:
backupId - the backup identifier
Returns:
String result
Throws:
IOException - transport exception
BackupExecuteException - backup client internal exception

restore

public String restore(String repositoryName,
                      String workspaceName,
                      String backupId,
                      InputStream config,
                      String backupSetPath,
                      boolean removeExists)
               throws IOException,
                      BackupExecuteException
Restore repository or workspace from backup file. If workspaceName is 'null', then will be run restore of repository.

Specified by:
restore in interface BackupClient
Parameters:
repositoryName - String, the repository name
workspaceName - String, the workspace name
backupId - the backup identifier
config - InputStream contains workspace configuration
backupSetPath - String, path to backup set directory on server side
removeExists - boolean. if 'true' then will be removed(clean db, value storage, index) existed repository/workspace.
Returns:
String result
Throws:
IOException - transport exception
BackupExecuteException - backup client internal exception

drop

public String drop(boolean forceClose,
                   String repositoryName,
                   String workspaceName)
            throws IOException,
                   BackupExecuteException
Drop workspace or repository. If workspaceName is 'null', then repository will be dropped.

Specified by:
drop in interface BackupClient
Parameters:
forceClose - force sessions close on repository or workspace
repositoryName - String, the repository name
workspaceName - String, the workspace name
Returns:
String result
Throws:
IOException - transport exception
BackupExecuteException - backup client internal exception

info

public String info()
            throws IOException,
                   BackupExecuteException
Get information about backup service.

Specified by:
info in interface BackupClient
Returns:
String result
Throws:
IOException - transport exception
BackupExecuteException - backup client internal exception

list

public String list()
            throws IOException,
                   BackupExecuteException
Get information about the current backups (in progress).

Specified by:
list in interface BackupClient
Returns:
String result
Throws:
IOException - transport exception
BackupExecuteException - backup client internal exception

listCompleted

public String listCompleted()
                     throws IOException,
                            BackupExecuteException
Get information about the completed (ready to restore) backups.

Specified by:
listCompleted in interface BackupClient
Returns:
String result
Throws:
IOException - transport exception
BackupExecuteException - backup client internal exception

restores

public String restores(String repositoryName,
                       String workspaceName)
                throws IOException,
                       BackupExecuteException
Get information about current restores of repository or workspace. If workspaceName is 'null', then will be get status of repository backup.

Specified by:
restores in interface BackupClient
Parameters:
repositoryName - String, the repository name
workspaceName - String, the workspace name
Returns:
String result
Throws:
IOException - transport exception
BackupExecuteException - backup client internal exception

eXo JCR :: Applications :: Backup Console 1.15.6-GA

Copyright © 2013 eXo Platform SAS. All Rights Reserved.