Class BackupConfig

java.lang.Object
com.pranavpandey.android.dynamic.backup.BackupConfig
All Implemented Interfaces:
Parcelable

public class BackupConfig extends Object implements Parcelable
Backup configuration to create or restore a backup.
  • Field Details

  • Constructor Details

    • BackupConfig

      public BackupConfig(@Nullable String name, int location)
      Constructor to initialize an object of this class.
      Parameters:
      name - The name for the backup.
      location - The location for the backup.
    • BackupConfig

      public BackupConfig(int type, @Nullable File file, boolean delete)
      Constructor to initialize an object of this class.
      Parameters:
      type - The type for the backup.
      file - The file for the backup.
      delete - true to delete the backup file after performing the restore operation.
    • BackupConfig

      public BackupConfig(int type, @Nullable File file, @Nullable String name)
      Constructor to initialize an object of this class.
      Parameters:
      type - The type for the backup.
      file - The file for the backup.
      name - The name for the backup.
    • BackupConfig

      public BackupConfig(@Nullable String name, int type, int location, @Nullable File file, boolean delete)
      Constructor to initialize an object of this class.
      Parameters:
      name - The name for the backup.
      type - The type for the backup.
      location - The location for the backup.
      file - The file for the backup.
      delete - true to delete the backup file after performing the restore operation.
    • BackupConfig

      public BackupConfig(@NonNull Parcel in)
      Read an object of this class from the parcel.
      Parameters:
      in - The parcel to read the values.
  • Method Details

    • describeContents

      public int describeContents()
      Specified by:
      describeContents in interface Parcelable
    • writeToParcel

      public void writeToParcel(Parcel dest, int flags)
      Specified by:
      writeToParcel in interface Parcelable
    • getName

      @Nullable public String getName()
      Get the name for the backup.
      Returns:
      The name for the backup.
    • getType

      public int getType()
      Get the type for the backup.
      Returns:
      The type for the backup.
    • getLocation

      public int getLocation()
      Get the location for the backup.
      Returns:
      The location for the backup.
    • getFile

      @Nullable public File getFile()
      Get the file for the backup.
      Returns:
      The file for the backup.
    • isDelete

      public boolean isDelete()
      Returns whether to delete the backup file after performing the restore operation.
      Returns:
      true to delete the backup file after performing the restore operation.