public final class ModuleUiExtensions
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
ModuleUiExtensions.Async
Async module.
|
Constructor and Description |
---|
ModuleUiExtensions(retrofit2.Retrofit retrofit,
java.util.concurrent.Executor callbackExecutor,
java.lang.String spaceId,
java.lang.String environmentId,
boolean environmentIdConfigured)
Create this module.
|
Modifier and Type | Method and Description |
---|---|
ModuleUiExtensions.Async |
async() |
CMAUiExtension |
create(CMAUiExtension extension)
Create a new ui extension.
|
CMAUiExtension |
create(java.lang.String spaceId,
java.lang.String environmentId,
CMAUiExtension extension)
Create a new ui extension.
|
protected com.contentful.java.cma.ServiceUiExtensions |
createService(retrofit2.Retrofit retrofit) |
java.lang.Integer |
delete(CMAUiExtension extension)
Delete a ui extension.
|
CMAArray<CMAUiExtension> |
fetchAll()
Fetch all ui extensions from the configured space and environment.
|
CMAArray<CMAUiExtension> |
fetchAll(java.util.Map<java.lang.String,java.lang.String> query)
Fetch all ui extensions from the configured space by a query.
|
CMAArray<CMAUiExtension> |
fetchAll(java.lang.String spaceId,
java.lang.String environmentId)
Fetch ui extensions from a given space.
|
CMAArray<CMAUiExtension> |
fetchAll(java.lang.String spaceId,
java.lang.String environmentId,
java.util.Map<java.lang.String,java.lang.String> query)
Fetch all ui extensions from a given space.
|
CMAUiExtension |
fetchOne(java.lang.String extensionId)
Fetch one ui extension from the configured space and environment.
|
CMAUiExtension |
fetchOne(java.lang.String spaceId,
java.lang.String environmentId,
java.lang.String extensionId)
Fetch one extension from the given space.
|
CMAUiExtension |
update(CMAUiExtension extension)
Update a ui extension.
|
public ModuleUiExtensions(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.ServiceUiExtensions createService(retrofit2.Retrofit retrofit)
public CMAUiExtension fetchOne(java.lang.String extensionId)
extensionId
- the id of the extension to be fetched.java.lang.IllegalArgumentException
- if extensionId is null.java.lang.IllegalArgumentException
- if configured space id is null.java.lang.IllegalArgumentException
- if configured environment id is null.CMAClient.Builder.setSpaceId(String)
,
CMAClient.Builder.setEnvironmentId(String)
public CMAUiExtension fetchOne(java.lang.String spaceId, java.lang.String environmentId, java.lang.String extensionId)
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.environmentId
- the id of the environment this is valid on.extensionId
- the id of the extension to be fetched.java.lang.IllegalArgumentException
- if spaceId is null.java.lang.IllegalArgumentException
- if environmentId is null.java.lang.IllegalArgumentException
- if extensionId is null.CMANotWithEnvironmentsException
- if environmentId was set using
CMAClient.Builder.setEnvironmentId(String)
.public CMAArray<CMAUiExtension> fetchAll()
java.lang.IllegalArgumentException
- if configured space id is null.java.lang.IllegalArgumentException
- if configured environment id is null.CMAClient.Builder.setSpaceId(String)
,
CMAClient.Builder.setEnvironmentId(String)
public CMAArray<CMAUiExtension> fetchAll(java.util.Map<java.lang.String,java.lang.String> query)
query
- controls what to return.java.lang.IllegalArgumentException
- if configured space id is null.java.lang.IllegalArgumentException
- if configured environment id is null.CMAClient.Builder.setSpaceId(String)
,
CMAClient.Builder.setEnvironmentId(String)
public CMAArray<CMAUiExtension> fetchAll(java.lang.String spaceId, java.lang.String environmentId)
CMAClient.Builder.setSpaceId(String)
and will ignore
CMAClient.Builder.setEnvironmentId(String)
.spaceId
- the id of the space this is valid on.environmentId
- the id of the environment this is valid on.java.lang.IllegalArgumentException
- if spaceId is null.java.lang.IllegalArgumentException
- if environmentId is null.public CMAArray<CMAUiExtension> fetchAll(java.lang.String spaceId, java.lang.String environmentId, 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 this is valid on.environmentId
- the id of the environment this is valid on.query
- controls what to return.java.lang.IllegalArgumentException
- if spaceId is null.java.lang.IllegalArgumentException
- if environment id is null.public CMAUiExtension update(CMAUiExtension extension)
extension
- the ui extension to be updated.java.lang.IllegalArgumentException
- if extension is null.java.lang.IllegalArgumentException
- if extension's version is null.java.lang.IllegalArgumentException
- if extension's id is null.java.lang.IllegalArgumentException
- if extension's spaceId is null.java.lang.IllegalArgumentException
- if extension's environment is null.public java.lang.Integer delete(CMAUiExtension extension)
extension
- the extension to be deleted.java.lang.IllegalArgumentException
- if extension is null.java.lang.IllegalArgumentException
- if extension's id is null.java.lang.IllegalArgumentException
- if extension's version is null.java.lang.IllegalArgumentException
- if extension's spaceId is null.public CMAUiExtension create(CMAUiExtension extension)
extension
- the ui extension to be added.java.lang.IllegalArgumentException
- if configured spaceId is null.java.lang.IllegalArgumentException
- if configured environmentId is null.java.lang.IllegalArgumentException
- if extension is null.java.lang.IllegalArgumentException
- if extension's id is null.java.lang.IllegalArgumentException
- if extension's version is null.CMAClient.Builder.setSpaceId(String)
,
CMAClient.Builder.setEnvironmentId(String)
public CMAUiExtension create(java.lang.String spaceId, java.lang.String environmentId, CMAUiExtension extension)
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 ui extension should be created in.environmentId
- the id of the environment this is valid on.extension
- the ui extension to be added.java.lang.IllegalArgumentException
- if spaceId is null.java.lang.IllegalArgumentException
- if extension is null.java.lang.IllegalArgumentException
- if extension's id is null.java.lang.IllegalArgumentException
- if extension's version is null.java.lang.IllegalArgumentException
- if extension's spaceId is null.public ModuleUiExtensions.Async async()
Copyright © 2019 Contentful, GmbH.. All Rights Reserved.