Package dev.le_app.mcss_api_java
Class RunCommandsJob
java.lang.Object
dev.le_app.mcss_api_java.Job
dev.le_app.mcss_api_java.RunCommandsJob
Represents a 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 an array list of commands that the task executessetAction(ServerAction action) Set the new action to executesetBackupGUID(String backupGUID) Set the new backup to executesetCommands(String... commands) Update the commands to be executed by the task
-
Constructor Details
-
RunCommandsJob
Create a new job.- Parameters:
api- The API instance.GUID- The GUID of the server.TaskID- The ID of the task.
-
-
Method Details
-
getAction
Description copied from class:JobGet the action of the task. -
getCommands
public ArrayList<String> getCommands() throws APIUnauthorizedException, APINotFoundException, IOException, APIInvalidTaskDetailsExceptionGet an array list of commands that the task executes- Specified by:
getCommandsin classJob- Returns:
- ArrayList of commands
- Throws:
APIUnauthorizedException- if the API key is invalidAPINotFoundException- if the server is not foundIOException- if there is an IO error (e.g. server is offline)APIInvalidTaskDetailsException- if the task is not found
-
getBackupGUID
Description copied from class:JobGet 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
-
setAction
Description copied from class:JobSet the new action to execute -
setCommands
public Job setCommands(String... commands) throws APIUnauthorizedException, APINotFoundException, APIInvalidTaskDetailsException, IOException Update the commands to be executed by the task- Specified by:
setCommandsin classJob- Parameters:
commands- list of commands to be executed by the task- Returns:
- this.Job (used for concatenating)
- Throws:
APIUnauthorizedException- if the API key is invalidAPINotFoundException- if the server is not foundAPIInvalidTaskDetailsException- if the task is not foundIOException- if there is an IO error (e.g. server is offline)
-
setBackupGUID
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)
-