eXo JCR :: Component :: Extension Service 1.15.1-CP01

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.
Date: 24.02.2009

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, ThreadLocalSessionProviderService sessionProviderService)
          ReplicationTestService constructor.
 
Method Summary
 javax.ws.rs.core.Response dropWorkspace(String repository, String workspace, Boolean forceSessionClose)
          The delete workspace.
 javax.ws.rs.core.Response getDefaultRepositoryConfig()
          Will be returned the default repository configuration.
 javax.ws.rs.core.Response getDefaultWorkspaceConfig()
          Will be returned the default workspace configuration.
 javax.ws.rs.core.Response info()
          Will be returned the backup service info.
 javax.ws.rs.core.Response infoBackup()
          Will be returned the list short info of current and completed backups .
 javax.ws.rs.core.Response infoBackupByRepository(String repository)
          Will be returned the list short info of current and completed backups.
 javax.ws.rs.core.Response infoBackupByWorkspace(String repository, String workspace)
          Will be returned the list short info of current and completed backups.
 javax.ws.rs.core.Response infoBackupCompleted()
          Will be returned the list short info of completed backups .
 javax.ws.rs.core.Response infoBackupCurrent()
          Will be returned the list short info of current backups .
 javax.ws.rs.core.Response infoBackupId(String id)
          Will be returned the detailed info of current or completed backup by 'id'.
 javax.ws.rs.core.Response infoBackupRepository()
          Will be returned the list short info of current and completed repository backups .
 javax.ws.rs.core.Response infoBackupRepositoryCompleted()
          Will be returned the list short info of completed backups .
 javax.ws.rs.core.Response infoBackupRepositoryCurrent()
          Will be returned the list short info of current backups .
 javax.ws.rs.core.Response infoBackupRepositoryId(String id)
          Will be returned the detailed info of current or completed repository backup by 'id'.
 javax.ws.rs.core.Response infoRestore(String repository, String workspace)
          Will be returned the detailed information about last restore for specific workspace.
 javax.ws.rs.core.Response infoRestoreRepository(String repository)
          Will be returned the detailed information about last restore for specific repository.
 javax.ws.rs.core.Response infoRestores()
          Will be returned the detailed information about last restores.
 javax.ws.rs.core.Response infoRestoresRepository()
          Will be returned the detailed information about last restores.
 javax.ws.rs.core.Response restore(String backupId, Boolean removeExisting)
          Restore 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)
          Restore the workspace.
 javax.ws.rs.core.Response restore(WorkspaceEntry wEntry, String repository, String backupId, Boolean removeExisting)
          Restore the workspace.
 javax.ws.rs.core.Response restoreBackupSet(WorkspaceEntry wEntry, String repository, String backupSetPathEncoded, Boolean removeExisting)
          Restore the workspace from backup set with changing configuration (WorkspaceEntry).
 javax.ws.rs.core.Response restoreFromBackupSet(String backupSetPathEncoded, Boolean removeExisting)
          Restore the workspace or repository with original configuration (this configuration was stored in backup log).
 javax.ws.rs.core.Response restoreRepository(RepositoryEntry rEntry, String backupId)
          Restore the repository.
 javax.ws.rs.core.Response restoreRepository(RepositoryEntry rEntry, String backupId, Boolean removeExisting)
          Restore the repository.
 javax.ws.rs.core.Response restoreRepository(String backupId, Boolean removeExisting)
          Restore the repository.
 javax.ws.rs.core.Response restoreRepositoryBackupSet(RepositoryEntry rEntry, String backupSetPathEncoded, Boolean removeExisting)
          Restore the repository from backup set with changing configuration (RepositoryEntry).
 javax.ws.rs.core.Response start(BackupConfigBean bConfigBeen, String repository, String workspace)
          The start backup.
 javax.ws.rs.core.Response startBackupRepository(BackupConfigBean bConfigBeen, String repository)
          The start repository backup.
 javax.ws.rs.core.Response stop(String backupId)
          The backup stop by 'id'.
 javax.ws.rs.core.Response stopBackupRepository(String backupId)
          The repository backup stop by '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,
                       ThreadLocalSessionProviderService sessionProviderService)
ReplicationTestService constructor.

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

start

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response start(BackupConfigBean bConfigBeen,
                                                    String repository,
                                                    String workspace)
The start backup.

Parameters:
bConfigBeen - BackupConfigBeen, the been with backup configuration.
repository - String, the repository name
workspace - String, the workspace name
Returns:
Response return the response

startBackupRepository

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response startBackupRepository(BackupConfigBean bConfigBeen,
                                                                    String repository)
The start repository backup.

Parameters:
bConfigBeen - BackupConfigBeen, the been with backup configuration.
repository - String, the repository name
Returns:
Response return the response

dropWorkspace

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

Parameters:
repository - String, the repository name
workspace - String, the workspace name
forceSessionClose - Boolean, flag to force session close
Returns:
Response return the response

restore

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

Parameters:
wEntry - WorkspaceEntry, the configuration to restored workspace
repository - String, the repository name
backupId - String, the identifier of 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)
Restore the workspace.

Parameters:
wEntry - WorkspaceEntry, the configuration to restored workspace
repository - String, the repository name
backupId - String, the identifier of backup
removeExisting - Boolean, if 'true' will be removed fully (db, value storage, index) existed 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)
Restore the workspace from backup set with changing configuration (WorkspaceEntry).

Parameters:
wEntry - WorkspaceEntry, the configuration to restored workspace
repository - String, the repository name
backupSetPath - String, the path to backup set
removeExisting - Boolean, if 'true' will be removed fully (db, value storage, index) existed workspace.
Returns:
Response return the response

restore

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

Parameters:
repository - String, the repository name
backupId - String, the identifier of backup
removeExisting - Boolean, if 'true' will be removed fully (db, value storage, index) existed workspace.
Returns:
Response return the response

restoreFromBackupSet

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

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

restoreRepository

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

Parameters:
rEntry - RepositoryEntry, the configuration to restored repository
repository - String, the repository name
backupId - String, the identifier of backup
Returns:
Response return the response

restoreRepository

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

Parameters:
rEntry - RepositoryEntry, the configuration to restored repository
repository - String, the repository name
backupId - String, the identifier of backup
removeExisting - Boolean, if 'true' will be removed fully (db, value storage, index) existed repository.
Returns:
Response return the response

restoreRepositoryBackupSet

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

Parameters:
rEntry - RepositoryEntry, the configuration to restored repository
repository - String, the repository name
backupSetPath - String, the path to backup set
removeExisting - Boolean, if 'true' will be removed fully (db, value storage, index) existed repository.
Returns:
Response return the response

restoreRepository

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

Parameters:
backupId - String, the identifier of backup
removeExisting - Boolean, if 'true' will be removed fully (db, value storage, index) existed repository.
Returns:
Response return the response

stop

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response stop(String backupId)
The backup stop by 'id'.

Parameters:
backupId - String, the identifier to backup
Returns:
Response return the response

stopBackupRepository

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response stopBackupRepository(String backupId)
The repository backup stop by 'id'.

Parameters:
backupId - String, the identifier to backup
Returns:
Response return the response

info

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response info()
Will be returned the backup service info.

Returns:
Response return the response

infoBackup

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackup()
Will be returned the list short info of current and completed backups .

Returns:
Response return the response

infoBackupRepository

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackupRepository()
Will be returned the list short info of current and completed repository backups .

Returns:
Response return the response

infoBackupId

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackupId(String id)
Will be returned the detailed info of current or completed backup by 'id'.

Parameters:
id - String, the identifier to backup
Returns:
Response return the response

infoBackupRepositoryId

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackupRepositoryId(String id)
Will be returned the detailed info of current or completed repository backup by 'id'.

Parameters:
id - String, the identifier to repository backup
Returns:
Response return the response

infoBackupCurrent

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackupCurrent()
Will be returned the list short info of current backups .

Returns:
Response return the response

infoBackupRepositoryCurrent

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackupRepositoryCurrent()
Will be returned the list short info of current backups .

Returns:
Response return the response

infoBackupCompleted

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackupCompleted()
Will be returned the list short info of completed backups .

Returns:
Response return the response

infoBackupRepositoryCompleted

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackupRepositoryCompleted()
Will be returned the list short info of completed backups .

Returns:
Response return the response

infoBackupByWorkspace

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackupByWorkspace(String repository,
                                                                    String workspace)
Will be returned the list short info of current and completed backups. Filtered by specific workspace.

Parameters:
repository - String, the repository name
workspace - String, the workspace name
Returns:
Response return the response

infoBackupByRepository

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoBackupByRepository(String repository)
Will be returned the list short info of current and completed backups. Filtered by specific repository.

Parameters:
repository - String, the repository name
Returns:
Response return the response

infoRestore

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoRestore(String repository,
                                                          String workspace)
Will be returned the detailed information about last restore for specific workspace.

Parameters:
repository - String, the repository name
workspace - String, the workspace name
Returns:
Response return the response

infoRestoreRepository

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoRestoreRepository(String repository)
Will be returned the detailed information about last restore for specific repository.

Parameters:
repository - String, the repository name
Returns:
Response return the response

infoRestores

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoRestores()
Will be returned the detailed information about last restores.

Returns:
Response return the response

infoRestoresRepository

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response infoRestoresRepository()
Will be returned the detailed information about last restores.

Returns:
Response return the response

getDefaultWorkspaceConfig

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

Returns:
Response return the JSON to WorkspaceEntry

getDefaultRepositoryConfig

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

Returns:
Response return the JSON to WorkspaceEntry

eXo JCR :: Component :: Extension Service 1.15.1-CP01

Copyright © 2013 eXo Platform SAS. All Rights Reserved.