Groovy Documentation

com.ace.mws.plugins
[Java] Interface IMoabRestService


public interface IMoabRestService

The Moab REST service gives easy access to all supported REST resources in Moab Web Services. Methods are provided to perform each HTTP method: GET, POST, PUT, and DELETE. Several variations are given of each method in order to utilize simpler or more complicated requests. Each operation is performed internally. In other words, no external network connection is utilized to perform these calls.

The methods for each HTTP method may be called as follows (using the post method as an example):

 // String url
 moabRestService.post("/rest/jobs")
 // Map options, String url
 moabRestService.post("/rest/jobs", hooks:true)
 // String url, Closure data
 moabRestService.post("/rest/jobs") {
     [data:"here"]
 }
 // Map options, String url, Closure data
 moabRestService.post("/rest/jobs", hooks:true) {
     [data:"here"]
 }
 

For more information on how to use this service, see the MWS Quick Reference page on Moab Rest Service.

Authors:
bsaville


Method Summary
MoabRestResponse delete(String url)

Shortcut for calling delete(Map, String, Closure) with no options or data.

MoabRestResponse delete(Map options, String url)

Shortcut for calling delete(Map, String, Closure) with no data.

MoabRestResponse delete(String url, Closure data)

Shortcut for calling delete(Map, String, Closure) with no options.

MoabRestResponse delete(Map options, String url, Closure data)

Performs an internal HTTP DELETE operation for the requested URL with optional options and/or data.

MoabRestResponse get(String url)

Shortcut for calling get(Map, String, Closure) with no options or data.

MoabRestResponse get(Map options, String url)

Shortcut for calling get(Map, String, Closure) with no data.

MoabRestResponse get(String url, Closure data)

Shortcut for calling get(Map, String, Closure) with no options.

MoabRestResponse get(Map options, String url, Closure data)

Performs an internal HTTP GET operation for the requested URL with optional options and/or data.

MoabRestResponse post(String url)

Shortcut for calling post(Map, String, Closure) with no options or data.

MoabRestResponse post(Map options, String url)

Shortcut for calling post(Map, String, Closure) with no data.

MoabRestResponse post(String url, Closure data)

Shortcut for calling post(Map, String, Closure) with no options.

MoabRestResponse post(Map options, String url, Closure data)

Performs an internal HTTP POST operation for the requested URL with optional options and/or data.

MoabRestResponse put(String url)

Shortcut for calling put(Map, String, Closure) with no options or data.

MoabRestResponse put(Map options, String url)

Shortcut for calling put(Map, String, Closure) with no data.

MoabRestResponse put(String url, Closure data)

Shortcut for calling put(Map, String, Closure) with no options.

MoabRestResponse put(Map options, String url, Closure data)

Performs an internal HTTP PUT operation for the requested URL with optional options and/or data.

 

Method Detail

delete

public MoabRestResponse delete(String url)
Shortcut for calling delete(Map, String, Closure) with no options or data.
Parameters:
url - The URL to call
Returns:
The response result


delete

public MoabRestResponse delete(Map options, String url)
Shortcut for calling delete(Map, String, Closure) with no data.
Parameters:
url - The URL to call
Returns:
The response result


delete

public MoabRestResponse delete(String url, Closure data)
Shortcut for calling delete(Map, String, Closure) with no options.
Parameters:
url - The URL to call
Returns:
The response result


delete

public MoabRestResponse delete(Map options, String url, Closure data)
Performs an internal HTTP DELETE operation for the requested URL with optional options and/or data. Valid options and data types are documented in IMoabRestService.
Parameters:
options - Map of options to use for the request
url - The URL to call
data - A closure which returns a valid request body
Returns:
The response result


get

public MoabRestResponse get(String url)
Shortcut for calling get(Map, String, Closure) with no options or data.
Parameters:
url - The URL to call
Returns:
The response result


get

public MoabRestResponse get(Map options, String url)
Shortcut for calling get(Map, String, Closure) with no data.
Parameters:
url - The URL to call
Returns:
The response result


get

public MoabRestResponse get(String url, Closure data)
Shortcut for calling get(Map, String, Closure) with no options.
Parameters:
url - The URL to call
Returns:
The response result


get

public MoabRestResponse get(Map options, String url, Closure data)
Performs an internal HTTP GET operation for the requested URL with optional options and/or data. Valid options and data types are documented in IMoabRestService.
Parameters:
options - Map of options to use for the request
url - The URL to call RESTfully
data - A closure which returns a valid request body
Returns:
The response result


post

public MoabRestResponse post(String url)
Shortcut for calling post(Map, String, Closure) with no options or data.
Parameters:
url - The URL to call
Returns:
The response result


post

public MoabRestResponse post(Map options, String url)
Shortcut for calling post(Map, String, Closure) with no data.
Parameters:
url - The URL to call
Returns:
The response result


post

public MoabRestResponse post(String url, Closure data)
Shortcut for calling post(Map, String, Closure) with no options.
Parameters:
url - The URL to call
Returns:
The response result


post

public MoabRestResponse post(Map options, String url, Closure data)
Performs an internal HTTP POST operation for the requested URL with optional options and/or data. Valid options and data types are documented in IMoabRestService.
Parameters:
options - Map of options to use for the request
url - The URL to call
data - A closure which returns a valid request body
Returns:
The response result


put

public MoabRestResponse put(String url)
Shortcut for calling put(Map, String, Closure) with no options or data.
Parameters:
url - The URL to call
Returns:
The response result


put

public MoabRestResponse put(Map options, String url)
Shortcut for calling put(Map, String, Closure) with no data.
Parameters:
url - The URL to call
Returns:
The response result


put

public MoabRestResponse put(String url, Closure data)
Shortcut for calling put(Map, String, Closure) with no options.
Parameters:
url - The URL to call
Returns:
The response result


put

public MoabRestResponse put(Map options, String url, Closure data)
Performs an internal HTTP PUT operation for the requested URL with optional options and/or data. Valid options and data types are documented in IMoabRestService.
Parameters:
options - Map of options to use for the request
url - The URL to call
data - A closure which returns a valid request body
Returns:
The response result


 

Groovy Documentation