public class ModuleSpaces extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
ModuleSpaces.Async
Async module.
|
| Constructor and Description |
|---|
ModuleSpaces(retrofit2.Retrofit retrofit,
Executor callbackExecutor,
boolean environmentIdConfigured)
Create the spaces module.
|
| Modifier and Type | Method and Description |
|---|---|
ModuleSpaces.Async |
async() |
CMASpace |
create(CMASpace space)
Create a Space.
|
CMASpace |
create(CMASpace space,
String organizationId)
Create a Space in an organization.
|
CMASpace |
create(String spaceName)
Create a Space.
|
CMASpace |
create(String spaceName,
String organizationId)
Create a Space in an Organization.
|
protected com.contentful.java.cma.ServiceSpaces |
createService(retrofit2.Retrofit retrofit) |
Integer |
delete(CMASpace space)
Delete a Space.
|
Integer |
delete(String spaceId)
Delete a Space.
|
CMAArray<CMASpace> |
fetchAll()
Fetch all Spaces.
|
CMAArray<CMASpace> |
fetchAll(Map<String,String> query)
Fetch all Spaces, using specific queries.
|
CMASpace |
fetchOne(String spaceId)
Fetch a Space with a given
spaceId. |
CMASpace |
update(CMASpace space)
Update a Space.
|
public ModuleSpaces(retrofit2.Retrofit retrofit,
Executor callbackExecutor,
boolean environmentIdConfigured)
retrofit - the retrofit instance to be used to create the service.callbackExecutor - to tell on which thread it should run.environmentIdConfigured - internal helper to see if environment was set.protected com.contentful.java.cma.ServiceSpaces createService(retrofit2.Retrofit retrofit)
public CMASpace create(String spaceName)
spaceName - Space nameCMASpace result instanceIllegalArgumentException - if spaceName is null.public CMASpace create(CMASpace space)
space - CMASpaceCMASpace result instanceIllegalArgumentException - if space is null.public CMASpace create(String spaceName, String organizationId)
spaceName - Space nameorganizationId - organization IDCMASpace result instanceIllegalArgumentException - if spaceName is null.IllegalArgumentException - if organizationId is null.public CMASpace create(CMASpace space, String organizationId)
space - SpaceorganizationId - organization IDCMASpace result instanceIllegalArgumentException - if space is null.IllegalArgumentException - if space's name is null.IllegalArgumentException - if organizationId is null.public Integer delete(String spaceId)
spaceId - Space IDIllegalArgumentException - if space's id is null.public Integer delete(CMASpace space)
space - SpaceIllegalArgumentException - if space's id is null.public CMAArray<CMASpace> fetchAll(Map<String,String> query)
query - filter the resultsCMAArray result instancepublic CMASpace fetchOne(String spaceId)
spaceId.spaceId - Space IDCMASpace result instanceIllegalArgumentException - if space's id is null.public CMASpace update(CMASpace space)
space - SpaceCMASpace result instanceIllegalArgumentException - if space is null.IllegalArgumentException - if space's name is null.IllegalArgumentException - if space's space id is null.IllegalArgumentException - if space's version is null.public ModuleSpaces.Async async()
Copyright © 2026 Contentful, GmbH.. All rights reserved.