public final class ModuleEditorInterfaces
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
ModuleEditorInterfaces.Async
Async module.
|
Constructor and Description |
---|
ModuleEditorInterfaces(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 |
---|---|
ModuleEditorInterfaces.Async |
async() |
protected com.contentful.java.cma.ServiceEditorInterfaces |
createService(retrofit2.Retrofit retrofit) |
CMAEditorInterface |
fetchOne(java.lang.String contentTypeId)
Return an editor interface by id using the configured space and environment.
|
CMAEditorInterface |
fetchOne(java.lang.String spaceId,
java.lang.String environmentId,
java.lang.String contentTypeId)
Get the editor interface by id, using the given space and environment.
|
CMAEditorInterface |
update(CMAEditorInterface editor)
Update an editor interface.
|
public ModuleEditorInterfaces(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.ServiceEditorInterfaces createService(retrofit2.Retrofit retrofit)
public CMAEditorInterface fetchOne(java.lang.String contentTypeId)
contentTypeId
- the contentTypeId this editor interface is valid on.java.lang.IllegalArgumentException
- if configured space id is null.java.lang.IllegalArgumentException
- if configured environment id is null.java.lang.IllegalArgumentException
- if content type id is null.CMAClient.Builder.setSpaceId(String)
,
CMAClient.Builder.setEnvironmentId(String)
public CMAEditorInterface fetchOne(java.lang.String spaceId, java.lang.String environmentId, java.lang.String contentTypeId)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String)
and
CMAClient.Builder.setEnvironmentId(String)
.
spaceId
- the id of the space this environment is part of.environmentId
- the id of the environment this editor interface is valid on.contentTypeId
- the contentTypeId this editor interface is valid on.java.lang.IllegalArgumentException
- if space id is null.java.lang.IllegalArgumentException
- if environment id is null.java.lang.IllegalArgumentException
- if content type id is null.public CMAEditorInterface update(CMAEditorInterface editor)
editor
- the editor interface to be updated on Contentful.java.lang.IllegalArgumentException
- if editors spaceId is null.java.lang.IllegalArgumentException
- if editors contentType is null.java.lang.IllegalArgumentException
- if editors contentTypeId is null.java.lang.IllegalArgumentException
- if editors version is not set.public ModuleEditorInterfaces.Async async()
Copyright © 2019 Contentful, GmbH.. All Rights Reserved.