Class ModuleWebhooks.Async
- java.lang.Object
-
- com.contentful.java.cma.ModuleWebhooks.Async
-
- Enclosing class:
- ModuleWebhooks
public class ModuleWebhooks.Async extends java.lang.ObjectAsync module.Use
ModuleWebhooks.async()to retrieve this class, to be able to do asynchronous requests to Contentful.
-
-
Constructor Summary
Constructors Constructor Description Async()
-
Method Summary
-
-
-
Method Detail
-
create
public CMACallback<CMAWebhook> create(CMAWebhook webhook, CMACallback<CMAWebhook> callback)
Asynchronous variant ofModuleWebhooks.create(String, CMAWebhook)- Parameters:
webhook- data to be used for creation.callback- the callback to be called once finished.- Returns:
- the callback passed in.
- Throws:
java.lang.IllegalArgumentException- if configured space id is null.java.lang.IllegalArgumentException- if webhook is null.CMANotWithEnvironmentsException- if environmentId was set usingCMAClient.Builder.setEnvironmentId(String).- See Also:
CMAClient.Builder.setSpaceId(String)
-
create
public CMACallback<CMAWebhook> create(java.lang.String spaceId, CMAWebhook webhook, CMACallback<CMAWebhook> callback)
Asynchronous variant ofModuleWebhooks.create(String, CMAWebhook)This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String)and will ignoreCMAClient.Builder.setEnvironmentId(String).- Parameters:
spaceId- id of the space to be used.webhook- data to be used for creation.callback- the callback to be called once finished.- Returns:
- the callback passed in.
- Throws:
java.lang.IllegalArgumentException- if space id is null.java.lang.IllegalArgumentException- if webhook is null.
-
delete
public CMACallback<java.lang.Integer> delete(CMAWebhook webhook, CMACallback<java.lang.Integer> callback)
Asynchronous variant ofModuleWebhooks.delete(CMAWebhook)- Parameters:
webhook- webhook to be deleted.callback- the callback to be called once finished.- Returns:
- the callback passed in.
- Throws:
java.lang.IllegalArgumentException- if spaceId is null.java.lang.IllegalArgumentException- if webhookId is null.
-
fetchAll
public CMACallback<CMAArray<CMAWebhook>> fetchAll(CMACallback<CMAArray<CMAWebhook>> callback)
Asynchronous variant ofModuleWebhooks.fetchAll()- Parameters:
callback- the callback to be called once finished.- Returns:
- the callback passed in.
- Throws:
java.lang.IllegalArgumentException- if spaceId is null.CMANotWithEnvironmentsException- if environmentId was set usingCMAClient.Builder.setEnvironmentId(String).- See Also:
CMAClient.Builder.setSpaceId(String)
-
fetchAll
public CMACallback<CMAArray<CMAWebhook>> fetchAll(java.lang.String spaceId, CMACallback<CMAArray<CMAWebhook>> callback)
Asynchronous variant ofModuleWebhooks.fetchAll(String)This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String)and will ignoreCMAClient.Builder.setEnvironmentId(String).- Parameters:
spaceId- id of the space to be used.callback- the callback to be called once finished.- Returns:
- the callback passed in.
- Throws:
java.lang.IllegalArgumentException- if spaceId is null.
-
fetchAll
public CMACallback<CMAArray<CMAWebhook>> fetchAll(java.util.Map<java.lang.String,java.lang.String> query, CMACallback<CMAArray<CMAWebhook>> callback)
Asynchronous variant ofModuleWebhooks.fetchAll(Map)- Parameters:
query- description map of which webhooks to be returned.callback- the callback to be called once finished.- Returns:
- the callback passed in.
- Throws:
java.lang.IllegalArgumentException- if configured spaceId is null.CMANotWithEnvironmentsException- if environmentId was set usingCMAClient.Builder.setEnvironmentId(String).- See Also:
CMAClient.Builder.setSpaceId(String)
-
fetchAll
public CMACallback<CMAArray<CMAWebhook>> fetchAll(java.lang.String spaceId, java.util.Map<java.lang.String,java.lang.String> query, CMACallback<CMAArray<CMAWebhook>> callback)
Asynchronous variant ofModuleWebhooks.fetchAll(String, Map)This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String)and will ignoreCMAClient.Builder.setEnvironmentId(String).- Parameters:
spaceId- id of the space to be used.query- description map of which webhooks to be returned.callback- the callback to be called once finished.- Returns:
- the callback passed in.
- Throws:
java.lang.IllegalArgumentException- if spaceId is null.
-
fetchOne
public CMACallback<CMAWebhook> fetchOne(java.lang.String webhookId, CMACallback<CMAWebhook> callback)
Asynchronous variant ofModuleWebhooks.fetchOne(String)- Parameters:
webhookId- id of the webhook to be retrieved.callback- the callback to be called once finished.- Returns:
- the callback passed in.
- Throws:
java.lang.IllegalArgumentException- if spaceId is null.java.lang.IllegalArgumentException- if webhookId is null.CMANotWithEnvironmentsException- if environmentId was set usingCMAClient.Builder.setEnvironmentId(String).- See Also:
CMAClient.Builder.setSpaceId(String)
-
fetchOne
public CMACallback<CMAWebhook> fetchOne(java.lang.String spaceId, java.lang.String webhookId, CMACallback<CMAWebhook> callback)
Asynchronous variant ofModuleWebhooks.fetchOne(String, String)This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String)and will ignoreCMAClient.Builder.setEnvironmentId(String).- Parameters:
spaceId- id of the space to be used.webhookId- id of the webhook to be retrieved.callback- the callback to be called once finished.- Returns:
- the callback passed in.
- Throws:
java.lang.IllegalArgumentException- if spaceId is null.java.lang.IllegalArgumentException- if webhookId is null.
-
update
public CMACallback<CMAWebhook> update(CMAWebhook webhook, CMACallback<CMAWebhook> callback)
Asynchronous variant ofModuleWebhooks.update(CMAWebhook)- Parameters:
webhook- data to be used for update.callback- the callback to be called once finished.- Returns:
- the callback passed in.
- Throws:
java.lang.IllegalArgumentException- if webhook is null.java.lang.IllegalArgumentException- if webhookId is null.java.lang.IllegalArgumentException- if spaceId is null.java.lang.IllegalArgumentException- if version is null.
-
calls
public CMACallback<CMAArray<CMAWebhookCall>> calls(CMAWebhook webhook, CMACallback<CMAArray<CMAWebhookCall>> callback)
Asynchronous variant ofModuleWebhooks.calls(CMAWebhook)- Parameters:
webhook- to be used to retrieve calls from.callback- the callback to be called once finished.- Returns:
- the callback passed in.
- Throws:
java.lang.IllegalArgumentException- if spaceId is null.java.lang.IllegalArgumentException- if webhook is null.
-
calls
public CMACallback<CMAArray<CMAWebhookCall>> calls(CMAWebhook webhook, java.util.Map<java.lang.String,java.lang.String> query, CMACallback<CMAArray<CMAWebhookCall>> callback)
Asynchronous variant ofModuleWebhooks.calls(CMAWebhook)with query parameter.- Parameters:
webhook- to be used to retrieve calls from.query- description map of which webhooks to be returned.callback- the callback to be called once finished.- Returns:
- the callback passed in.
- Throws:
java.lang.IllegalArgumentException- if spaceId is null.java.lang.IllegalArgumentException- if webhook is null.
-
callDetails
public CMACallback<CMAWebhookCallDetail> callDetails(CMAWebhookCall call, CMACallback<CMAWebhookCallDetail> callback)
Asynchronous variant ofModuleWebhooks.callDetails(CMAWebhookCall)- Parameters:
call- call to get more details about.callback- the callback to be called once finished.- Returns:
- the callback passed in.
- Throws:
java.lang.IllegalArgumentException- if spaceId is null.java.lang.IllegalArgumentException- if webhook is null.java.lang.IllegalArgumentException- if callId is null.
-
health
public CMACallback<CMAWebhookHealth> health(CMAWebhook webhook, CMACallback<CMAWebhookHealth> callback)
Asynchronous variant ofModuleWebhooks.health(CMAWebhook)- Parameters:
webhook- webhook to be used for healthy check.callback- the callback to be called once finished.- Returns:
- the callback passed in.
- Throws:
java.lang.IllegalArgumentException- if spaceId is null.java.lang.IllegalArgumentException- if webhook is null.
-
-