Class ListManager

java.lang.Object
com.sun.enterprise.backup.ListManager

public class ListManager extends Object
This class is responsible for returning information about backups. It opens each backup zip file and examines the properties file for the information that was stored when the backup was performed. It returns all this information to CLI as a String.
Author:
bnevins
  • Constructor Details

    • ListManager

      public ListManager(BackupRequest req) throws BackupException, BackupWarningException
      Creates an instance of ListManager. The superclass will call init() so it is possible for Exceptions to be thrown.
      Parameters:
      req - The BackupRequest instance with required information.
      Throws:
      BackupException - if there is a fatal error with the BackupRequest object.
      BackupWarningException - if there is a non-fatal error with the BackupRequest object.
  • Method Details

    • list

      public String list() throws BackupException
      Find all backup zip files in a domain and return a String summarizing information about the backup. The summary is shorter if the "terse" option is true.
      Returns:
      a String summary
      Throws:
      BackupException - if there is a fatal error
    • getBackupDirectory

      protected File getBackupDirectory(BackupRequest request)
      If both the backupDir and backupConfig are not set then this method behaves as it did in v2. It returns a path to the domainDir + BACKUP_DIR (backups). If a backupConfig has been associated with the request and the backupDir is not set then it returns a path to domainDir + backupConfig. If a backupConfig has been associated with the request and the backupDir is set then it returns a path to backupDir + domainName + backupConfig. If a backupConfig has not been associated with the request and the backupDir is set then it returns a path to backupDir + domainName.