public final class ModuleContentTypes
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
ModuleContentTypes.Async
Async module.
|
| Constructor and Description |
|---|
ModuleContentTypes(retrofit2.Retrofit retrofit,
java.util.concurrent.Executor callbackExecutor) |
| Modifier and Type | Method and Description |
|---|---|
ModuleContentTypes.Async |
async() |
CMAContentType |
create(java.lang.String spaceId,
CMAContentType contentType)
Create a new Content Type.
|
protected com.contentful.java.cma.ServiceContentTypes |
createService(retrofit2.Retrofit retrofit) |
java.lang.Integer |
delete(java.lang.String spaceId,
java.lang.String contentTypeId)
Delete a Content Type.
|
CMAArray<CMAContentType> |
fetchAll(java.lang.String spaceId)
Fetch all Content Types from a Space, using default query parameter.
|
CMAArray<CMAContentType> |
fetchAll(java.lang.String spaceId,
java.util.Map<java.lang.String,java.lang.String> query)
Fetch all Content Types from a Space with query parameters.
|
CMAArray<CMASnapshot> |
fetchAllSnapshots(CMAContentType contentType)
Fetch all snapshots of this content type.
|
CMAContentType |
fetchOne(java.lang.String spaceId,
java.lang.String contentTypeId)
Fetch a Content Type with the given
contentTypeId from a Space. |
CMASnapshot |
fetchOneSnapshot(CMAContentType contentType,
java.lang.String snapshotId)
Fetch a specific snapshot of this content type.
|
CMAContentType |
publish(CMAContentType contentType)
Publish a Content Type.
|
CMAContentType |
unPublish(CMAContentType contentType)
Un-Publish a Content Type.
|
CMAContentType |
update(CMAContentType contentType)
Update a Content Type.
|
public ModuleContentTypes(retrofit2.Retrofit retrofit,
java.util.concurrent.Executor callbackExecutor)
protected com.contentful.java.cma.ServiceContentTypes createService(retrofit2.Retrofit retrofit)
public CMAContentType create(java.lang.String spaceId, CMAContentType contentType)
contentType has an ID associated with it, that ID will be used,
otherwise the server will auto-generate an ID that will be contained in the response upon
success.spaceId - Space IDcontentType - Content TypeCMAContentType result instancejava.lang.IllegalArgumentException - if spaceId is null.java.lang.IllegalArgumentException - if contentType is null.public java.lang.Integer delete(java.lang.String spaceId,
java.lang.String contentTypeId)
spaceId - Space IDcontentTypeId - Content Type IDjava.lang.IllegalArgumentException - if spaceId is null.java.lang.IllegalArgumentException - if contentTypeId is null.public CMAArray<CMAContentType> fetchAll(java.lang.String spaceId)
This fetch uses the default parameter defined in DefaultQueryParameter.FETCH
spaceId - Space IDCMAArray result instancejava.lang.IllegalArgumentException - if spaceId is null.public CMAArray<CMAContentType> fetchAll(java.lang.String spaceId, java.util.Map<java.lang.String,java.lang.String> query)
spaceId - Space IDquery - Query to narrow down the content_types to be searched forCMAArray result instancejava.lang.IllegalArgumentException - if spaceId is null.public CMAContentType fetchOne(java.lang.String spaceId, java.lang.String contentTypeId)
contentTypeId from a Space.spaceId - Space IDcontentTypeId - Content Type IDCMAContentType result instancejava.lang.IllegalArgumentException - if spaceId is null.java.lang.IllegalArgumentException - if contentTypeId is null.public CMAContentType publish(CMAContentType contentType)
contentType - Content TypeCMAContentType result instancejava.lang.IllegalArgumentException - if contentType is null.java.lang.IllegalArgumentException - if contentType's id is null.java.lang.IllegalArgumentException - if contentType's space id is null.public CMAContentType unPublish(CMAContentType contentType)
contentType - Content TypeCMAContentType result instancejava.lang.IllegalArgumentException - if contentType is null.java.lang.IllegalArgumentException - if contentType's id is null.java.lang.IllegalArgumentException - if contentType's space id is null.public CMAContentType update(CMAContentType contentType)
contentType - Content TypeCMAContentType result instancejava.lang.IllegalArgumentException - if contentType is null.java.lang.IllegalArgumentException - if contentType's name is null.java.lang.IllegalArgumentException - if contentType's id is null.java.lang.IllegalArgumentException - if contentType's space id is null.java.lang.IllegalArgumentException - if contentType's version is null.public CMAArray<CMASnapshot> fetchAllSnapshots(CMAContentType contentType)
contentType - the contentType whose snapshots to be returned.java.lang.IllegalArgumentException - if contentType is null.java.lang.IllegalArgumentException - if contentType's id is null.java.lang.IllegalArgumentException - if contentType's space id is null.public CMASnapshot fetchOneSnapshot(CMAContentType contentType, java.lang.String snapshotId)
contentType - the contentType whose snapshot to be returned.snapshotId - the snapshot to be returned.java.lang.IllegalArgumentException - if contentType is null.java.lang.IllegalArgumentException - if contentType's id is null.java.lang.IllegalArgumentException - if contentType's space id is null.java.lang.IllegalArgumentException - if snapshotId is null.public ModuleContentTypes.Async async()
Copyright © 2018 Contentful, GmbH.. All Rights Reserved.