org.daisy.pipeline.client
Class Jobs

java.lang.Object
  extended by org.daisy.pipeline.client.Jobs

public class Jobs
extends java.lang.Object

Methods for communicating with the "/jobs" resource in a Pipeline 2 Web Service.

Author:
jostein
See Also:
http://code.google.com/p/daisy-pipeline/wiki/WebServiceAPI#Jobs

Constructor Summary
Jobs()
           
 
Method Summary
static Pipeline2WSResponse delete(java.lang.String endpoint, java.lang.String username, java.lang.String secret, java.lang.String id)
          Delete a single job HTTP 204 No Content: Successfully processed the request, no content being returned HTTP 401 Unauthorized: Client was not authorized to perform request.
static Pipeline2WSResponse get(java.lang.String endpoint, java.lang.String username, java.lang.String secret)
          Get all jobs HTTP 200 OK: Response body contains XML data HTTP 401 Unauthorized: Client was not authorized to perform request.
static Pipeline2WSResponse get(java.lang.String endpoint, java.lang.String username, java.lang.String secret, java.lang.String id, java.lang.Integer fromSequence)
          Get a single job HTTP 200 OK: Response body contains XML data HTTP 401 Unauthorized: Client was not authorized to perform request.
static Pipeline2WSResponse getLog(java.lang.String endpoint, java.lang.String username, java.lang.String secret, java.lang.String id)
          Get the log file for a job HTTP 200 OK: Response body contains plain text data HTTP 401 Unauthorized: Client was not authorized to perform request.
static Pipeline2WSResponse getResult(java.lang.String endpoint, java.lang.String username, java.lang.String secret, java.lang.String id)
          Get the result for a job HTTP 200 OK: Response body contains Zip data HTTP 401 Unauthorized: Client was not authorized to perform request.
static Pipeline2WSResponse post(java.lang.String endpoint, java.lang.String username, java.lang.String secret, java.lang.String href, java.util.List<Argument> arguments, java.io.File contextZipFile, java.util.Map<java.lang.String,java.lang.String> callbacks)
          Create a job with files HTTP 201 Created: The URI of the new job is found in the HTTP location header HTTP 400 Bad Request: Errors in the parameters such as invalid script name HTTP 401 Unauthorized: Client was not authorized to perform request.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jobs

public Jobs()
Method Detail

get

public static Pipeline2WSResponse get(java.lang.String endpoint,
                                      java.lang.String username,
                                      java.lang.String secret)
                               throws Pipeline2WSException
Get all jobs HTTP 200 OK: Response body contains XML data HTTP 401 Unauthorized: Client was not authorized to perform request.

Throws:
Pipeline2WSException

post

public static Pipeline2WSResponse post(java.lang.String endpoint,
                                       java.lang.String username,
                                       java.lang.String secret,
                                       java.lang.String href,
                                       java.util.List<Argument> arguments,
                                       java.io.File contextZipFile,
                                       java.util.Map<java.lang.String,java.lang.String> callbacks)
                                throws Pipeline2WSException
Create a job with files HTTP 201 Created: The URI of the new job is found in the HTTP location header HTTP 400 Bad Request: Errors in the parameters such as invalid script name HTTP 401 Unauthorized: Client was not authorized to perform request.

Returns:
Throws:
Pipeline2WSException

get

public static Pipeline2WSResponse get(java.lang.String endpoint,
                                      java.lang.String username,
                                      java.lang.String secret,
                                      java.lang.String id,
                                      java.lang.Integer fromSequence)
                               throws Pipeline2WSException
Get a single job HTTP 200 OK: Response body contains XML data HTTP 401 Unauthorized: Client was not authorized to perform request. HTTP 404 Not Found: Resource not found

Throws:
Pipeline2WSException

delete

public static Pipeline2WSResponse delete(java.lang.String endpoint,
                                         java.lang.String username,
                                         java.lang.String secret,
                                         java.lang.String id)
Delete a single job HTTP 204 No Content: Successfully processed the request, no content being returned HTTP 401 Unauthorized: Client was not authorized to perform request. HTTP 404 Not Found: Resource not found


getResult

public static Pipeline2WSResponse getResult(java.lang.String endpoint,
                                            java.lang.String username,
                                            java.lang.String secret,
                                            java.lang.String id)
                                     throws Pipeline2WSException
Get the result for a job HTTP 200 OK: Response body contains Zip data HTTP 401 Unauthorized: Client was not authorized to perform request. HTTP 404 Not Found: Resource not found

Returns:
Throws:
Pipeline2WSException

getLog

public static Pipeline2WSResponse getLog(java.lang.String endpoint,
                                         java.lang.String username,
                                         java.lang.String secret,
                                         java.lang.String id)
                                  throws Pipeline2WSException
Get the log file for a job HTTP 200 OK: Response body contains plain text data HTTP 401 Unauthorized: Client was not authorized to perform request. HTTP 404 Not Found: Resource not found

Throws:
Pipeline2WSException