Class ModuleContentTypes.Async
- java.lang.Object
-
- com.contentful.java.cma.ModuleContentTypes.Async
-
- Enclosing class:
- ModuleContentTypes
public class ModuleContentTypes.Async extends java.lang.ObjectAsync module.
-
-
Constructor Summary
Constructors Constructor Description Async()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CMACallback<CMAContentType>create(CMAContentType contentType, CMACallback<CMAContentType> callback)Create a new Content Type using the configured space and environment.CMACallback<CMAContentType>create(java.lang.String spaceId, java.lang.String environmentId, CMAContentType contentType, CMACallback<CMAContentType> callback)Create a new Content Type in the given environment.CMACallback<java.lang.Integer>delete(CMAContentType contentType, CMACallback<java.lang.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(java.lang.String spaceId, java.lang.String environmentId, CMACallback<CMAArray<CMAContentType>> callback)Fetch all Content Types from the given space and environment.CMACallback<CMAArray<CMAContentType>>fetchAll(java.lang.String spaceId, java.lang.String environmentId, java.util.Map<java.lang.String,java.lang.String> query, CMACallback<CMAArray<CMAContentType>> callback)Fetch all Content Types from the given space and environment using a query.CMACallback<CMAArray<CMAContentType>>fetchAll(java.util.Map<java.lang.String,java.lang.String> query, CMACallback<CMAArray<CMAContentType>> callback)Fetch all Content Types from the configured space and environment with a query.CMACallback<CMAArray<CMASnapshot>>fetchAllSnapshots(CMAContentType contentType, CMACallback<CMAArray<CMASnapshot>> callback)Fetch all snapshots of this content type.CMACallback<CMAContentType>fetchOne(java.lang.String contentTypeId, CMACallback<CMAContentType> callback)Fetch a Content Type with the givencontentTypeIdfrom the configured space and environment.CMACallback<CMAContentType>fetchOne(java.lang.String spaceId, java.lang.String environmentId, java.lang.String contentTypeId, CMACallback<CMAContentType> callback)Fetch a Content Type with the givencontentTypeIdfrom the given space.CMACallback<CMASnapshot>fetchOneSnapshot(CMAContentType contentType, java.lang.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.
-
-
-
Method Detail
-
create
public CMACallback<CMAContentType> create(CMAContentType contentType, CMACallback<CMAContentType> callback)
Create a new Content Type using the configured space and environment.In case the given
contentTypehas 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.- Parameters:
contentType- Content Typecallback- Callback- Returns:
- the given CMACallback instance
- Throws:
java.lang.IllegalArgumentException- if configured space id is null.java.lang.IllegalArgumentException- if configured environment id is null.java.lang.IllegalArgumentException- if contentType is null.java.lang.IllegalArgumentException- if contentTypeId is null.- See Also:
CMAClient.Builder.setSpaceId(String),CMAClient.Builder.setEnvironmentId(String)
-
create
public CMACallback<CMAContentType> create(java.lang.String spaceId, java.lang.String environmentId, CMAContentType contentType, CMACallback<CMAContentType> callback)
Create a new Content Type in the given environment.In case the given
contentTypehas 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)andCMAClient.Builder.setEnvironmentId(String).- Parameters:
spaceId- Space IDenvironmentId- Environment IDcontentType- Content Typecallback- Callback- Returns:
- the given CMACallback instance
- Throws:
java.lang.IllegalArgumentException- if spaceId is null.java.lang.IllegalArgumentException- if environmentId is null.java.lang.IllegalArgumentException- if contentType is null.java.lang.IllegalArgumentException- if contentTypeId is null.
-
delete
public CMACallback<java.lang.Integer> delete(CMAContentType contentType, CMACallback<java.lang.Integer> callback)
Delete a Content Type.- Parameters:
contentType- Content Typecallback- Callback- Returns:
- the given CMACallback instance
- Throws:
java.lang.IllegalArgumentException- if spaceId is null.java.lang.IllegalArgumentException- if contentTypeId is null.
-
fetchAll
public CMACallback<CMAArray<CMAContentType>> fetchAll(CMACallback<CMAArray<CMAContentType>> callback)
Fetch all Content Types from the configured space and environment.- Parameters:
callback- Callback- Returns:
- the given CMACallback instance
- Throws:
java.lang.IllegalArgumentException- if configured space id is null.java.lang.IllegalArgumentException- if configured environment id is null.- See Also:
CMAClient.Builder.setSpaceId(String),CMAClient.Builder.setEnvironmentId(String)
-
fetchAll
public CMACallback<CMAArray<CMAContentType>> fetchAll(java.util.Map<java.lang.String,java.lang.String> query, CMACallback<CMAArray<CMAContentType>> callback)
Fetch all Content Types from the configured space and environment with a query.- Parameters:
query- Querycallback- Callback- Returns:
- the given CMACallback instance
- Throws:
java.lang.IllegalArgumentException- if the configured space id is null.java.lang.IllegalArgumentException- if the configured environment id is null.- See Also:
CMAClient.Builder.setSpaceId(String),CMAClient.Builder.setEnvironmentId(String)
-
fetchAll
public CMACallback<CMAArray<CMAContentType>> fetchAll(java.lang.String spaceId, java.lang.String environmentId, CMACallback<CMAArray<CMAContentType>> callback)
Fetch all Content Types from the given space and environment.This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String)andCMAClient.Builder.setEnvironmentId(String).- Parameters:
spaceId- Space IDenvironmentId- Environment IDcallback- Callback- Returns:
- the given CMACallback instance
- Throws:
java.lang.IllegalArgumentException- if space id is null.java.lang.IllegalArgumentException- if environment id is null.
-
fetchAll
public CMACallback<CMAArray<CMAContentType>> fetchAll(java.lang.String spaceId, java.lang.String environmentId, java.util.Map<java.lang.String,java.lang.String> query, CMACallback<CMAArray<CMAContentType>> callback)
Fetch all Content Types from the given space and environment using a query.This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String)andCMAClient.Builder.setEnvironmentId(String).- Parameters:
spaceId- Space IDenvironmentId- Environment IDcallback- Callbackquery- Query- Returns:
- the given CMACallback instance
- Throws:
java.lang.IllegalArgumentException- if space id is null.java.lang.IllegalArgumentException- if environment id is null.java.lang.IllegalArgumentException- if query is null.
-
fetchOne
public CMACallback<CMAContentType> fetchOne(java.lang.String contentTypeId, CMACallback<CMAContentType> callback)
Fetch a Content Type with the givencontentTypeIdfrom the configured space and environment.- Parameters:
contentTypeId- Content Type IDcallback- Callback- Returns:
- the given CMACallback instance
- Throws:
java.lang.IllegalArgumentException- if configured space id is null.java.lang.IllegalArgumentException- if configured environment id is null.java.lang.IllegalArgumentException- if contentTypeId is null.- See Also:
CMAClient.Builder.setSpaceId(String),CMAClient.Builder.setEnvironmentId(String)
-
fetchOne
public CMACallback<CMAContentType> fetchOne(java.lang.String spaceId, java.lang.String environmentId, java.lang.String contentTypeId, CMACallback<CMAContentType> callback)
Fetch a Content Type with the givencontentTypeIdfrom the given space.This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String)andCMAClient.Builder.setEnvironmentId(String).- Parameters:
spaceId- Space IDenvironmentId- Environment IDcontentTypeId- Content Type IDcallback- Callback- Returns:
- the given CMACallback instance
- Throws:
java.lang.IllegalArgumentException- if space id is null.java.lang.IllegalArgumentException- if environment id is null.java.lang.IllegalArgumentException- if contentTypeId is null.
-
publish
public CMACallback<CMAContentType> publish(CMAContentType contentType, CMACallback<CMAContentType> callback)
Publish a Content Type.- Parameters:
contentType- Content Typecallback- Callback- Returns:
- the given CMACallback instance
- Throws:
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.
-
unPublish
public CMACallback<CMAContentType> unPublish(CMAContentType contentType, CMACallback<CMAContentType> callback)
Un-Publish a Content Type.- Parameters:
contentType- Content Typecallback- Callback- Returns:
- the given CMACallback instance
- Throws:
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.
-
update
public CMACallback<CMAContentType> update(CMAContentType contentType, CMACallback<CMAContentType> callback)
Update a Content Type.- Parameters:
contentType- Content Typecallback- Callback- Returns:
- the given CMACallback instance
- Throws:
java.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.
-
fetchAllSnapshots
public CMACallback<CMAArray<CMASnapshot>> fetchAllSnapshots(CMAContentType contentType, CMACallback<CMAArray<CMASnapshot>> callback)
Fetch all snapshots of this content type.- Parameters:
contentType- the contentType whose snapshots to be returned.callback- the callback to be informed about success or failure.- Returns:
- the callback.
- Throws:
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.
-
fetchOneSnapshot
public CMACallback<CMASnapshot> fetchOneSnapshot(CMAContentType contentType, java.lang.String snapshotId, CMACallback<CMASnapshot> callback)
Fetch a specific snapshot of this content type.- Parameters:
contentType- the contentType whose snapshot to be returned.snapshotId- the snapshot to be returned.callback- the callback to be informed about success or failure.- Returns:
- a callback to inform about transaction results.
- Throws:
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.
-
-