Package dev.botcity.maestro_sdk
Class BotMaestroSDK
java.lang.Object
dev.botcity.maestro_sdk.BotMaestroSDK
- All Implemented Interfaces:
IFunctionService
-
Field Summary
FieldsModifier and TypeFieldDescriptiondev.botcity.api.client.login.GetTokenboolean -
Constructor Summary
Constructors -
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 recordsvoidlogin(BotExecution execution) voidmessage(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:
getTaskin interfaceIFunctionService- Parameters:
taskId- Task ID- Returns:
- AutomationTask with all attributes of the task.
- Required Parameters:
- (taskId)
-
interruptTask
- Specified by:
interruptTaskin interfaceIFunctionService- Parameters:
taskId- Task ID- Returns:
- AutomationTask with all attributes of the task.
- Required Parameters:
- (taskId)
-
restartTask
- Specified by:
restartTaskin 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:
finishTaskin 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:
listTasksin 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:
listTasksin 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:
createTaskin 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:
newLogEntryin 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:
getLogFilein interfaceIFunctionService- Parameters:
logId- Log IDdays- number of days- Returns:
- Data byte[]
- Required Parameters:
- (logId, days)
-
newLog
- Specified by:
newLogin interfaceIFunctionService- Parameters:
label- Labelcolumns- list of log columns- Returns:
- LogSchemaVO with all the log attributes.
- Required Parameters:
- (label, columns)
-
getLog
- Specified by:
getLogin interfaceIFunctionService- Parameters:
logId- Log IDdays- number of days- Returns:
- List containing the hasmap.
- Required Parameters:
- (logId, days)
-
deleteLog
- Specified by:
deleteLogin interfaceIFunctionService- Parameters:
label- Label- Returns:
- ResponseData (message, statusCode).
- Required Parameters:
- (label)
-
postArtifact
- Specified by:
postArtifactin interfaceIFunctionService- Parameters:
taskId- Task IDartifactName- Artifact NameartifactFile- Artifact File- Returns:
- ResponseData (message, statusCode).
- Required Parameters:
- (taskId, artifactName, artifactFile)
-
getArtifactFile
- Specified by:
getArtifactFilein interfaceIFunctionService- Parameters:
artifactId- Artifact ID- Returns:
- Data byte[]
- Required Parameters:
- (artifactId)
-
listArtifact
- Specified by:
listArtifactin interfaceIFunctionService- Returns:
- ArtifactVO list with all attributes of the Artifact.
-
alert
- Specified by:
alertin 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:
messagein 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:
createCredentialin 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:
createErrorin 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)