|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.daisy.pipeline.client.Pipeline2WS
public class Pipeline2WS
Methods for communicating directly with the Pipeline 2 Web Service.
Field Summary | |
---|---|
static boolean |
debug
|
static java.text.DateFormat |
iso8601
|
static java.util.Map<java.lang.String,java.lang.String> |
ns
Used to provide a the namespace when querying a document using XPath. |
Constructor Summary | |
---|---|
Pipeline2WS()
|
Method Summary | |
---|---|
static Pipeline2WSResponse |
get(java.lang.String endpoint,
java.lang.String path,
java.lang.String username,
java.lang.String secret,
java.util.Map<java.lang.String,java.lang.String> parameters)
Send a GET request. |
static Pipeline2WSResponse |
postMultipart(java.lang.String endpoint,
java.lang.String path,
java.lang.String username,
java.lang.String secret,
java.util.Map<java.lang.String,java.io.File> parts)
POST a multipart request. |
static Pipeline2WSResponse |
postXml(java.lang.String endpoint,
java.lang.String path,
java.lang.String username,
java.lang.String secret,
org.w3c.dom.Document xml)
POST an XML document. |
static java.lang.String |
url(java.lang.String endpoint,
java.lang.String path,
java.lang.String username,
java.lang.String secret,
java.util.Map<java.lang.String,java.lang.String> parameters)
Sign a URL for communication with a Pipeline 2 Web Service running in authenticated mode. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean debug
public static final java.util.Map<java.lang.String,java.lang.String> ns
public static java.text.DateFormat iso8601
Constructor Detail |
---|
public Pipeline2WS()
Method Detail |
---|
public static Pipeline2WSResponse get(java.lang.String endpoint, java.lang.String path, java.lang.String username, java.lang.String secret, java.util.Map<java.lang.String,java.lang.String> parameters) throws Pipeline2WSException
endpoint
- WS endpoint, for instance "http://localhost:8182/ws".path
- Path to resource, for instance "/scripts".username
- Robot username. Can be null. If null, then the URL will not be signed.secret
- Robot secret. Can be null.parameters
- URL query string parameters
Pipeline2WSException
public static Pipeline2WSResponse postXml(java.lang.String endpoint, java.lang.String path, java.lang.String username, java.lang.String secret, org.w3c.dom.Document xml) throws Pipeline2WSException
endpoint
- WS endpoint, for instance "http://localhost:8182/ws".path
- Path to resource, for instance "/scripts".username
- Robot username. Can be null. If null, then the URL will not be signed.secret
- Robot secret. Can be null.xml
- The XML document to post.
Pipeline2WSException
public static Pipeline2WSResponse postMultipart(java.lang.String endpoint, java.lang.String path, java.lang.String username, java.lang.String secret, java.util.Map<java.lang.String,java.io.File> parts) throws Pipeline2WSException
endpoint
- WS endpoint, for instance "http://localhost:8182/ws".path
- Path to resource, for instance "/scripts".username
- Robot username. Can be null. If null, then the URL will not be signed.secret
- Robot secret. Can be null.parts
- A map of all the parts.
Pipeline2WSException
public static java.lang.String url(java.lang.String endpoint, java.lang.String path, java.lang.String username, java.lang.String secret, java.util.Map<java.lang.String,java.lang.String> parameters) throws Pipeline2WSException
endpoint
- path
- username
- secret
- parameters
-
Pipeline2WSException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |