public final class ModulePreviewApiKeys
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
ModulePreviewApiKeys.Async
Async module.
|
| Constructor and Description |
|---|
ModulePreviewApiKeys(retrofit2.Retrofit retrofit,
java.util.concurrent.Executor callbackExecutor,
java.lang.String spaceId,
java.lang.String environmentId,
boolean environmentIdConfigured)
Create the module for preview api keys.
|
| Modifier and Type | Method and Description |
|---|---|
ModulePreviewApiKeys.Async |
async() |
protected com.contentful.java.cma.ServicePreviewApiKeys |
createService(retrofit2.Retrofit retrofit) |
CMAArray<CMAPreviewApiKey> |
fetchAll()
Fetch all preview API keys from the configured space.
|
CMAArray<CMAPreviewApiKey> |
fetchAll(java.lang.String spaceId)
Fetch all preview api keys from the given space.
|
CMAPreviewApiKey |
fetchOne(java.lang.String keyId)
Fetch only one preview api key from the configured space.
|
CMAPreviewApiKey |
fetchOne(java.lang.String spaceId,
java.lang.String keyId)
Fetch only one preview api key.
|
public ModulePreviewApiKeys(retrofit2.Retrofit retrofit,
java.util.concurrent.Executor callbackExecutor,
java.lang.String spaceId,
java.lang.String environmentId,
boolean environmentIdConfigured)
retrofit - the retrofit instance to be used to create the service.callbackExecutor - to tell on which thread it should run.spaceId - the space to be used when not given.environmentId - the environment to be used when not given.environmentIdConfigured - internal helper to see if environment was set.protected com.contentful.java.cma.ServicePreviewApiKeys createService(retrofit2.Retrofit retrofit)
public CMAArray<CMAPreviewApiKey> 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<CMAPreviewApiKey> 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 CMAPreviewApiKey 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 CMAPreviewApiKey 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 ModulePreviewApiKeys.Async async()
Copyright © 2019 Contentful, GmbH.. All Rights Reserved.