Class BackupConfig
java.lang.Object
com.pranavpandey.android.dynamic.backup.BackupConfig
- All Implemented Interfaces:
Parcelable
Backup configuration to create or restore a backup.
-
Nested Class Summary
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Parcelable.Creator<BackupConfig>
Parcelable creator to create from parcel.Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
Constructor Summary
ConstructorsConstructorDescriptionBackupConfig
(int type, File file, boolean delete) Constructor to initialize an object of this class.BackupConfig
(int type, File file, String name) Constructor to initialize an object of this class.BackupConfig
(Parcel in) Read an object of this class from the parcel.BackupConfig
(String name, int location) Constructor to initialize an object of this class.BackupConfig
(String name, int type, int location, File file, boolean delete) Constructor to initialize an object of this class. -
Method Summary
Modifier and TypeMethodDescriptionint
getFile()
Get the file for the backup.int
Get the location for the backup.getName()
Get the name for the backup.int
getType()
Get the type for the backup.boolean
isDelete()
Returns whether to delete the backup file after performing the restore operation.void
writeToParcel
(Parcel dest, int flags)
-
Field Details
-
CREATOR
Parcelable creator to create from parcel.
-
-
Constructor Details
-
BackupConfig
Constructor to initialize an object of this class.- Parameters:
name
- The name for the backup.location
- The location for the backup.
-
BackupConfig
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
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
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 interfaceParcelable
-
writeToParcel
- Specified by:
writeToParcel
in interfaceParcelable
-
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
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.
-