public class ModuleAssets.Async extends Object
| Constructor and Description |
|---|
Async() |
| Modifier and Type | Method and Description |
|---|---|
CMACallback<CMAAsset> |
archive(CMAAsset asset,
CMACallback<CMAAsset> callback)
Archive an Asset.
|
CMACallback<CMAAsset> |
create(CMAAsset asset,
CMACallback<CMAAsset> callback)
Create a new Asset in the configured space and environment.
|
CMACallback<CMAAsset> |
create(String spaceId,
String environmentId,
CMAAsset asset,
CMACallback<CMAAsset> callback)
Create a new Asset in the given space and environment.
|
CMACallback<Integer> |
delete(CMAAsset asset,
CMACallback<Integer> callback)
Delete an Asset.
|
CMACallback<CMAArray<CMAAsset>> |
fetchAll(CMACallback<CMAArray<CMAAsset>> callback)
Fetch all Assets from the configured space and environmentS.
|
CMACallback<CMAArray<CMAAsset>> |
fetchAll(Map<String,String> query,
CMACallback<CMAArray<CMAAsset>> callback)
Fetch all Assets.
|
CMACallback<CMAArray<CMAAsset>> |
fetchAll(String spaceId,
String environmentId,
CMACallback<CMAArray<CMAAsset>> callback)
Fetch all Assets from a Space's Environment.
|
CMACallback<CMAArray<CMAAsset>> |
fetchAll(String spaceId,
String environmentId,
Map<String,String> query,
CMACallback<CMAArray<CMAAsset>> callback)
Fetch all Assets from a Space's Environment with a query.
|
CMACallback<CMAAsset> |
fetchOne(String assetId,
CMACallback<CMAAsset> callback)
Fetch an Asset with the given
assetId from the configured space. |
CMACallback<CMAAsset> |
fetchOne(String spaceId,
String environmentId,
String assetId,
CMACallback<CMAAsset> callback)
Fetch an Asset with the given
assetId from a the given space and environment. |
CMACallback<Integer> |
process(CMAAsset asset,
String locale,
CMACallback<Integer> callback)
Process an Asset.
|
CMACallback<CMAAsset> |
publish(CMAAsset asset,
CMACallback<CMAAsset> callback)
Publish an Asset.
|
CMACallback<CMAAsset> |
unArchive(CMAAsset asset,
CMACallback<CMAAsset> callback)
Un-Archive an Asset.
|
CMACallback<CMAAsset> |
unPublish(CMAAsset asset,
CMACallback<CMAAsset> callback)
Un-Publish an Asset.
|
CMACallback<CMAAsset> |
update(CMAAsset asset,
CMACallback<CMAAsset> callback)
Update an Asset.
|
public CMACallback<CMAAsset> archive(CMAAsset asset, CMACallback<CMAAsset> callback)
asset - Assetcallback - CallbackIllegalArgumentException - if asset is null.IllegalArgumentException - if asset id is null.IllegalArgumentException - if asset space id is null.public CMACallback<CMAAsset> create(CMAAsset asset, CMACallback<CMAAsset> callback)
In case the given asset 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.
asset - Assetcallback - CallbackIllegalArgumentException - if asset is null.IllegalArgumentException - if asset id is null.IllegalArgumentException - if asset space id is null.CMAClient.Builder.setSpaceId(String),
CMAClient.Builder.setEnvironmentId(String)public CMACallback<CMAAsset> create(String spaceId, String environmentId, CMAAsset asset, CMACallback<CMAAsset> callback)
In case the given asset 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 IDasset - Assetcallback - CallbackIllegalArgumentException - if asset is null.IllegalArgumentException - if asset id is null.IllegalArgumentException - if asset space id is null.IllegalArgumentException - if asset environment id is null.public CMACallback<Integer> delete(CMAAsset asset, CMACallback<Integer> callback)
asset - Assetcallback - CallbackIllegalArgumentException - if spaceId is null.IllegalArgumentException - if assetId is null.public CMACallback<CMAArray<CMAAsset>> fetchAll(CMACallback<CMAArray<CMAAsset>> callback)
callback - CallbackCMAClient.Builder.setSpaceId(String),
CMAClient.Builder.setEnvironmentId(String)public CMACallback<CMAArray<CMAAsset>> fetchAll(Map<String,String> query, CMACallback<CMAArray<CMAAsset>> callback)
query - The query to narrow down the results.callback - CallbackCMAClient.Builder.setSpaceId(String),
CMAClient.Builder.setEnvironmentId(String)public CMACallback<CMAArray<CMAAsset>> fetchAll(String spaceId, String environmentId, CMACallback<CMAArray<CMAAsset>> callback)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and
CMAClient.Builder.setEnvironmentId(String).
spaceId - Space IDenvironmentId - Environment IDcallback - Callbackpublic CMACallback<CMAArray<CMAAsset>> fetchAll(String spaceId, String environmentId, Map<String,String> query, CMACallback<CMAArray<CMAAsset>> callback)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and
CMAClient.Builder.setEnvironmentId(String).
spaceId - Space IDenvironmentId - Environment IDquery - Querycallback - CallbackIllegalArgumentException - if spaceId is null.public CMACallback<CMAAsset> fetchOne(String assetId, CMACallback<CMAAsset> callback)
assetId from the configured space.assetId - Asset IDcallback - CallbackIllegalArgumentException - if configured space id is null.IllegalArgumentException - if configured environment id is null.IllegalArgumentException - if asset id is null.CMAClient.Builder.setSpaceId(String),
CMAClient.Builder.setEnvironmentId(String)public CMACallback<CMAAsset> fetchOne(String spaceId, String environmentId, String assetId, CMACallback<CMAAsset> callback)
assetId from a the given space and environment.
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and
CMAClient.Builder.setEnvironmentId(String).
spaceId - Space IDenvironmentId - Environment IDassetId - Asset IDcallback - CallbackIllegalArgumentException - if spaceId is null.IllegalArgumentException - if environmentId is null.IllegalArgumentException - if assetId is null.public CMACallback<Integer> process(CMAAsset asset, String locale, CMACallback<Integer> callback)
asset - Assetlocale - Localecallback - CallbackIllegalArgumentException - if asset is null.IllegalArgumentException - if asset has no id.IllegalArgumentException - if asset has no space.IllegalArgumentException - if locale is null.CMAClient.Builder.setSpaceId(String),
CMAClient.Builder.setEnvironmentId(String)public CMACallback<CMAAsset> publish(CMAAsset asset, CMACallback<CMAAsset> callback)
asset - Assetcallback - CallbackIllegalArgumentException - if asset is null.IllegalArgumentException - if asset has no id.IllegalArgumentException - if asset has no space id.public CMACallback<CMAAsset> unArchive(CMAAsset asset, CMACallback<CMAAsset> callback)
asset - Assetcallback - CallbackIllegalArgumentException - if asset is null.IllegalArgumentException - if asset id is empty.IllegalArgumentException - if asset's space id is empty.public CMACallback<CMAAsset> unPublish(CMAAsset asset, CMACallback<CMAAsset> callback)
asset - Assetcallback - CallbackIllegalArgumentException - if asset is null.IllegalArgumentException - if asset's id is not set.IllegalArgumentException - if asset's space id is not set.public CMACallback<CMAAsset> update(CMAAsset asset, CMACallback<CMAAsset> callback)
asset - Assetcallback - CallbackIllegalArgumentException - if asset is null.IllegalArgumentException - if asset's id is null.IllegalArgumentException - if asset's space id is null.IllegalArgumentException - if asset's version is null.Copyright © 2026 Contentful, GmbH.. All rights reserved.