public class TaskMonkClient
extends java.lang.Object
| Constructor and Description |
|---|
TaskMonkClient(java.lang.String projectId,
java.lang.String server,
OAuthClientCredentials credentials) |
TaskMonkClient(java.lang.String projectId,
java.lang.String server,
java.lang.String proxy,
OAuthClientCredentials credentials) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
addTask(java.lang.String batchId,
Task task)
Add an external task
|
java.lang.String |
createBatch(NewBatchData newBatchData)
Create a new batch in an existing project with parameters set
|
java.lang.String |
createBatch(java.lang.String batchName)
Create a new batch in an existing project
|
java.lang.Boolean |
deleteBatch(java.lang.String batchId)
To delete a specific batch
|
ApiResponse |
editBatch(java.lang.String batchId,
java.lang.String batchName,
java.lang.Integer priority,
java.lang.String comments,
java.util.List<Notification> notifications)
update the details of an existing batch
|
java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
getBatchOutput(java.lang.String projectId,
java.lang.String batchId)
Get the batch output as a dictionary .
|
void |
getBatchOutput(java.lang.String batchId,
java.lang.String outputFormat,
java.lang.String outputPath)
Get the batch output in a local file path
|
BatchStatus |
getBatchStatus(java.lang.String batchId)
Get the status of the batch
|
JobProgressResponse |
getJobProgress(java.lang.String jobId)
Get the progress of a job
|
JobProgressResponse |
getJobProgressBatch(java.lang.String batchId)
Get the progress of batch
|
java.lang.Boolean |
isProcessComplete(java.lang.String batchId)
To check if a process is complete
|
java.lang.Boolean |
isUploadComplete(java.lang.String batchId)
To check if the upload is complete or not
|
ApiResponse |
updateBatchState(java.lang.String batchId,
BatchState state)
update the state for a batch
|
TaskImportResponse |
uploadTasks(java.lang.String batchName,
java.io.File file)
Create a new batch in an existing project and add tasks to it
|
java.lang.String |
uploadTasks(java.lang.String projectId,
java.lang.String batchId,
java.util.List<java.util.Map<java.lang.String,java.lang.String>> inputValues)
Add tasks to TaskMonk
|
TaskImportResponse |
uploadTasksToBatch(java.lang.String batchId,
java.io.File file)
Add tasks to an existing batch
|
TaskImportResponse |
uploadTasksUrl(java.lang.String batchName,
java.lang.String taskUrl,
java.lang.String fileType)
Create a new batch in an existing project and add tasks to it from an accessible url
|
TaskImportResponse |
uploadTasksUrlToBatch(java.lang.String batchId,
java.lang.String taskUrl,
java.lang.String fileType)
Add tasks to an existing batch from an accessible url
|
public TaskMonkClient(java.lang.String projectId,
java.lang.String server,
OAuthClientCredentials credentials)
public TaskMonkClient(java.lang.String projectId,
java.lang.String server,
java.lang.String proxy,
OAuthClientCredentials credentials)
public java.lang.String createBatch(NewBatchData newBatchData) throws java.lang.Exception
newBatchData - NewBatchData New batch informationString returns the id of the batchForbiddenException - if the access is unauthorizedNotFoundException - if object not foundInternalServerError - if an internal server error occursUnhandledException - if unhandled exception occursjava.lang.Exceptionpublic java.lang.String createBatch(java.lang.String batchName)
throws java.lang.Exception
batchName - . name of the batch to be createdString returns the id of the batchForbiddenException - if the access is unauthorizedNotFoundException - if object not foundInternalServerError - if an internal server error occursUnhandledException - if unhandled exception occursjava.lang.Exceptionpublic ApiResponse editBatch(java.lang.String batchId, java.lang.String batchName, java.lang.Integer priority, java.lang.String comments, java.util.List<Notification> notifications) throws java.lang.Exception
batchId - - id of an existing batchbatchName - - name of new batchpriority - - priority of batchcomments - - comments in new batchnotifications - - notifications of a new batchApiResponse - returns the id of the updated batchForbiddenException - if the access is unauthorizedNotFoundException - if object not foundInternalServerError - if an internal server error occursUnhandledException - if unhandled exception occursjava.lang.Exceptionpublic ApiResponse updateBatchState(java.lang.String batchId, BatchState state) throws java.lang.Exception
batchId - - id of an existing batchstate - - new state for the String. Allowed - CANCELLEDApiResponse - returns the id of the updated batchForbiddenException - if the access is unauthorizedNotFoundException - if object not foundInternalServerError - if an internal server error occursUnhandledException - if unhandled exception occursjava.lang.Exceptionpublic TaskImportResponse uploadTasks(java.lang.String batchName, java.io.File file) throws java.lang.Exception
batchName - - name of the batch to be createdfile - - file of the tasks to be addedTaskImportResponse returns the task import responseForbiddenException - if the access is unauthorizedNotFoundException - if object not foundInternalServerError - if an internal server error occursUnhandledException - if unhandled exception occursjava.lang.Exceptionpublic TaskImportResponse uploadTasksUrl(java.lang.String batchName, java.lang.String taskUrl, java.lang.String fileType) throws java.lang.Exception
batchName - - name of the batch to be createdtaskUrl - - url of the file from which the tasks will be importedfileType - - type of file from which the tasks would be fetchedTaskImportResponse - returns the task import responseForbiddenException - if the access is unauthorizedNotFoundException - if object not foundInternalServerError - if an internal server error occursUnhandledException - if unhandled exception occursjava.lang.Exceptionpublic TaskImportResponse uploadTasksToBatch(java.lang.String batchId, java.io.File file) throws java.lang.Exception
batchId - - batch id of an existing batch to which the tasks are to be addedfile - - file of the tasks to be addedTaskImportResponse - returns the task import responseForbiddenException - if the access is unauthorizedNotFoundException - if object not foundInternalServerError - if an internal server error occursUnhandledException - if unhandled exception occursjava.lang.Exceptionpublic TaskImportResponse uploadTasksUrlToBatch(java.lang.String batchId, java.lang.String taskUrl, java.lang.String fileType) throws java.lang.Exception
batchId - - batch id of the batch to which the tasks are to be addedtaskUrl - - url of the file from which the tasks would be importedfileType - - type of file from which the tasks would be fetchedTaskImportResponse - returns the task import responseForbiddenException - if the access is unauthorizedNotFoundException - if object not foundInternalServerError - if an internal server error occursUnhandledException - if unhandled exception occursjava.lang.Exceptionpublic java.lang.String addTask(java.lang.String batchId,
Task task)
throws java.lang.Exception
batchId - task - Task - the task to be addedForbiddenException - if the access is unauthorizedNotFoundException - if object not foundInternalServerError - if an internal server error occursUnhandledException - if unhandled exception occursjava.lang.Exceptionpublic java.lang.String uploadTasks(java.lang.String projectId,
java.lang.String batchId,
java.util.List<java.util.Map<java.lang.String,java.lang.String>> inputValues)
throws java.lang.Exception
inputValues - - List of tasks to be added. Each task is represented by a map of input field to valuebatchId - projectId - java.lang.Exceptionpublic void getBatchOutput(java.lang.String batchId,
java.lang.String outputFormat,
java.lang.String outputPath)
throws java.lang.Exception
batchId - - batch id of an existing batchoutputFormat - output format for the file - "CSV" or "Excel"outputPath - - path where the output file should be createdForbiddenException - if the access is unauthorizedNotFoundException - if object not foundInternalServerError - if an internal server error occursUnhandledException - if unhandled exception occursjava.lang.Exceptionpublic java.util.List<java.util.Map<java.lang.String,java.lang.String>> getBatchOutput(java.lang.String projectId,
java.lang.String batchId)
throws java.lang.Exception
projectId - batchId - java.lang.Exceptionpublic JobProgressResponse getJobProgress(java.lang.String jobId) throws java.lang.Exception
jobId - - job id of the jobJobProgressResponse - returns the job progress responseForbiddenException - if the access is unauthorizedNotFoundException - if object not foundInternalServerError - if an internal server error occursUnhandledException - if unhandled exception occursjava.lang.Exceptionpublic JobProgressResponse getJobProgressBatch(java.lang.String batchId) throws java.lang.Exception
batchId - - id of the batchJobProgressResponse - returns the job progress responseForbiddenException - if the access is unauthorizedNotFoundException - if object not foundInternalServerError - if an internal server error occursUnhandledException - if unhandled exception occursjava.lang.Exceptionpublic BatchStatus getBatchStatus(java.lang.String batchId) throws java.lang.Exception
batchId - - id of the batchBatchStatus - returns the batch statusForbiddenException - if the access is unauthorizedNotFoundException - if object not foundInternalServerError - if an internal server error occursUnhandledException - if unhandled exception occursjava.lang.Exceptionpublic java.lang.Boolean isProcessComplete(java.lang.String batchId)
throws java.lang.Exception
batchId - - id of the batchBoolean - returns true or false depending on completion of processForbiddenException - if the access is unauthorizedNotFoundException - if object not foundInternalServerError - if an internal server error occursUnhandledException - if unhandled exception occursjava.lang.Exceptionpublic java.lang.Boolean isUploadComplete(java.lang.String batchId)
throws java.lang.Exception
batchId - - id of the batchBoolean - returns true or false depending upon upload statusForbiddenException - if the access is unauthorizedNotFoundException - if object not foundInternalServerError - if an intfieldNamesernal server error occursUnhandledException - if unhandled exception occursjava.lang.Exceptionpublic java.lang.Boolean deleteBatch(java.lang.String batchId)
throws java.lang.Exception
batchId - - id of the batchBoolean - returns the deleted batchIdjava.lang.Exception