GNDMS 0.6.0
RESTful verison of GNDMS
|
An abstract client which implements the HTTP requests. More...
Public Member Functions | |
AbstractClient (final String serviceURL) | |
The constructor. | |
final RestOperations | getRestTemplate () |
Gets the rest template. | |
final void | setRestTemplate (final RestOperations restTemplate) |
Sets the rest template. | |
final String | getServiceURL () |
Gets the service url. | |
void | setServiceURL (final String serviceURL) |
Sets the service url. | |
Protected Member Functions | |
AbstractClient () | |
The constructor. | |
final< T > ResponseEntity< T > | unifiedGet (final Class< T > clazz, final String url, final String dn) |
Executes a GET on a url, where the request header contains a given user name. | |
final< T > ResponseEntity< T > | unifiedGet (final Class< T > clazz, final String url, final String dn, final String wid) |
Executes a GET on a url, where the request header contains a given user name and workflow id. | |
final< T, P > ResponseEntity< T > | unifiedPost (final Class< T > clazz, final P parm, final String url, final String dn) |
Executes a POST on a url. | |
final< T, P > ResponseEntity< T > | unifiedPost (final Class< T > clazz, final P parm, final String url, final String dn, final String wid) |
Executes a POST on a url. | |
final< T, P > ResponseEntity< T > | unifiedPut (final Class< T > clazz, final P parm, final String url, final String dn) |
Executes a PUT on a url. | |
final< T, P > ResponseEntity< T > | unifiedPut (final Class< T > clazz, final P parm, final String url, final String dn, final String wid) |
Executes a PUT on a url. | |
final ResponseEntity< Void > | unifiedDelete (final String url, final String dn) |
Executes a DELETE on a url, where the request header contains a given user name. | |
final< T > ResponseEntity< T > | unifiedDelete (final Class< T > clazz, final String url, final String dn) |
Executes a DELETE on a url, where the request header contains a given user name. | |
final ResponseEntity< Void > | unifiedDelete (final String url, final String dn, final String wid) |
Executes a DELETE on a url, where the request header contains a given user name and workflow id. | |
Protected Attributes | |
final Logger | logger = LoggerFactory.getLogger(this.getClass()) |
The logger. | |
Package Functions | |
private< T, P > ResponseEntity< T > | unifiedX (final HttpMethod x, final Class< T > clazz, final P parm, final String url, final String dn, final String wid) |
Executes a given HTTP method on a url. | |
Private Attributes | |
RestOperations | restTemplate |
A rest template for internal use. | |
String | serviceURL |
The service url like http://www.barz.org/gndms/<gridname> . |
An abstract client which implements the HTTP requests.
de.zib.gndms.gndmc.AbstractClient.AbstractClient | ( | final String | serviceURL | ) |
The constructor.
serviceURL | The base url of the grid. |
final RestOperations de.zib.gndms.gndmc.AbstractClient.getRestTemplate | ( | ) |
Gets the rest template.
final String de.zib.gndms.gndmc.AbstractClient.getServiceURL | ( | ) |
Gets the service url.
final void de.zib.gndms.gndmc.AbstractClient.setRestTemplate | ( | final RestOperations | restTemplate | ) |
Sets the rest template.
restTemplate | The rest template. |
void de.zib.gndms.gndmc.AbstractClient.setServiceURL | ( | final String | serviceURL | ) |
Sets the service url.
serviceURL | The service url. |
final ResponseEntity<Void> de.zib.gndms.gndmc.AbstractClient.unifiedDelete | ( | final String | url, |
final String | dn, | ||
final String | wid | ||
) | [protected] |
Executes a DELETE on a url, where the request header contains a given user name and workflow id.
url | The url of the request. |
dn | The user name. |
wid | The workflow id. |
final ResponseEntity<Void> de.zib.gndms.gndmc.AbstractClient.unifiedDelete | ( | final String | url, |
final String | dn | ||
) | [protected] |
Executes a DELETE on a url, where the request header contains a given user name.
url | The url of the request. |
dn | The user name. |
final<T> ResponseEntity<T> de.zib.gndms.gndmc.AbstractClient.unifiedDelete | ( | final Class< T > | clazz, |
final String | url, | ||
final String | dn | ||
) | [protected] |
Executes a DELETE on a url, where the request header contains a given user name.
<T> | The body type of the response. |
clazz | The type of the return value. |
url | The url of the request. |
dn | The user name. |
final<T> ResponseEntity<T> de.zib.gndms.gndmc.AbstractClient.unifiedGet | ( | final Class< T > | clazz, |
final String | url, | ||
final String | dn | ||
) | [protected] |
Executes a GET on a url, where the request header contains a given user name.
<T> | The body type of the response. |
clazz | The type of the return value. |
url | The url of the request. |
dn | The user name. |
final<T> ResponseEntity<T> de.zib.gndms.gndmc.AbstractClient.unifiedGet | ( | final Class< T > | clazz, |
final String | url, | ||
final String | dn, | ||
final String | wid | ||
) | [protected] |
Executes a GET on a url, where the request header contains a given user name and workflow id.
<T> | The body type of the response. |
clazz | The type of the return value. |
url | The url of the request. |
dn | The user name. |
wid | The workflow id. |
final<T, P> ResponseEntity<T> de.zib.gndms.gndmc.AbstractClient.unifiedPost | ( | final Class< T > | clazz, |
final P | parm, | ||
final String | url, | ||
final String | dn | ||
) | [protected] |
Executes a POST on a url.
The request header contains a given user name, the body of the request contains a given object of type P.
<T> | The body type of the response. |
<P> | The body type of the request. |
clazz | The type of the return value. |
parm | The body of the request. |
url | The url of the request. |
dn | The user name. |
final<T, P> ResponseEntity<T> de.zib.gndms.gndmc.AbstractClient.unifiedPost | ( | final Class< T > | clazz, |
final P | parm, | ||
final String | url, | ||
final String | dn, | ||
final String | wid | ||
) | [protected] |
Executes a POST on a url.
The request header contains a given user name and workflow id, the body of the request contains a given object of type P.
<T> | The body type of the response. |
<P> | The body type of the request. |
clazz | The type of the return value. |
parm | The body of the request. |
url | The url of the request. |
dn | The user name. |
wid | The workflow id. |
final<T, P> ResponseEntity<T> de.zib.gndms.gndmc.AbstractClient.unifiedPut | ( | final Class< T > | clazz, |
final P | parm, | ||
final String | url, | ||
final String | dn | ||
) | [protected] |
Executes a PUT on a url.
The request header contains a given user name, the body of the request contains a given object of type P.
<T> | The body type of the response. |
<P> | The body type of the request. |
clazz | The type of the return value. |
parm | The body of the request. |
url | The url of the request. |
dn | The user name. |
final<T, P> ResponseEntity<T> de.zib.gndms.gndmc.AbstractClient.unifiedPut | ( | final Class< T > | clazz, |
final P | parm, | ||
final String | url, | ||
final String | dn, | ||
final String | wid | ||
) | [protected] |
Executes a PUT on a url.
The request header contains a given user name and workflow id, the body of the request contains a given object of type P.
<T> | The body type of the response. |
<P> | The body type of the request. |
clazz | The type of the return value. |
parm | The body of the request. |
url | The url of the request. |
dn | The user name. |
wid | The workflow id. |
private<T, P> ResponseEntity<T> de.zib.gndms.gndmc.AbstractClient.unifiedX | ( | final HttpMethod | x, |
final Class< T > | clazz, | ||
final P | parm, | ||
final String | url, | ||
final String | dn, | ||
final String | wid | ||
) | [package] |
Executes a given HTTP method on a url.
The request header contains a given user name and workflow id, the body of the request contains a given object of type P.
<T> | The body type of the response. |
<P> | The body type of the request. |
x | The kind of HTTP method to be executed. |
clazz | The type of the return value. |
parm | The body of the request. |
url | The url of the request. |
dn | The user name. |
wid | The workflow id. |