public final class ModuleLocales.Async extends Object
| Constructor and Description |
|---|
Async() |
| Modifier and Type | Method and Description |
|---|---|
CMACallback<CMALocale> |
create(String spaceId,
CMALocale locale,
CMACallback<CMALocale> callback)
Asynchronously create a new locale.
|
CMACallback<Integer> |
delete(String spaceId,
CMALocale locale,
CMACallback<Integer> callback)
Delete the given locale instance asynchronously.
|
CMACallback<CMAArray<CMALocale>> |
fetchAll(String spaceId,
CMACallback<CMAArray<CMALocale>> callback)
Fetch all locales of this space, asynchronously.
|
CMACallback<CMAArray<CMALocale>> |
fetchAll(String spaceId,
Map<String,String> query,
CMACallback<CMAArray<CMALocale>> callback)
Fetch specific locales of this space.
|
CMACallback<CMALocale> |
fetchOne(String spaceId,
String localeId,
CMACallback<CMALocale> callback)
Fetches one locale by its id from Contentful asynchronously.
|
CMACallback<CMALocale> |
update(CMALocale locale,
CMACallback<CMALocale> callback)
Update the given locale instance on Contentful, asynchronously.
|
public CMACallback<CMAArray<CMALocale>> fetchAll(String spaceId, CMACallback<CMAArray<CMALocale>> callback)
spaceId - the space identifier identifying the space.callback - a callback to be called, once the results are present.IllegalArgumentException - if spaceId is null.ModuleLocales.fetchAll(String)public CMACallback<CMAArray<CMALocale>> fetchAll(String spaceId, Map<String,String> query, CMACallback<CMAArray<CMALocale>> callback)
spaceId - the space identifier identifying the space.query - the search criteria to search for.callback - the callback to be informed about success or failure.IllegalArgumentException - if spaceId is null.ModuleLocales.fetchAll(String)public CMACallback<CMALocale> fetchOne(String spaceId, String localeId, CMACallback<CMALocale> callback)
spaceId - the space this locale is hosted by.localeId - the id of the locale to be found.callback - a callback to be called, once the results are present.IllegalArgumentException - if space id is null.IllegalArgumentException - if locale id is null.ModuleLocales.fetchOne(String, String)public CMACallback<CMALocale> create(String spaceId, CMALocale locale, CMACallback<CMALocale> callback)
spaceId - the space id to host the locale.locale - the new locale to be created.callback - a callback to be called, once the results are present.IllegalArgumentException - if space id is null.IllegalArgumentException - if locale is null.ModuleLocales.create(String, CMALocale)public CMACallback<CMALocale> update(CMALocale locale, CMACallback<CMALocale> callback)
Please make sure that the instance provided is fetched from Contentful. Otherwise you will get an exception thrown.
locale - the locale fetched from Contentful, updated by caller, to be updated.callback - a callback to be called, once the results are present.IllegalArgumentException - if space id is null.IllegalArgumentException - if locale is null.IllegalArgumentException - if locale id is null.IllegalArgumentException - if locale does not have a version attached.ModuleLocales.update(CMALocale)public CMACallback<Integer> delete(String spaceId, CMALocale locale, CMACallback<Integer> callback)
Please make sure that the instance provided is fetched from Contentful. Otherwise you will get an exception thrown.
spaceId - the id of the space to be used.locale - the locale fetched from Contentful, updated by caller, to be deleted.callback - a callback to be called, once the results are present.IllegalArgumentException - if space id is null.IllegalArgumentException - if locale id is null.ModuleLocales.delete(String, CMALocale)Copyright © 2017 Contentful, GmbH.. All Rights Reserved.