public final class ModuleApiKeys
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
ModuleApiKeys.Async
Async module.
|
| Constructor and Description |
|---|
ModuleApiKeys(retrofit2.Retrofit retrofit,
java.util.concurrent.Executor callbackExecutor,
java.lang.String spaceId,
java.lang.String environmentId,
boolean environmentIdConfigured) |
| Modifier and Type | Method and Description |
|---|---|
ModuleApiKeys.Async |
async() |
CMAApiKey |
create(CMAApiKey key)
Create a new delivery api key from the configured space.
|
CMAApiKey |
create(java.lang.String spaceId,
CMAApiKey key)
Create a new delivery api key.
|
protected com.contentful.java.cma.ServiceApiKeys |
createService(retrofit2.Retrofit retrofit) |
CMAArray<CMAApiKey> |
fetchAll()
Fetch all delivery API keys from the configured space.
|
CMAArray<CMAApiKey> |
fetchAll(java.util.Map<java.lang.String,java.lang.String> query)
Query for specific api keys from the configured space.
|
CMAArray<CMAApiKey> |
fetchAll(java.lang.String spaceId)
Fetch all delivery api keys from the given space.
|
CMAArray<CMAApiKey> |
fetchAll(java.lang.String spaceId,
java.util.Map<java.lang.String,java.lang.String> query)
Query for specific api keys, overriding the configuration set.
|
CMAApiKey |
fetchOne(java.lang.String keyId)
Fetch only one delivery api key from the configured space.
|
CMAApiKey |
fetchOne(java.lang.String spaceId,
java.lang.String keyId)
Fetch only one delivery api key.
|
public ModuleApiKeys(retrofit2.Retrofit retrofit,
java.util.concurrent.Executor callbackExecutor,
java.lang.String spaceId,
java.lang.String environmentId,
boolean environmentIdConfigured)
protected com.contentful.java.cma.ServiceApiKeys createService(retrofit2.Retrofit retrofit)
public CMAArray<CMAApiKey> fetchAll()
java.lang.IllegalArgumentException - if configured space Id is null.CMANotWithEnvironmentsException - if environmentId was set using
CMAClient.Builder.setEnvironmentId(String).CMAClient.Builder.setSpaceId(String)public CMAArray<CMAApiKey> fetchAll(java.lang.String spaceId)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and will ignore
CMAClient.Builder.setEnvironmentId(String).
spaceId - the id of the space to host the api keys.java.lang.IllegalArgumentException - if spaceId is null.public CMAArray<CMAApiKey> fetchAll(java.util.Map<java.lang.String,java.lang.String> query)
java.lang.IllegalArgumentException - if configured space Id is null.CMANotWithEnvironmentsException - if environmentId was set using
CMAClient.Builder.setEnvironmentId(String).CMAClient.Builder.setSpaceId(String)public CMAArray<CMAApiKey> fetchAll(java.lang.String spaceId, java.util.Map<java.lang.String,java.lang.String> query)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and will ignore
CMAClient.Builder.setEnvironmentId(String).
spaceId - the id of the space to host the api keys.query - the terms to query for specific keys.java.lang.IllegalArgumentException - if spaceId is null.public CMAApiKey fetchOne(java.lang.String keyId)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and will ignore
CMAClient.Builder.setEnvironmentId(String).
keyId - the id of the key itself.java.lang.IllegalArgumentException - if configured spaceId is null.java.lang.IllegalArgumentException - if keyId is null.CMANotWithEnvironmentsException - if environmentId was set using
CMAClient.Builder.setEnvironmentId(String).CMAClient.Builder.setSpaceId(String)public CMAApiKey fetchOne(java.lang.String spaceId, java.lang.String keyId)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and will ignore
CMAClient.Builder.setEnvironmentId(String).
spaceId - the id of the space this is valid on.keyId - the id of the key itself.java.lang.IllegalArgumentException - if spaceId is null.java.lang.IllegalArgumentException - if keyId is null.public CMAApiKey create(CMAApiKey key)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and will ignore
CMAClient.Builder.setEnvironmentId(String).
key - the key to be created.java.lang.IllegalArgumentException - if configured spaceId is null.java.lang.IllegalArgumentException - if key is null.CMANotWithEnvironmentsException - if environmentId was set using
CMAClient.Builder.setEnvironmentId(String).CMAClient.Builder.setSpaceId(String)public CMAApiKey create(java.lang.String spaceId, CMAApiKey key)
spaceId - the id of the space this is valid on.key - the key to be created.java.lang.IllegalArgumentException - if spaceId is null.java.lang.IllegalArgumentException - if key is null.public ModuleApiKeys.Async async()
Copyright © 2018 Contentful, GmbH.. All Rights Reserved.