Package dev.le_app.mcss_api_java
Class BackupJob
java.lang.Object
dev.le_app.mcss_api_java.Job
dev.le_app.mcss_api_java.BackupJob
Represents a backup job.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the action of the task.Get the Backup ID of the backup executed by the taskGet the commands of the task.setAction(ServerAction action) Set the new action to executesetBackupGUID(String backupGUID) Set the new backup to executesetCommands(String... commands) Set the new commands to execute
-
Constructor Details
-
BackupJob
Constructs a new BackupJob.- Parameters:
api- instance of MCSSApiGUID- GUID of the backup jobTaskID- TaskID of the backup job
-
-
Method Details
-
getAction
public ServerAction getAction() throws APIUnauthorizedException, APINotFoundException, IOException, APIInvalidTaskDetailsExceptionDescription copied from class:JobGet the action of the task.- Specified by:
getActionin classJob- Returns:
- The action of the task.
- Throws:
APIUnauthorizedException- If the API key is not valid.APINotFoundException- If the server is not found.IOException- If there is an IO error (e.g. server is offline).APIInvalidTaskDetailsException- If the task details are invalid.
-
getCommands
public ArrayList<String> getCommands() throws APIUnauthorizedException, APINotFoundException, IOException, APIInvalidTaskDetailsExceptionDescription copied from class:JobGet the commands of the task.- Specified by:
getCommandsin classJob- Returns:
- The commands of the task.
- Throws:
APIUnauthorizedException- If the API key is not valid.APINotFoundException- If the server is not found.IOException- If there is an IO error (e.g. server is offline).APIInvalidTaskDetailsException- If the task details are invalid.
-
getBackupGUID
Get the Backup ID of the backup executed by the task- Specified by:
getBackupGUIDin classJob- Returns:
- The Backup ID of the backup executed by the task
- Throws:
APIUnauthorizedException- If the API key is not valid.APINotFoundException- If the server is not found.IOException- If there is an IO error (e.g. server is offline).
-
setAction
public Job setAction(ServerAction action) throws APIUnauthorizedException, APINotFoundException, APIInvalidTaskDetailsException, IOException Description copied from class:JobSet the new action to execute- Specified by:
setActionin classJob- Parameters:
action- The new action to execute- Returns:
- this.Job (used for concatenating)
- Throws:
APIUnauthorizedException- If the API key is not valid.APINotFoundException- If the server is not found.APIInvalidTaskDetailsException- If the task details are invalid.IOException- If there is an IO error (e.g. server is offline).
-
setCommands
public Job setCommands(String... commands) throws APIUnauthorizedException, APINotFoundException, APIInvalidTaskDetailsException, IOException Description copied from class:JobSet the new commands to execute- Specified by:
setCommandsin classJob- Parameters:
commands- The new commands to execute- Returns:
- this.Job (used for concatenating)
- Throws:
APIUnauthorizedException- If the API key is not valid.APINotFoundException- If the server is not found.APIInvalidTaskDetailsException- If the task details are invalid.IOException- If there is an IO error (e.g. server is offline).
-
setBackupGUID
public Job setBackupGUID(String backupGUID) throws APIUnauthorizedException, APINotFoundException, IOException, APIInvalidTaskDetailsException Description copied from class:JobSet the new backup to execute- Specified by:
setBackupGUIDin classJob- Parameters:
backupGUID- The new backup to execute- Returns:
- this.Job (used for concatenating)
- Throws:
APIUnauthorizedException- If the API key is not valid.APINotFoundException- If the server is not found.IOException- If there is an IO error (e.g. server is offline).APIInvalidTaskDetailsException- If the task details are invalid.
-