eXo JCR :: Component :: Extension Service 1.16.0-CR2

org.exoplatform.services.jcr.ext.backup.server
Class HTTPBackupAgent

java.lang.Object
  extended by org.exoplatform.services.jcr.ext.backup.server.HTTPBackupAgent
All Implemented Interfaces:
org.exoplatform.services.rest.resource.ResourceContainer

public class HTTPBackupAgent
extends Object
implements org.exoplatform.services.rest.resource.ResourceContainer

Created by The eXo Platform SAS. HTTPBackupAgent is a RESTfull service on top of the BackupManager allowing to manage the backups and the restores.

Version:
$Id: BackupServer.java 111 2008-11-11 11:11:11Z rainf0x $
Author:
Alex Reshetnyak

Nested Class Summary
static class HTTPBackupAgent.Constants
          Definition the constants.
 
Constructor Summary
HTTPBackupAgent(RepositoryService repoService, BackupManager backupManager, SessionProviderService sessionProviderService)
          ReplicationTestService constructor.
 
Method Summary
 javax.ws.rs.core.Response dropWorkspace(String repository, String workspace, Boolean forceSessionClose)
          Drops a given workspace.
 javax.ws.rs.core.Response getDefaultRepositoryConfig()
          Gives the default repository configuration.
 javax.ws.rs.core.Response getDefaultWorkspaceConfig()
          Gives the default workspace configuration.
 javax.ws.rs.core.Response info()
          Gives info about the backup service.
 javax.ws.rs.core.Response infoBackup()
          Gives info about all the current and completed backups.
 javax.ws.rs.core.Response infoBackupByRepository(String repository)
          Gives info about all the current and completed backups of a specific repository.
 javax.ws.rs.core.Response infoBackupByWorkspace(String repository, String workspace)
          Gives info about all the current and completed backups of a specific workspace.
 javax.ws.rs.core.Response infoBackupCompleted()
          Gives info about all the completed backups.
 javax.ws.rs.core.Response infoBackupCurrent()
          Gives info about all the current backups.
 javax.ws.rs.core.Response infoBackupId(String id)
          Gives full details about the current or completed backup corresponding to the given id.
 javax.ws.rs.core.Response infoBackupRepository()
          Gives info about all the current and completed repository backups .
 javax.ws.rs.core.Response infoBackupRepositoryCompleted()
          Gives info about all the completed repository backups.
 javax.ws.rs.core.Response infoBackupRepositoryCurrent()
          Gives info about all the current repository backups.
 javax.ws.rs.core.Response infoBackupRepositoryId(String id)
          Gives full details about the current or completed repository backup corresponding to the given id.
 javax.ws.rs.core.Response infoRestore(String repository, String workspace)
          Gives all details about the last restore of a specific workspace.
 javax.ws.rs.core.Response infoRestoreRepository(String repository)
          Gives all details about the last restore of a specific repository.
 javax.ws.rs.core.Response infoRestores()
          Gives all details about the last restores.
 javax.ws.rs.core.Response infoRestoresRepository()
          Gives all details about the last repository restores.
 javax.ws.rs.core.Response restore(String backupId, Boolean removeExisting)
          Restores the workspace with original configuration (this configuration was stored in backup chain log).
 javax.ws.rs.core.Response restore(WorkspaceEntry wEntry, String repository, String backupId)
          Restores a workspace.
 javax.ws.rs.core.Response restore(WorkspaceEntry wEntry, String repository, String backupId, Boolean removeExisting)
          Restores a workspace.
 javax.ws.rs.core.Response restoreBackupSet(WorkspaceEntry wEntry, String repository, String backupSetPathEncoded, Boolean removeExisting)
          Restores the workspace from backup set with changing configuration.
 javax.ws.rs.core.Response restoreFromBackupSet(String backupSetPathEncoded, Boolean removeExisting)
          Restores the workspace or repository with original configuration (this configuration was stored in backup log).
 javax.ws.rs.core.Response restoreRepository(RepositoryEntry rEntry, String backupId)
          Restores a repository.
 javax.ws.rs.core.Response restoreRepository(RepositoryEntry rEntry, String backupId, Boolean removeExisting)
          Restores a repository.
 javax.ws.rs.core.Response restoreRepository(String backupId, Boolean removeExisting)
          Restores a repository.
 javax.ws.rs.core.Response restoreRepositoryBackupSet(RepositoryEntry rEntry, String backupSetPathEncoded, Boolean removeExisting)
          Restores a repository from backup set with changing configuration.
 javax.ws.rs.core.Response start(BackupConfigBean bConfigBean, String repository, String workspace)
          Starts a backup on a given workspace.
 javax.ws.rs.core.Response startBackupRepository(BackupConfigBean bConfigBean, String repository)
          Starts a backup on a given repository.
 javax.ws.rs.core.Response stop(String backupId)
          Stops the backup corresponding to the given id.
 javax.ws.rs.core.Response stopBackupRepository(String backupId)
          Stops the repository backup corresponding to the given id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPBackupAgent

public HTTPBackupAgent(RepositoryService repoService,
                       BackupManager backupManager,
                       SessionProviderService sessionProviderService)
ReplicationTestService constructor.

Parameters:
repoService - the RepositoryService
backupManager - the BackupManager
sessionProviderService - the SessionProviderService
Method Detail

start

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response start(BackupConfigBean bConfigBean,
                                                    String repository,
                                                    String workspace)
Starts a backup on a given workspace.

Parameters:
bConfigBean - the bean with backup configuration.
repository - the name of the repository
workspace - the name of the workspace
Returns:
Response return the response

startBackupRepository

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response startBackupRepository(BackupConfigBean bConfigBean,
                                                                    String repository)
Starts a backup on a given repository.

Parameters:
bConfigBean - the bean with backup configuration.
repository - the name of the repository
Returns:
Response return the response

dropWorkspace

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response dropWorkspace(String repository,
                                                            String workspace,
                                                            Boolean forceSessionClose)
Drops a given workspace.

Parameters:
repository - the name of the repository
workspace - the name of the workspace
forceSessionClose - the flag indicating whether or not we need to force closing the current sessions
Returns:
Response return the response

restore

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response restore(WorkspaceEntry wEntry,
                                                      String repository,
                                                      String backupId)
Restores a workspace.

Parameters:
wEntry - the configuration of the workspace to restore
repository - the name of the repository
backupId - the identifier of the backup
Returns:
Response return the response

restore

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response restore(WorkspaceEntry wEntry,
                                                      String repository,
                                                      String backupId,
                                                      Boolean removeExisting)
Restores a workspace.

Parameters:
wEntry - the configuration of the workspace to restore
repository - the name of the repository
backupId - the identifier of the backup
removeExisting - if 'true', it will remove fully (db, value storage, index) the existing workspace.
Returns:
Response return the response

restoreBackupSet

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response restoreBackupSet(WorkspaceEntry wEntry,
                                                               String repository,
                                                               String backupSetPathEncoded,
                                                               Boolean removeExisting)
Restores the workspace from backup set with changing configuration.

Parameters:
wEntry - the configuration of the workspace to restore
repository - the name of the repository
backupSetPathEncoded - the path to backup set
removeExisting - if 'true', it will remove fully (db, value storage, index) the existing workspace.
Returns:
Response return the response

restore

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response restore(String backupId,
                                                      Boolean removeExisting)
Restores the workspace with original configuration (this configuration was stored in backup chain log).

Parameters:
backupId - the identifier of the backup
removeExisting - if 'true', it will be remove fully (db, value storage, index) the existing workspace.
Returns:
Response return the response

restoreFromBackupSet

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response restoreFromBackupSet(String backupSetPathEncoded,
                                                                   Boolean removeExisting)
Restores the workspace or repository with original configuration (this configuration was stored in backup log).

Parameters:
backupSetPathEncoded - the path to backup set
removeExisting - if 'true', it will remove fully (db, value storage, index) the existing workspace.
Returns:
Response return the response

restoreRepository

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response restoreRepository(RepositoryEntry rEntry,
                                                                String backupId)
Restores a repository.

Parameters:
rEntry - the configuration of the repository to restore
backupId - the identifier of the backup
Returns:
Response return the response

restoreRepository

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response restoreRepository(RepositoryEntry rEntry,
                                                                String backupId,
                                                                Boolean removeExisting)
Restores a repository.

Parameters:
rEntry - the configuration of the repository to restore
backupId - the identifier of the backup
removeExisting - if 'true', it will remove fully (db, value storage, index) the existing repository.
Returns:
Response return the response

restoreRepositoryBackupSet

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response restoreRepositoryBackupSet(RepositoryEntry rEntry,
                                                                         String backupSetPathEncoded,
                                                                         Boolean removeExisting)
Restores a repository from backup set with changing configuration.

Parameters:
rEntry - the configuration of the repository to restore
backupSetPathEncoded - the path to backup set
removeExisting - if 'true', it will remove fully (db, value storage, index) the existing repository.
Returns:
Response return the response

restoreRepository

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response restoreRepository(String backupId,
                                                                Boolean removeExisting)
Restores a repository.

Parameters:
backupId - the identifier of the backup
removeExisting - if 'true', it will remove fully (db, value storage, index) the existing repository.
Returns:
Response return the response

stop

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response stop(String backupId)
Stops the backup corresponding to the given id.

Parameters:
backupId - the identifier of the backup
Returns:
Response return the response

stopBackupRepository

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response stopBackupRepository(String backupId)
Stops the repository backup corresponding to the given id.

Parameters:
backupId - the identifier of the backup
Returns:
Response return the response

info

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response info()
Gives info about the backup service.

Returns:
Response return the response

infoBackup

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackup()
Gives info about all the current and completed backups.

Returns:
Response return the response

infoBackupRepository

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackupRepository()
Gives info about all the current and completed repository backups .

Returns:
Response return the response

infoBackupId

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackupId(String id)
Gives full details about the current or completed backup corresponding to the given id.

Parameters:
id - the identifier of the backup
Returns:
Response return the response

infoBackupRepositoryId

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackupRepositoryId(String id)
Gives full details about the current or completed repository backup corresponding to the given id.

Parameters:
id - the identifier of the repository backup
Returns:
Response return the response

infoBackupCurrent

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackupCurrent()
Gives info about all the current backups.

Returns:
Response return the response

infoBackupRepositoryCurrent

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackupRepositoryCurrent()
Gives info about all the current repository backups.

Returns:
Response return the response

infoBackupCompleted

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackupCompleted()
Gives info about all the completed backups.

Returns:
Response return the response

infoBackupRepositoryCompleted

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackupRepositoryCompleted()
Gives info about all the completed repository backups.

Returns:
Response return the response

infoBackupByWorkspace

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackupByWorkspace(String repository,
                                                                    String workspace)
Gives info about all the current and completed backups of a specific workspace.

Parameters:
repository - the name of the repository
workspace - the name of the workspace
Returns:
Response return the response

infoBackupByRepository

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackupByRepository(String repository)
Gives info about all the current and completed backups of a specific repository.

Parameters:
repository - the name of the repository
Returns:
Response return the response

infoRestore

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoRestore(String repository,
                                                          String workspace)
Gives all details about the last restore of a specific workspace.

Parameters:
repository - the name of the repository
workspace - the name of the workspace
Returns:
Response return the response

infoRestoreRepository

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoRestoreRepository(String repository)
Gives all details about the last restore of a specific repository.

Parameters:
repository - the name of the repository
Returns:
Response return the response

infoRestores

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoRestores()
Gives all details about the last restores.

Returns:
Response return the response

infoRestoresRepository

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoRestoresRepository()
Gives all details about the last repository restores.

Returns:
Response return the response

getDefaultWorkspaceConfig

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response getDefaultWorkspaceConfig()
Gives the default workspace configuration.

Returns:
Response return the JSON to WorkspaceEntry

getDefaultRepositoryConfig

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response getDefaultRepositoryConfig()
Gives the default repository configuration.

Returns:
Response return the JSON to WorkspaceEntry

eXo JCR :: Component :: Extension Service 1.16.0-CR2

Copyright © 2014 eXo Platform SAS. All Rights Reserved.