com.h3c.sdn.adm.backup

## Class BackupRestoreComponent

- java.lang.Object
- - com.h3c.sdn.adm.backup.BackupRestoreComponent

- All Implemented Interfaces:
    BackupService

      @Service
      public class BackupRestoreComponent
      extends Object
      implements BackupService

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected AuditLogService` | `auditLogService`
    `protected BackupTransferService` | `bts`
    `protected SystemInformationService` | `systemInformationService`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BackupRestoreComponent()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `activate()`
    `protected void` | `bindAdminRest(AdminRest s)` Hook for notification of available `AdminRest` via declarative services which handles alert notifications.
    `protected void` | `bindAuditLogService(AuditLogService service)` Hook for binding to an implementation of the `AuditLogService` via declarative services.
    `protected void` | `bindBackupTransferService(BackupTransferService srv)` Hook for binding to an implementation of the `BackupTransferService` via OSGi declarative services.
    `protected void` | `bindSystemInformationService(SystemInformationService srv)` Hook for binding to an implementation of the `SystemInformationService` via declarative services.
    `protected void` | `bindTaskExecutorService(TaskExecutorService service)` Hook for binding to an implementation of the `TaskExecutorService` via declarative services.
    `void` | `deactivate()`
    `File` | `downloadBackup(String systemId, boolean csum, Authentication auth)` Download backup to a safe location
    `BackupStatus` | `getBackupStatus(Token token, Authentication auth)` Get backup status.
    `BackupInformation` | `getLastRestoreInformation(String systemId, Authentication auth)` Get last restore information.
    `protected void` | `setDelegateService(BackupService backupService)`
    `Token` | `startSystemBackup(String systemId, Authentication auth)` Backup controller system.
    `Token` | `startSystemRestore(String systemId, Authentication auth)` Restore controller system.
    `protected void` | `unbindAdminRest(AdminRest s)` Hook for notification of removal of `AdminRest` via declarative services.
    `protected void` | `unbindAuditLogService(AuditLogService service)` Hook for removing the binding to the deactivated `AuditLogService` via declarative services.
    `protected void` | `unbindBackupTransferService(BackupTransferService srv)` Hook for removing the binding to the deactivated `BackupTransferService` via declarative services.
    `protected void` | `unbindSystemInformationService(SystemInformationService srv)` Hook for removing the binding to the deactivated `SystemInformationService` via declarative services.
    `protected void` | `unbindTaskExecutorService(TaskExecutorService service)` Hook for removing the binding to the deactivated `TaskExecutorService` via declarative services.
    `void` | `uploadBackup(String filename, InputStream in, String systemId, Authentication auth)` Upload backup to a URL.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### systemInformationService

          @Reference(policy=DYNAMIC,
                     cardinality=OPTIONAL_UNARY)
          protected volatile SystemInformationService systemInformationService

    - #### auditLogService

          @Reference(policy=DYNAMIC,
                     cardinality=OPTIONAL_UNARY)
          protected volatile AuditLogService auditLogService

    - #### bts

          @Reference(name="BackupTransferService",
                     policy=DYNAMIC,
                     cardinality=OPTIONAL_UNARY)
          protected volatile BackupTransferService bts

  - ### Constructor Detail

    - #### BackupRestoreComponent

          public BackupRestoreComponent()

  - ### Method Detail

    - #### activate

          @Activate
          public void activate()

    - #### deactivate

          @Deactivate
          public void deactivate()

    - #### bindTaskExecutorService

          protected void bindTaskExecutorService(TaskExecutorService service)

      Hook for binding to an implementation of the `TaskExecutorService` via declarative services.
      Parameters:
        `service` - newly advertised service

    - #### unbindTaskExecutorService

          protected void unbindTaskExecutorService(TaskExecutorService service)

      Hook for removing the binding to the deactivated `TaskExecutorService` via declarative services.
      Parameters:
        `service` - deactivated service

    - #### bindSystemInformationService

          protected void bindSystemInformationService(SystemInformationService srv)

      Hook for binding to an implementation of the `SystemInformationService` via declarative services.
      Parameters:
        `srv` - newly advertised service

    - #### unbindSystemInformationService

          protected void unbindSystemInformationService(SystemInformationService srv)

      Hook for removing the binding to the deactivated `SystemInformationService` via declarative services.
      Parameters:
        `srv` - deactivated service

    - #### bindAuditLogService

          protected void bindAuditLogService(AuditLogService service)

      Hook for binding to an implementation of the `AuditLogService` via declarative services.
      Parameters:
        `service` - newly advertised service

    - #### unbindAuditLogService

          protected void unbindAuditLogService(AuditLogService service)

      Hook for removing the binding to the deactivated `AuditLogService` via declarative services.
      Parameters:
        `service` - deactivated service

    - #### bindBackupTransferService

          protected void bindBackupTransferService(BackupTransferService srv)

      Hook for binding to an implementation of the `BackupTransferService` via OSGi declarative services.
      Parameters:
        `srv` - the newly advertised service to register

    - #### unbindBackupTransferService

          protected void unbindBackupTransferService(BackupTransferService srv)

      Hook for removing the binding to the deactivated `BackupTransferService` via declarative services.
      Parameters:
        `srv` - deactivated service

    - #### bindAdminRest

          protected void bindAdminRest(AdminRest s)

      Hook for notification of available `AdminRest` via declarative services which handles alert notifications.
      Parameters:
        `s` - newly advertised service

    - #### unbindAdminRest

          protected void unbindAdminRest(AdminRest s)

      Hook for notification of removal of `AdminRest` via declarative services.
      Parameters:
        `s` - deactivated service

    - #### setDelegateService

          protected void setDelegateService(BackupService backupService)

    - #### startSystemBackup

          public Token startSystemBackup(String systemId,
                                Authentication auth)

      Description copied from interface: `BackupService`
      Backup controller system.
      Specified by:
        `startSystemBackup` in interface `BackupService`
      Parameters:
        `systemId` - the system unique Id
        `auth` - the authentication record for the user that invoked this method
      Returns:
        Token instance

    - #### getBackupStatus

          public BackupStatus getBackupStatus(Token token,
                                     Authentication auth)

      Description copied from interface: `BackupService`
      Get backup status.
      Specified by:
        `getBackupStatus` in interface `BackupService`
      Parameters:
        `token` - Token instance
        `auth` - the authentication record for the user that invoked this method
      Returns:
        BackupStatus instance

    - #### downloadBackup

          public File downloadBackup(String systemId,
                            boolean csum,
                            Authentication auth)

      Description copied from interface: `BackupService`
      Download backup to a safe location
      Specified by:
        `downloadBackup` in interface `BackupService`
      Parameters:
        `systemId` - the unique system id
        `csum` - set to true to download the checksum
        `auth` - the authentication record for the user that invoked this method
      Returns:
        the output stream for the backup/checksum file

    - #### uploadBackup

          public void uploadBackup(String filename,
                          InputStream in,
                          String systemId,
                          Authentication auth)

      Description copied from interface: `BackupService`
      Upload backup to a URL.
      Specified by:
        `uploadBackup` in interface `BackupService`
      Parameters:
        `filename` - filename
        `in` - the input stream
        `systemId` - the unique system id
        `auth` - the authentication record for the user that invoked this method

    - #### startSystemRestore

          public Token startSystemRestore(String systemId,
                                 Authentication auth)

      Description copied from interface: `BackupService`
      Restore controller system.
      Specified by:
        `startSystemRestore` in interface `BackupService`
      Parameters:
        `systemId` - the unique system id
        `auth` - the authentication record for the user that invoked this method
      Returns:
        Token instance

    - #### getLastRestoreInformation

          public BackupInformation getLastRestoreInformation(String systemId,
                                                    Authentication auth)

      Description copied from interface: `BackupService`
      Get last restore information.
      Specified by:
        `getLastRestoreInformation` in interface `BackupService`
      Parameters:
        `systemId` - the unique system id
        `auth` - the authentication record for the user that invoked this method
      Returns:
        BackupInformation instance

Copyright © 2014. All Rights Reserved.