Package com.contentful.java.cma
Class ModuleApiKeys.Async
- java.lang.Object
-
- com.contentful.java.cma.ModuleApiKeys.Async
-
- Enclosing class:
- ModuleApiKeys
public class ModuleApiKeys.Async extends java.lang.ObjectAsync module.
-
-
Constructor Summary
Constructors Constructor Description Async()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CMACallback<CMAApiKey>create(CMAApiKey key, CMACallback<CMAApiKey> callback)Create a new delivery api key.CMACallback<CMAApiKey>create(java.lang.String spaceId, CMAApiKey key, CMACallback<CMAApiKey> callback)Create a new delivery api key.CMACallback<java.lang.Integer>delete(CMAApiKey key, CMACallback<java.lang.Integer> callback)Delete a given delivery api key.CMACallback<CMAArray<CMAApiKey>>fetchAll(CMACallback<CMAArray<CMAApiKey>> callback)Fetch all delivery api keys.CMACallback<CMAArray<CMAApiKey>>fetchAll(java.lang.String spaceId, CMACallback<CMAArray<CMAApiKey>> callback)Fetch all delivery api keys.CMACallback<CMAArray<CMAApiKey>>fetchAll(java.lang.String spaceId, java.util.Map<java.lang.String,java.lang.String> query, CMACallback<CMAArray<CMAApiKey>> callback)Query for specific api keys.CMACallback<CMAArray<CMAApiKey>>fetchAll(java.util.Map<java.lang.String,java.lang.String> query, CMACallback<CMAArray<CMAApiKey>> callback)Query for specific api keys.CMACallback<CMAApiKey>fetchOne(java.lang.String keyId, CMACallback<CMAApiKey> callback)Fetch only one delivery api key.CMACallback<CMAApiKey>fetchOne(java.lang.String spaceId, java.lang.String keyId, CMACallback<CMAApiKey> callback)Fetch only one delivery api key.CMACallback<CMAApiKey>update(CMAApiKey key, CMACallback<CMAApiKey> callback)Update an existing delivery api key.
-
-
-
Method Detail
-
fetchAll
public CMACallback<CMAArray<CMAApiKey>> fetchAll(CMACallback<CMAArray<CMAApiKey>> callback)
Fetch all delivery api keys.- Parameters:
callback- the callback to be informed about success or failure.- Returns:
- the callback to be informed about success or failure.
- 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<CMAApiKey>> fetchAll(java.lang.String spaceId, CMACallback<CMAArray<CMAApiKey>> callback)
Fetch all delivery api keys.- Parameters:
spaceId- the id of the space this is valid on.callback- the callback to be informed about success or failure.- Returns:
- the callback to be informed about success or failure.
- Throws:
java.lang.IllegalArgumentException- if spaceId is null.
-
fetchAll
public CMACallback<CMAArray<CMAApiKey>> fetchAll(java.util.Map<java.lang.String,java.lang.String> query, CMACallback<CMAArray<CMAApiKey>> callback)
Query for specific api keys.- Parameters:
query- the terms to query for specific keys.callback- the callback to be informed about success or failure.- Returns:
- the callback to be informed about success of failure.
- 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<CMAApiKey>> fetchAll(java.lang.String spaceId, java.util.Map<java.lang.String,java.lang.String> query, CMACallback<CMAArray<CMAApiKey>> callback)
Query for specific api keys.- Parameters:
spaceId- the id of the space to host the api keys.query- the terms to query for specific keys.callback- the callback to be informed about success or failure.- Returns:
- the callback to be informed about success of failure.
- Throws:
java.lang.IllegalArgumentException- if spaceId is null.
-
fetchOne
public CMACallback<CMAApiKey> fetchOne(java.lang.String keyId, CMACallback<CMAApiKey> callback)
Fetch only one delivery api key.- Parameters:
keyId- the id of the key itself.callback- the callback to be called once the key is available.- Returns:
- the callback to be informed about success or failure.
- Throws:
java.lang.IllegalArgumentException- if configured spaceId is null.java.lang.IllegalArgumentException- if keyId is null.CMANotWithEnvironmentsException- if environmentId was set usingCMAClient.Builder.setEnvironmentId(String).- See Also:
CMAClient.Builder.setSpaceId(String)
-
fetchOne
public CMACallback<CMAApiKey> fetchOne(java.lang.String spaceId, java.lang.String keyId, CMACallback<CMAApiKey> callback)
Fetch only one delivery api key.- Parameters:
spaceId- the id of the space this is valid on.keyId- the id of the key itself.callback- the callback to be called once the key is available.- Returns:
- the callback to be informed about success or failure.
- Throws:
java.lang.IllegalArgumentException- if spaceId is null.java.lang.IllegalArgumentException- if keyId is null.
-
create
public CMACallback<CMAApiKey> create(CMAApiKey key, CMACallback<CMAApiKey> callback)
Create a new delivery api key.- Parameters:
key- the key to be created.callback- the callback to be called once the key is available.- Returns:
- the callback to be informed about success or failure.
- Throws:
java.lang.IllegalArgumentException- if configured spaceId is null.java.lang.IllegalArgumentException- if key is null.CMANotWithEnvironmentsException- if environmentId was set usingCMAClient.Builder.setEnvironmentId(String).- See Also:
CMAClient.Builder.setSpaceId(String)
-
create
public CMACallback<CMAApiKey> create(java.lang.String spaceId, CMAApiKey key, CMACallback<CMAApiKey> callback)
Create a new delivery api key.- Parameters:
spaceId- the id of the space this is valid on.key- the key to be created.callback- the callback to be called once the key is available.- Returns:
- the callback to be informed about success or failure.
- Throws:
java.lang.IllegalArgumentException- if spaceId is null.java.lang.IllegalArgumentException- if key is null.
-
update
public CMACallback<CMAApiKey> update(CMAApiKey key, CMACallback<CMAApiKey> callback)
Update an existing delivery api key.- Parameters:
key- the key to be updated.callback- the callback to be called once the key is available.- Returns:
- the callback to be informed about success or failure.
- Throws:
java.lang.IllegalArgumentException- if configured spaceId is null.java.lang.IllegalArgumentException- if key is null.CMANotWithEnvironmentsException- if environmentId was set usingCMAClient.Builder.setEnvironmentId(String).- See Also:
CMAClient.Builder.setSpaceId(String)
-
delete
public CMACallback<java.lang.Integer> delete(CMAApiKey key, CMACallback<java.lang.Integer> callback)
Delete a given delivery api key.- Parameters:
key- the key to be deleted.callback- the callback to be called once the key is available.- Returns:
- the callback to be informed about success or failure.
- Throws:
java.lang.IllegalArgumentException- if key is null.java.lang.IllegalArgumentException- if key's spaceId is null.CMANotWithEnvironmentsException- if environmentId was set usingCMAClient.Builder.setEnvironmentId(String).- See Also:
CMAClient.Builder.setSpaceId(String)
-
-