public class ModuleContentTypes.Async extends Object
| Constructor and Description |
|---|
Async() |
| Modifier and Type | Method and Description |
|---|---|
CMACallback<CMAContentType> |
create(CMAContentType contentType,
CMACallback<CMAContentType> callback)
Create a new Content Type using the configured space and environment.
|
CMACallback<CMAContentType> |
create(String spaceId,
String environmentId,
CMAContentType contentType,
CMACallback<CMAContentType> callback)
Create a new Content Type in the given environment.
|
CMACallback<Integer> |
delete(CMAContentType contentType,
CMACallback<Integer> callback)
Delete a Content Type.
|
CMACallback<CMAArray<CMAContentType>> |
fetchAll(CMACallback<CMAArray<CMAContentType>> callback)
Fetch all Content Types from the configured space and environment.
|
CMACallback<CMAArray<CMAContentType>> |
fetchAll(Map<String,String> query,
CMACallback<CMAArray<CMAContentType>> callback)
Fetch all Content Types from the configured space and environment with a query.
|
CMACallback<CMAArray<CMAContentType>> |
fetchAll(String spaceId,
String environmentId,
CMACallback<CMAArray<CMAContentType>> callback)
Fetch all Content Types from the given space and environment.
|
CMACallback<CMAArray<CMAContentType>> |
fetchAll(String spaceId,
String environmentId,
Map<String,String> query,
CMACallback<CMAArray<CMAContentType>> callback)
Fetch all Content Types from the given space and environment using a query.
|
CMACallback<CMAArray<CMASnapshot>> |
fetchAllSnapshots(CMAContentType contentType,
CMACallback<CMAArray<CMASnapshot>> callback)
Fetch all snapshots of this content type.
|
CMACallback<CMAContentType> |
fetchOne(String contentTypeId,
CMACallback<CMAContentType> callback)
Fetch a Content Type with the given
contentTypeId from the configured space and
environment. |
CMACallback<CMAContentType> |
fetchOne(String spaceId,
String environmentId,
String contentTypeId,
CMACallback<CMAContentType> callback)
Fetch a Content Type with the given
contentTypeId from the given space. |
CMACallback<CMASnapshot> |
fetchOneSnapshot(CMAContentType contentType,
String snapshotId,
CMACallback<CMASnapshot> callback)
Fetch a specific snapshot of this content type.
|
CMACallback<CMAContentType> |
publish(CMAContentType contentType,
CMACallback<CMAContentType> callback)
Publish a Content Type.
|
CMACallback<CMAContentType> |
unPublish(CMAContentType contentType,
CMACallback<CMAContentType> callback)
Un-Publish a Content Type.
|
CMACallback<CMAContentType> |
update(CMAContentType contentType,
CMACallback<CMAContentType> callback)
Update a Content Type.
|
public CMACallback<CMAContentType> create(CMAContentType contentType, CMACallback<CMAContentType> callback)
In case the given 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.
contentType - Content Typecallback - CallbackIllegalArgumentException - if configured space id is null.IllegalArgumentException - if configured environment id is null.IllegalArgumentException - if contentType is null.IllegalArgumentException - if contentTypeId is null.CMAClient.Builder.setSpaceId(String),
CMAClient.Builder.setEnvironmentId(String)public CMACallback<CMAContentType> create(String spaceId, String environmentId, CMAContentType contentType, CMACallback<CMAContentType> callback)
In case the given 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.
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and
CMAClient.Builder.setEnvironmentId(String).
spaceId - Space IDenvironmentId - Environment IDcontentType - Content Typecallback - CallbackIllegalArgumentException - if spaceId is null.IllegalArgumentException - if environmentId is null.IllegalArgumentException - if contentType is null.IllegalArgumentException - if contentTypeId is null.public CMACallback<Integer> delete(CMAContentType contentType, CMACallback<Integer> callback)
contentType - Content Typecallback - CallbackIllegalArgumentException - if spaceId is null.IllegalArgumentException - if contentTypeId is null.public CMACallback<CMAArray<CMAContentType>> fetchAll(CMACallback<CMAArray<CMAContentType>> callback)
callback - CallbackIllegalArgumentException - if configured space id is null.IllegalArgumentException - if configured environment id is null.CMAClient.Builder.setSpaceId(String),
CMAClient.Builder.setEnvironmentId(String)public CMACallback<CMAArray<CMAContentType>> fetchAll(Map<String,String> query, CMACallback<CMAArray<CMAContentType>> callback)
query - Querycallback - CallbackIllegalArgumentException - if the configured space id is null.IllegalArgumentException - if the configured environment id is null.CMAClient.Builder.setSpaceId(String),
CMAClient.Builder.setEnvironmentId(String)public CMACallback<CMAArray<CMAContentType>> fetchAll(String spaceId, String environmentId, CMACallback<CMAArray<CMAContentType>> callback)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and
CMAClient.Builder.setEnvironmentId(String).
spaceId - Space IDenvironmentId - Environment IDcallback - CallbackIllegalArgumentException - if space id is null.IllegalArgumentException - if environment id is null.public CMACallback<CMAArray<CMAContentType>> fetchAll(String spaceId, String environmentId, Map<String,String> query, CMACallback<CMAArray<CMAContentType>> callback)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and
CMAClient.Builder.setEnvironmentId(String).
spaceId - Space IDenvironmentId - Environment IDcallback - Callbackquery - QueryIllegalArgumentException - if space id is null.IllegalArgumentException - if environment id is null.IllegalArgumentException - if query is null.public CMACallback<CMAContentType> fetchOne(String contentTypeId, CMACallback<CMAContentType> callback)
contentTypeId from the configured space and
environment.contentTypeId - Content Type IDcallback - CallbackIllegalArgumentException - if configured space id is null.IllegalArgumentException - if configured environment id is null.IllegalArgumentException - if contentTypeId is null.CMAClient.Builder.setSpaceId(String),
CMAClient.Builder.setEnvironmentId(String)public CMACallback<CMAContentType> fetchOne(String spaceId, String environmentId, String contentTypeId, CMACallback<CMAContentType> callback)
contentTypeId from the given space.
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and
CMAClient.Builder.setEnvironmentId(String).
spaceId - Space IDenvironmentId - Environment IDcontentTypeId - Content Type IDcallback - CallbackIllegalArgumentException - if space id is null.IllegalArgumentException - if environment id is null.IllegalArgumentException - if contentTypeId is null.public CMACallback<CMAContentType> publish(CMAContentType contentType, CMACallback<CMAContentType> callback)
contentType - Content Typecallback - CallbackIllegalArgumentException - if contentType is null.IllegalArgumentException - if contentType's id is null.IllegalArgumentException - if contentType's space id is null.public CMACallback<CMAContentType> unPublish(CMAContentType contentType, CMACallback<CMAContentType> callback)
contentType - Content Typecallback - CallbackIllegalArgumentException - if contentType is null.IllegalArgumentException - if contentType's id is null.IllegalArgumentException - if contentType's space id is null.public CMACallback<CMAContentType> update(CMAContentType contentType, CMACallback<CMAContentType> callback)
contentType - Content Typecallback - CallbackIllegalArgumentException - if contentType is null.IllegalArgumentException - if contentType's name is null.IllegalArgumentException - if contentType's id is null.IllegalArgumentException - if contentType's space id is null.IllegalArgumentException - if contentType's version is null.public CMACallback<CMAArray<CMASnapshot>> fetchAllSnapshots(CMAContentType contentType, CMACallback<CMAArray<CMASnapshot>> callback)
contentType - the contentType whose snapshots to be returned.callback - the callback to be informed about success or failure.IllegalArgumentException - if contentType is null.IllegalArgumentException - if contentType's id is null.IllegalArgumentException - if contentType's space id is null.public CMACallback<CMASnapshot> fetchOneSnapshot(CMAContentType contentType, String snapshotId, CMACallback<CMASnapshot> callback)
contentType - the contentType whose snapshot to be returned.snapshotId - the snapshot to be returned.callback - the callback to be informed about success or failure.IllegalArgumentException - if contentType is null.IllegalArgumentException - if contentType's id is null.IllegalArgumentException - if contentType's space id is null.IllegalArgumentException - if snapshotId is null.Copyright © 2026 Contentful, GmbH.. All rights reserved.