public final class ModuleContentTypes extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
ModuleContentTypes.Async
Async module.
|
| Constructor and Description |
|---|
ModuleContentTypes(retrofit.RestAdapter restAdapter,
Executor callbackExecutor) |
| Modifier and Type | Method and Description |
|---|---|
ModuleContentTypes.Async |
async()
Returns a module with a set of asynchronous methods.
|
CMAContentType |
create(String spaceId,
CMAContentType contentType)
Create a new Content Type.
|
protected com.contentful.java.cma.ServiceContentTypes |
createService(retrofit.RestAdapter restAdapter) |
retrofit.client.Response |
delete(String spaceId,
String contentTypeId)
Delete a Content Type.
|
CMAArray<CMAContentType> |
fetchAll(String spaceId)
Fetch all Content Types from a Space.
|
CMAArray<CMAContentType> |
fetchAll(String spaceId,
Map<String,String> query)
Fetch all Content Types from a Space with a query.
|
CMAContentType |
fetchOne(String spaceId,
String contentTypeId)
Fetch a Content Type with the given
contentTypeId from a Space. |
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(retrofit.RestAdapter restAdapter,
Executor callbackExecutor)
protected com.contentful.java.cma.ServiceContentTypes createService(retrofit.RestAdapter restAdapter)
public CMAContentType create(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 instancepublic retrofit.client.Response delete(String spaceId, String contentTypeId)
spaceId - Space IDcontentTypeId - Content Type IDResponse instancepublic CMAArray<CMAContentType> fetchAll(String spaceId)
spaceId - Space IDCMAArray result instancepublic CMAArray<CMAContentType> fetchAll(String spaceId, Map<String,String> query)
spaceId - Space IDquery - QueryCMAArray result instancepublic CMAContentType fetchOne(String spaceId, String contentTypeId)
contentTypeId from a Space.spaceId - Space IDcontentTypeId - Content Type IDCMAContentType result instancepublic CMAContentType publish(CMAContentType contentType)
contentType - Content TypeCMAContentType result instancepublic CMAContentType unPublish(CMAContentType contentType)
contentType - Content TypeCMAContentType result instancepublic CMAContentType update(CMAContentType contentType)
contentType - Content TypeCMAContentType result instancepublic ModuleContentTypes.Async async()
Copyright © 2015 Contentful, GmbH.. All Rights Reserved.