public class BackupInstanceFramework
extends java.lang.Object
BackupInstance
constructor
needs to create a new instance for the
BackupManager
.
Modifier and Type | Field and Description |
---|---|
private boolean |
mCreateNewBackup
Specifies whether a new backup supposed to be created or not.
|
private java.lang.String |
mDeleteName
The name of the backup that is to be deleted.
|
private java.nio.file.Path |
mDirBackup
Path to the backup directory. |
private java.nio.file.Path |
mDirOriginal
Path to the original directory. |
private boolean |
mKeepAll
Specifies whether the user wants to keep all backed files
in the backup directory synchronization or not.
|
private boolean |
mList
Specifies whether the user wants to see the listing of backups or not.
|
private java.lang.String |
mName
The backup name.
|
private boolean |
mShallow
Specifies whether the user wants the newly created backup to be shallow or not.
|
private boolean |
mSync
Specifies whether the user wants backup synchronization or not.
|
Constructor and Description |
---|
BackupInstanceFramework() |
BackupInstanceFramework(net.sourceforge.argparse4j.inf.Namespace args)
The
BackupInstanceFramework constructor. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBackupName() |
java.lang.String |
getDeleteName() |
java.nio.file.Path |
getDirBackup() |
java.nio.file.Path |
getDirOriginal() |
private void |
parseLocations(net.sourceforge.argparse4j.inf.Namespace args)
Checks whether the user input via command line is valid.
|
void |
setName(java.lang.String mName) |
void |
setOptions(java.nio.file.Path original,
java.nio.file.Path backup,
java.lang.String name,
java.lang.String delete_name,
boolean keep_all,
boolean shallow,
boolean create,
boolean list,
boolean sync)
This method allows to set the
BackupInstanceFramework
properties manually. |
boolean |
wantsCreateNewBackup() |
boolean |
wantsKeepAll() |
boolean |
wantsList() |
boolean |
wantsShallow() |
boolean |
wantsSynchronization() |
private java.nio.file.Path mDirOriginal
Path
to the original directory.private java.nio.file.Path mDirBackup
Path
to the backup directory.private boolean mCreateNewBackup
private boolean mList
private boolean mShallow
private boolean mSync
private boolean mKeepAll
private java.lang.String mName
private java.lang.String mDeleteName
public BackupInstanceFramework()
public BackupInstanceFramework(net.sourceforge.argparse4j.inf.Namespace args)
BackupInstanceFramework
constructor.
It takes an instance of the Namespace
class implemented by the argparse4j
library
and uses it to create the BackupInstanceFramework
for the creation
of a BackupInstance
object.args
- an instance of the Namespace
class
that represents the command line arguments passed by the userpublic void setOptions(java.nio.file.Path original, java.nio.file.Path backup, java.lang.String name, java.lang.String delete_name, boolean keep_all, boolean shallow, boolean create, boolean list, boolean sync)
BackupInstanceFramework
properties manually. It is used by the GUI.original
- original pathbackup
- backup directoryname
- backup namedelete_name
- name of the backup that should be deletedkeep_all
- the value of mKeepAll
shallow
- the value of mShallow
create
- the value of mCreateNewBackup
list
- the value of mList
sync
- the value of mSync
private void parseLocations(net.sourceforge.argparse4j.inf.Namespace args)
args
- the arguments passed from the command line in the
form of Namespace
instance.public java.nio.file.Path getDirOriginal()
public java.nio.file.Path getDirBackup()
public boolean wantsCreateNewBackup()
public boolean wantsList()
public boolean wantsShallow()
public boolean wantsKeepAll()
public boolean wantsSynchronization()
public java.lang.String getBackupName()
public java.lang.String getDeleteName()
public void setName(java.lang.String mName)