public final class ModuleAssets
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
ModuleAssets.Async
Async module.
|
| Constructor and Description |
|---|
ModuleAssets(retrofit2.Retrofit retrofit,
java.util.concurrent.Executor callbackExecutor) |
| Modifier and Type | Method and Description |
|---|---|
CMAAsset |
archive(CMAAsset asset)
Archive an Asset.
|
ModuleAssets.Async |
async() |
CMAAsset |
create(java.lang.String spaceId,
CMAAsset asset)
Create a new Asset.
|
protected com.contentful.java.cma.ServiceAssets |
createService(retrofit2.Retrofit retrofit) |
java.lang.Integer |
delete(java.lang.String spaceId,
java.lang.String assetId)
Delete an Asset.
|
CMAArray<CMAAsset> |
fetchAll(java.lang.String spaceId)
Fetch all Assets from a Space.
|
CMAArray<CMAAsset> |
fetchAll(java.lang.String spaceId,
java.util.Map<java.lang.String,java.lang.String> query)
Fetch all Assets from a Space with query parameter.
|
CMAAsset |
fetchOne(java.lang.String spaceId,
java.lang.String assetId)
Fetch an Asset with the given
assetId from a Space. |
java.lang.Integer |
process(CMAAsset asset,
java.lang.String locale)
Process an Asset.
|
CMAAsset |
publish(CMAAsset asset)
Publish an Asset.
|
CMAAsset |
unArchive(CMAAsset asset)
Un-Archive an Asset.
|
CMAAsset |
unPublish(CMAAsset asset)
Un-Publish an Asset.
|
CMAAsset |
update(CMAAsset asset)
Update an Asset.
|
public ModuleAssets(retrofit2.Retrofit retrofit,
java.util.concurrent.Executor callbackExecutor)
protected com.contentful.java.cma.ServiceAssets createService(retrofit2.Retrofit retrofit)
public CMAAsset archive(CMAAsset asset)
asset - AssetCMAAsset result instancejava.lang.IllegalArgumentException - if asset is null.java.lang.IllegalArgumentException - if asset id is null.java.lang.IllegalArgumentException - if asset space id is null.public CMAAsset create(java.lang.String spaceId, CMAAsset asset)
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.spaceId - Space IDasset - AssetCMAAsset result instancejava.lang.IllegalArgumentException - if asset is null.java.lang.IllegalArgumentException - if asset space id is null.public java.lang.Integer delete(java.lang.String spaceId,
java.lang.String assetId)
spaceId - Space IDassetId - Asset IDjava.lang.IllegalArgumentException - if spaceId is null.java.lang.IllegalArgumentException - if assetId is null.public CMAArray<CMAAsset> fetchAll(java.lang.String spaceId)
This fetch uses the default parameter defined in DefaultQueryParameter.FETCH
spaceId - Space IDCMAArray result instancejava.lang.IllegalArgumentException - if spaceId is null.public CMAArray<CMAAsset> fetchAll(java.lang.String spaceId, java.util.Map<java.lang.String,java.lang.String> query)
spaceId - Space IDquery - specifying details about which assets to fetch.CMAArray result instancejava.lang.IllegalArgumentException - if spaceId is null.public CMAAsset fetchOne(java.lang.String spaceId, java.lang.String assetId)
assetId from a Space.spaceId - Space IDassetId - Asset IDCMAAsset result instancejava.lang.IllegalArgumentException - if spaceId is null.java.lang.IllegalArgumentException - if assetId is null.public java.lang.Integer process(CMAAsset asset, java.lang.String locale)
asset - Assetlocale - Localejava.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.public CMAAsset publish(CMAAsset asset)
asset - AssetCMAAsset result instancejava.lang.IllegalArgumentException - if asset is null.java.lang.IllegalArgumentException - if asset has no id.java.lang.IllegalArgumentException - if asset has no space id.public CMAAsset unArchive(CMAAsset asset)
asset - AssetCMAAsset result instancejava.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 CMAAsset unPublish(CMAAsset asset)
asset - AssetCMAAsset result instancejava.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 CMAAsset update(CMAAsset asset)
asset - AssetCMAAsset result instancejava.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.public ModuleAssets.Async async()
Copyright © 2018 Contentful, GmbH.. All Rights Reserved.