Package dev.botcity.maestro_sdk
Class BotMaestroSDK
java.lang.Object
dev.botcity.maestro_sdk.BotMaestroSDK
- All Implemented Interfaces:
IFunctionService
-
Field Summary
Modifier and TypeFieldDescriptiondev.botcity.api.client.login.GetToken
boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateCredential
(String credentialLabel, String key, String value) createError
(Integer taskId, Exception exception, File fileScreenshot, Map<String, Object> tags, List<File> fileAttachmentList) createTask
(String label, Map<String, Object> params) createTask
(String label, Map<String, Object> params, boolean taskToTest) finishTask
(String taskId, AutomationTask.FinishStatus status) finishTask
(String taskId, String finishMessage, AutomationTask.FinishStatus finishStatus) byte[]
getArtifactFile
(String artifactId) byte[]
getLogFile
(String logId, Integer days) interruptTask
(String taskId) ATTENTION: By default, we return 10 recordsvoid
login
(BotExecution execution) void
message
(List<String> email, List<String> users, String subject, String body, MessageType messageType, String group) Deprecated.newLogEntry
(String logId, Object[][] columns) newLogEntry
(String logId, Map<String, Object> columns) postArtifact
(String taskId, String artifactName, File artifactFile) restartTask
(String taskId)
-
Field Details
-
ignoreSSL
public boolean ignoreSSL -
server
-
accessToken
public dev.botcity.api.client.login.GetToken accessToken
-
-
Constructor Details
-
BotMaestroSDK
public BotMaestroSDK()
-
-
Method Details
-
login
-
login
-
getTask
- Specified by:
getTask
in interfaceIFunctionService
- Parameters:
taskId
- Task ID- Returns:
- AutomationTask with all attributes of the task.
- Required Parameters:
- (taskId)
-
interruptTask
- Specified by:
interruptTask
in interfaceIFunctionService
- Parameters:
taskId
- Task ID- Returns:
- AutomationTask with all attributes of the task.
- Required Parameters:
- (taskId)
-
restartTask
- Specified by:
restartTask
in interfaceIFunctionService
- Parameters:
taskId
- Task ID- Returns:
- AutomationTask with all attributes of the task.
- Required Parameters:
- (taskId)
-
finishTask
public AutomationTask finishTask(String taskId, String finishMessage, AutomationTask.FinishStatus finishStatus) - Specified by:
finishTask
in interfaceIFunctionService
- Parameters:
taskId
- Task IDfinishMessage
- optional task termination messagefinishStatus
- SUCCESS, FAILED, PARTIALLY_COMPLETED- Returns:
- AutomationTask with all attributes of the task.
- Required Parameters:
- (taskId, finishStatus)
-
finishTask
- Parameters:
taskId
- iTask IDstatus
- SUCCESS, FAILED, PARTIALLY_COMPLETED- Returns:
- AutomationTask with all attributes of the task.
- Required Parameters:
- (taskId, finishStatus)
-
listTasks
- Specified by:
listTasks
in interfaceIFunctionService
- Returns:
- PageTaskVO with the content(List
) with the first 10 lines of page 1.
-
listTasks
ATTENTION: By default, we return 10 records- Specified by:
listTasks
in interfaceIFunctionService
- Parameters:
page
- page number in the listing.- Returns:
- PageTaskVO with the content(List
) with all attributes of the task. - Required Parameters:
- (page)
-
createTask
- Specified by:
createTask
in interfaceIFunctionService
- Parameters:
label
- Labelparams
- parameter map.taskToTest
- boolean informing if it is a test task.- Returns:
- AutomationTask with all attributes of the task.
- Required Parameters:
- (label)
-
createTask
- Parameters:
label
- Labelparams
- parameter map.- Returns:
- AutomationTask with all attributes of the task.
- Required Parameters:
- (label)
-
newLogEntry
- Specified by:
newLogEntry
in interfaceIFunctionService
- Parameters:
logId
- Log Idcolumns
- hasMap of Log Entry columns- Returns:
- ResponseData (message, statusCode).
- Required Parameters:
- (logId, columns)
-
newLogEntry
- Parameters:
logId
- ID of the Log Entrycolumns
- Object[][] of Log Entry columns- Returns:
- ResponseData (message, statusCode).
- Required Parameters:
- (logId, columns)
-
getLogFile
- Specified by:
getLogFile
in interfaceIFunctionService
- Parameters:
logId
- Log IDdays
- number of days- Returns:
- Data byte[]
- Required Parameters:
- (logId, days)
-
newLog
- Specified by:
newLog
in interfaceIFunctionService
- Parameters:
label
- Labelcolumns
- list of log columns- Returns:
- LogSchemaVO with all the log attributes.
- Required Parameters:
- (label, columns)
-
getLog
- Specified by:
getLog
in interfaceIFunctionService
- Parameters:
logId
- Log IDdays
- number of days- Returns:
- List containing the hasmap.
- Required Parameters:
- (logId, days)
-
deleteLog
- Specified by:
deleteLog
in interfaceIFunctionService
- Parameters:
label
- Label- Returns:
- ResponseData (message, statusCode).
- Required Parameters:
- (label)
-
postArtifact
- Specified by:
postArtifact
in interfaceIFunctionService
- Parameters:
taskId
- Task IDartifactName
- Artifact NameartifactFile
- Artifact File- Returns:
- ResponseData (message, statusCode).
- Required Parameters:
- (taskId, artifactName, artifactFile)
-
getArtifactFile
- Specified by:
getArtifactFile
in interfaceIFunctionService
- Parameters:
artifactId
- Artifact ID- Returns:
- Data byte[]
- Required Parameters:
- (artifactId)
-
listArtifact
- Specified by:
listArtifact
in interfaceIFunctionService
- Returns:
- ArtifactVO list with all attributes of the Artifact.
-
alert
- Specified by:
alert
in interfaceIFunctionService
- Parameters:
title
- Titlemessage
- MessagealertType
- INFO, WARN, ERROR- Returns:
- AlertVO with all attributes of the Alert.
- Required Parameters:
- (taskId, title, message, alertType)
-
message
public ResponseData message(List<String> email, List<String> users, String subject, String body, MessageType messageType, String group) Deprecated.As of VERSION 1.2.3, replaced bymessage(List, String, String, MessageType)
- Specified by:
message
in interfaceIFunctionService
- Parameters:
email
- Emailsubject
- Subjectbody
- BodymessageType
- TEXT, HTMLgroup
- Group- Returns:
- ResponseData (message, statusCode).
- Required Parameters:
- (email, subject, body, messageType)
-
message
public ResponseData message(List<String> email, String subject, String body, MessageType messageType) - Parameters:
email
- Emailsubject
- Subjectbody
- BodymessageType
- TEXT, HTML- Returns:
- ResponseData (message, statusCode).
- Required Parameters:
- (email, subject, body, messageType)
-
createCredential
- Specified by:
createCredential
in interfaceIFunctionService
- Parameters:
key
- Keyvalue
- ValuecredentialLabel
- Label- Returns:
- SecretVO with all attributes of the Credential.
- Required Parameters:
- (credentialLabel, key, value)
-
createError
public ResponseData createError(Integer taskId, Exception exception, File fileScreenshot, Map<String, Object> tags, List<File> fileAttachmentList) - Specified by:
createError
in interfaceIFunctionService
- Parameters:
taskId
- Task IDexception
- Exception to the errorfileScreenshot
- Screenshot of the errortags
- TagsfileAttachmentList
- Attachment list of the error- Returns:
- ResponseData (message, statusCode).
- Required Parameters:
- (taskId, exception)
-
message(List, String, String, MessageType)