public final class ModuleAssets.Async
extends java.lang.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(java.lang.String spaceId,
java.lang.String environmentId,
CMAAsset asset,
CMACallback<CMAAsset> callback)
Create a new Asset in the given space and environment.
|
CMACallback<java.lang.Integer> |
delete(CMAAsset asset,
CMACallback<java.lang.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(java.util.Map<java.lang.String,java.lang.String> query,
CMACallback<CMAArray<CMAAsset>> callback)
Fetch all Assets.
|
CMACallback<CMAArray<CMAAsset>> |
fetchAll(java.lang.String spaceId,
java.lang.String environmentId,
CMACallback<CMAArray<CMAAsset>> callback)
Fetch all Assets from a Space's Environment.
|
CMACallback<CMAArray<CMAAsset>> |
fetchAll(java.lang.String spaceId,
java.lang.String environmentId,
java.util.Map<java.lang.String,java.lang.String> query,
CMACallback<CMAArray<CMAAsset>> callback)
Fetch all Assets from a Space's Environment with a query.
|
CMACallback<CMAAsset> |
fetchOne(java.lang.String assetId,
CMACallback<CMAAsset> callback)
Fetch an Asset with the given
assetId from the configured space. |
CMACallback<CMAAsset> |
fetchOne(java.lang.String spaceId,
java.lang.String environmentId,
java.lang.String assetId,
CMACallback<CMAAsset> callback)
Fetch an Asset with the given
assetId from a the given space and environment. |
CMACallback<java.lang.Integer> |
process(CMAAsset asset,
java.lang.String locale,
CMACallback<java.lang.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
- Callbackjava.lang.IllegalArgumentException
- if asset is null.java.lang.IllegalArgumentException
- if asset id is null.java.lang.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
- Callbackjava.lang.IllegalArgumentException
- if asset is null.java.lang.IllegalArgumentException
- if asset id is null.java.lang.IllegalArgumentException
- if asset space id is null.CMAClient.Builder.setSpaceId(String)
,
CMAClient.Builder.setEnvironmentId(String)
public CMACallback<CMAAsset> create(java.lang.String spaceId, java.lang.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
- Callbackjava.lang.IllegalArgumentException
- if asset is null.java.lang.IllegalArgumentException
- if asset id is null.java.lang.IllegalArgumentException
- if asset space id is null.java.lang.IllegalArgumentException
- if asset environment id is null.public CMACallback<java.lang.Integer> delete(CMAAsset asset, CMACallback<java.lang.Integer> callback)
asset
- Assetcallback
- Callbackjava.lang.IllegalArgumentException
- if spaceId is null.java.lang.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(java.util.Map<java.lang.String,java.lang.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(java.lang.String spaceId, java.lang.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(java.lang.String spaceId, java.lang.String environmentId, java.util.Map<java.lang.String,java.lang.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
- Callbackjava.lang.IllegalArgumentException
- if spaceId is null.public CMACallback<CMAAsset> fetchOne(java.lang.String assetId, CMACallback<CMAAsset> callback)
assetId
from the configured space.assetId
- Asset IDcallback
- Callbackjava.lang.IllegalArgumentException
- if configured space id is null.java.lang.IllegalArgumentException
- if configured environment id is null.java.lang.IllegalArgumentException
- if asset id is null.CMAClient.Builder.setSpaceId(String)
,
CMAClient.Builder.setEnvironmentId(String)
public CMACallback<CMAAsset> fetchOne(java.lang.String spaceId, java.lang.String environmentId, java.lang.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
- Callbackjava.lang.IllegalArgumentException
- if spaceId is null.java.lang.IllegalArgumentException
- if environmentId is null.java.lang.IllegalArgumentException
- if assetId is null.public CMACallback<java.lang.Integer> process(CMAAsset asset, java.lang.String locale, CMACallback<java.lang.Integer> callback)
asset
- Assetlocale
- Localecallback
- Callbackjava.lang.IllegalArgumentException
- if asset is null.java.lang.IllegalArgumentException
- if asset has no id.java.lang.IllegalArgumentException
- if asset has no space.java.lang.IllegalArgumentException
- if locale is null.CMAClient.Builder.setSpaceId(String)
,
CMAClient.Builder.setEnvironmentId(String)
public CMACallback<CMAAsset> publish(CMAAsset asset, CMACallback<CMAAsset> callback)
asset
- Assetcallback
- Callbackjava.lang.IllegalArgumentException
- if asset is null.java.lang.IllegalArgumentException
- if asset has no id.java.lang.IllegalArgumentException
- if asset has no space id.public CMACallback<CMAAsset> unArchive(CMAAsset asset, CMACallback<CMAAsset> callback)
asset
- Assetcallback
- Callbackjava.lang.IllegalArgumentException
- if asset is null.java.lang.IllegalArgumentException
- if asset id is empty.java.lang.IllegalArgumentException
- if asset's space id is empty.public CMACallback<CMAAsset> unPublish(CMAAsset asset, CMACallback<CMAAsset> callback)
asset
- Assetcallback
- Callbackjava.lang.IllegalArgumentException
- if asset is null.java.lang.IllegalArgumentException
- if asset's id is not set.java.lang.IllegalArgumentException
- if asset's space id is not set.public CMACallback<CMAAsset> update(CMAAsset asset, CMACallback<CMAAsset> callback)
asset
- Assetcallback
- Callbackjava.lang.IllegalArgumentException
- if asset is null.java.lang.IllegalArgumentException
- if asset's id is null.java.lang.IllegalArgumentException
- if asset's space id is null.java.lang.IllegalArgumentException
- if asset's version is null.Copyright © 2019 Contentful, GmbH.. All Rights Reserved.