public class TaskMonkClient
extends java.lang.Object
| Constructor and Description |
|---|
TaskMonkClient(java.lang.String projectId,
java.lang.String server,
OAuthClientCredentials credentials) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
addTask(Task task)
Add an external task
|
java.lang.String |
createBatch(java.lang.String batchName)
Create a new batch in an existing project
|
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
|
java.lang.String |
updateBatch(java.lang.String batchId,
java.lang.String batchName,
java.lang.Short priority,
java.lang.String comments,
java.util.List<Notification> notifications)
update the details of an existing batch
|
TaskImportResponse |
uploadTasks(java.lang.String batchName,
java.io.File file)
Create a new batch in an existing project and add tasks to it
|
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 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 java.lang.String updateBatch(java.lang.String batchId,
java.lang.String batchName,
java.lang.Short 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 batchString - 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(Task task) throws java.lang.Exception
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 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 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.Exception