public class ConfigFileBackupTask extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BACKUP_STATE_FINISHED |
static int |
BACKUP_STATE_INITIALIZING |
static int |
BACKUP_STATE_INPROGRESS |
Constructor and Description |
---|
ConfigFileBackupTask(ConfigAuthentication authentication,
ConfigDataModel dataModel,
String target,
ConfigurationAuthority configurationAuthority)
Erstellt einen neuen ConfigFileBackupTask, welches keinerlei Fortschrittsmeldungen sendet.
|
ConfigFileBackupTask(ConfigAuthentication authentication,
ConfigDataModel dataModel,
String target,
ConfigurationAuthority configurationAuthority,
BackupProgressCallback callback)
Erstellt einen neuen ConfigFileBackupTask, welches den Fortschritt an ein lokales BackupProgressCallback-Objekt übergibt
|
ConfigFileBackupTask(ConfigAuthentication authentication,
ConfigDataModel dataModel,
String target,
ConfigurationAuthority configurationAuthority,
SenderReceiverCommunication senderReplyAreaTasks,
int queryIndex)
Erstellt einen neuen ConfigFileBackupTask, welches den Fortschritt über den Datenverteiler an ein RemoteRequester übermittelt
|
Modifier and Type | Method and Description |
---|---|
double |
getFileProgress()
Gibt den aktuellen Fortschritt der aktuellen Datei zurück
|
double |
getOverallProgress()
Gibt den aktuellen Gesamt-Fortschritt zurück
|
String |
getTargetPath()
Gibt das Zielverzeichnis zurück
|
void |
startAsync()
Startet einen Backup-Vorgang asynchron, wartet also nicht auf das Beenden.
|
BackupResult |
startSync()
Startet einen Backup-Vorgang und wartet auf das Beenden.
|
public static final int BACKUP_STATE_INITIALIZING
public static final int BACKUP_STATE_INPROGRESS
public static final int BACKUP_STATE_FINISHED
public ConfigFileBackupTask(ConfigAuthentication authentication, ConfigDataModel dataModel, String target, ConfigurationAuthority configurationAuthority, BackupProgressCallback callback) throws IOException
authentication
- Klasse von der die Benutzerverwaltung.xml gesichert werden solldataModel
- Lokale Konfigurationtarget
- Zielverzeichnis, welches innerhalb von ConfigDataModel.getBackupBaseDirectory()
angelegt werden soll.configurationAuthority
- Konfigurationsverantwortlicher, dessen Konfigurations-Dateien gesichert werden sollen. Falls null werden
alle Dateien gesichert.callback
- Objekt, das über den Fortschritt des Backup-Vorgangs informiert werden soll.IOException
- Wenn das angegebene target-Verzeichnis ungültig istpublic ConfigFileBackupTask(ConfigAuthentication authentication, ConfigDataModel dataModel, String target, ConfigurationAuthority configurationAuthority, SenderReceiverCommunication senderReplyAreaTasks, int queryIndex) throws IOException
authentication
- Klasse von der die Benutzerverwaltung.xml gesichert werden solldataModel
- Lokale Konfigurationtarget
- Zielverzeichnis, welches innerhalb von ConfigDataModel.getBackupBaseDirectory()
angelegt werden soll.configurationAuthority
- Konfigurationsverantwortlicher, dessen Konfigurations-Dateien gesichert werden sollen. Falls null werden
alle Dateien gesichert.senderReplyAreaTasks
- Verbindung mit dem RemoteRequestManagerqueryIndex
- Anfrageindex @throws IOException Wenn das angegebene target-Verzeichnis ungültig istIOException
public ConfigFileBackupTask(ConfigAuthentication authentication, ConfigDataModel dataModel, String target, ConfigurationAuthority configurationAuthority) throws IOException
authentication
- Klasse von der die Benutzerverwaltung.xml gesichert werden soll. Kann null sein, dann wird keine
Benutzerverwaltung gesichert.dataModel
- Lokale Konfigurationtarget
- Zielverzeichnis, welches innerhalb von ConfigDataModel.getBackupBaseDirectory()
angelegt werden soll. Falls null oder ein Leerstring angegeben wird, wird anhand des aktuellen Datums, der
Uhrzeit und/oder anderen nicht näher spezifizierten Mechanismen ein eindeutiges neues Verzeichnis
erstellt. Falls im ConfigDataModel kein Zielverzeichnis über ConfigDataModel.setBackupBaseDirectory(java.io.File)
festgelegt wurde kann jedes beliebige absolute oder relative Verzeichnis angegeben werden.configurationAuthority
- Konfigurationsverantwortlicher, dessen Konfigurations-Dateien gesichert werden sollen. Falls null werden
alle Dateien gesichert.IOException
- Wenn das angegebene target-Verzeichnis ungültig istpublic void startAsync()
public BackupResult startSync()
public double getFileProgress()
public double getOverallProgress()
public String getTargetPath()