public class RestActionPack extends Object
com.cultofbits.integrationm.service.properties
file
with rest
key;
for example:
action.names=...,<rest-ap-name> action.<rest-ap-name>=rest action.<rest-ap-name>.base-url=<some url> action.<rest-ap-name>.cookie-name=<cookie-name> action.<rest-ap-name>.cookie-value=<cookie-value>
Constructor and Description |
---|
RestActionPack(String url,
String cookieName,
String cookieValue,
com.cultofbits.integrationm.service.internal.security.UserCookiesGenerator userCookiesGenerator) |
Modifier and Type | Method and Description |
---|---|
String |
delete(String relativeUri)
Does a DELETE of the given uri
|
String |
delete(String relativeUri,
Map<String,String> queryParams,
String runAsUser)
Does a DELETE of the given uri
Same as the standard DELETE method but with an additional map, containing query parameters for the request
|
String |
delete(String relativeUri,
String runAsUser)
Does a DELETE of the given uri
Same as the standard DELETE method but with an additional arg that allows to run the operation as a given user
|
String |
get(String relativeUri)
Does a GET of the given uri.
|
String |
get(String relativeUri,
Map<String,String> queryParams,
String runAsUser)
Does a GET of the given uri.
|
String |
get(String relativeUri,
String runAsUser)
Does a GET of the given uri.
|
String |
post(String relativeUri,
List values)
Transforms the passed List into a JSON object and POSTs it to the given uri.
|
String |
post(String relativeUri,
List values,
String runAsUser)
Transforms the passed List into a JSON object and POSTs it to the given uri.
|
String |
post(String relativeUri,
Map<String,String> keyValues)
Transforms the passed Map into a JSON object and POSTs it to the given uri.
|
String |
post(String relativeUri,
Map<String,String> keyValues,
String runAsUser)
Transforms the passed Map into a JSON object and POSTs it to the given uri.
|
String |
put(String relativeUri,
List values)
Transforms the passed List into a JSON object and PUTs it to the given uri.
|
String |
put(String relativeUri,
List values,
String runAsUser)
Transforms the passed List into a JSON object and PUTs it to the given uri.
|
String |
put(String relativeUri,
Map<String,String> keyValues)
Transforms the passed Map into a JSON object and PUTs it to the given uri.
|
String |
put(String relativeUri,
Map<String,String> keyValues,
String runAsUser)
Transforms the passed Map into a JSON object and PUTs it to the given uri.
|
public String delete(String relativeUri)
relativeUri
- the relative URI to be appended to the baseurl (ex: integration/cpe/123)public String delete(String relativeUri, Map<String,String> queryParams, String runAsUser)
relativeUri
- the relative URI to be appended to the baseurl (ex: integration/cpe/123)queryParams
- a map of query parametersrunAsUser
- the username that will be used to make the requestpublic String delete(String relativeUri, String runAsUser)
relativeUri
- the relative URI to be appended to the baseurl (ex: integration/cpe/123)runAsUser
- the username that will be used to make the requestpublic String get(String relativeUri)
relativeUri
- the relative URI to be appended to the baseurl (ex: integration/cpe/123)public String get(String relativeUri, Map<String,String> queryParams, String runAsUser)
relativeUri
- the relative URI to be appended to the baseurl (ex: integration/cpe/123)queryParams
- a map of query parametersrunAsUser
- the username that will be used to make the requestpublic String get(String relativeUri, String runAsUser)
relativeUri
- the relative URI to be appended to the baseurl (ex: integration/cpe/123)runAsUser
- the username that will be used to make the requestpublic String post(String relativeUri, List values)
relativeUri
- the relative URI to be appended to the baseurl (ex: integration/cpe/123)values
- a list to be converted to a JSON arraypublic String post(String relativeUri, List values, String runAsUser)
relativeUri
- the relative URI to be appended to the baseurl (ex: integration/cpe/123)values
- a list to be converted to a JSON arrayrunAsUser
- the username that will be used to make the requestpublic String post(String relativeUri, Map<String,String> keyValues)
relativeUri
- the relative URI to be appended to the baseurl (ex: integration/cpe/123)keyValues
- a map to be converted to a JSON objectpublic String post(String relativeUri, Map<String,String> keyValues, String runAsUser)
relativeUri
- the relative URI to be appended to the baseurl (ex: integration/cpe/123)keyValues
- a map to be converted to a JSON objectrunAsUser
- the username that will be used to make the requestpublic String put(String relativeUri, List values)
relativeUri
- the relative URI to be appended to the baseurl (ex: integration/cpe/123)values
- a list to be converted to a JSON arraypublic String put(String relativeUri, List values, String runAsUser)
relativeUri
- the relative URI to be appended to the baseurl (ex: integration/cpe/123)values
- a list to be converted to a JSON arrayrunAsUser
- the username that will be used to make the requestpublic String put(String relativeUri, Map<String,String> keyValues)
relativeUri
- the relative URI to be appended to the baseurl (ex: integration/cpe/123)keyValues
- a map to be converted to a JSON objectpublic String put(String relativeUri, Map<String,String> keyValues, String runAsUser)
relativeUri
- the relative URI to be appended to the baseurl (ex: integration/cpe/123)keyValues
- a map to be converted to a JSON objectrunAsUser
- the username that will be used to make the requestCopyright © 2021 Cult Of Bits, lda