public final class ModuleSpaces
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
ModuleSpaces.Async
Async module.
|
Constructor and Description |
---|
ModuleSpaces(retrofit2.Retrofit retrofit,
java.util.concurrent.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,
java.lang.String organizationId)
Create a Space in an organization.
|
CMASpace |
create(java.lang.String spaceName)
Create a Space.
|
CMASpace |
create(java.lang.String spaceName,
java.lang.String organizationId)
Create a Space in an Organization.
|
protected com.contentful.java.cma.ServiceSpaces |
createService(retrofit2.Retrofit retrofit) |
java.lang.Integer |
delete(CMASpace space)
Delete a Space.
|
java.lang.Integer |
delete(java.lang.String spaceId)
Delete a Space.
|
CMAArray<CMASpace> |
fetchAll()
Fetch all Spaces.
|
CMAArray<CMASpace> |
fetchAll(java.util.Map<java.lang.String,java.lang.String> query)
Fetch all Spaces, using specific queries.
|
CMASpace |
fetchOne(java.lang.String spaceId)
Fetch a Space with a given
spaceId . |
CMASpace |
update(CMASpace space)
Update a Space.
|
public ModuleSpaces(retrofit2.Retrofit retrofit, java.util.concurrent.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(java.lang.String spaceName)
spaceName
- Space nameCMASpace
result instancejava.lang.IllegalArgumentException
- if spaceName is null.public CMASpace create(CMASpace space)
space
- CMASpaceCMASpace
result instancejava.lang.IllegalArgumentException
- if space is null.public CMASpace create(java.lang.String spaceName, java.lang.String organizationId)
spaceName
- Space nameorganizationId
- organization IDCMASpace
result instancejava.lang.IllegalArgumentException
- if spaceName is null.java.lang.IllegalArgumentException
- if organizationId is null.public CMASpace create(CMASpace space, java.lang.String organizationId)
space
- SpaceorganizationId
- organization IDCMASpace
result instancejava.lang.IllegalArgumentException
- if space is null.java.lang.IllegalArgumentException
- if space's name is null.java.lang.IllegalArgumentException
- if organizationId is null.public java.lang.Integer delete(java.lang.String spaceId)
spaceId
- Space IDjava.lang.IllegalArgumentException
- if space's id is null.public java.lang.Integer delete(CMASpace space)
space
- Spacejava.lang.IllegalArgumentException
- if space's id is null.public CMAArray<CMASpace> fetchAll(java.util.Map<java.lang.String,java.lang.String> query)
query
- filter the resultsCMAArray
result instancepublic CMASpace fetchOne(java.lang.String spaceId)
spaceId
.spaceId
- Space IDCMASpace
result instancejava.lang.IllegalArgumentException
- if space's id is null.public CMASpace update(CMASpace space)
space
- SpaceCMASpace
result instancejava.lang.IllegalArgumentException
- if space is null.java.lang.IllegalArgumentException
- if space's name is null.java.lang.IllegalArgumentException
- if space's space id is null.java.lang.IllegalArgumentException
- if space's version is null.public ModuleSpaces.Async async()
Copyright © 2019 Contentful, GmbH.. All Rights Reserved.