public final class ModuleLocales.Async
extends java.lang.Object
| Constructor and Description |
|---|
Async() |
| Modifier and Type | Method and Description |
|---|---|
CMACallback<CMALocale> |
create(java.lang.String spaceId,
CMALocale locale,
CMACallback<CMALocale> callback)
Asynchronously create a new locale.
|
CMACallback<java.lang.Integer> |
delete(java.lang.String spaceId,
CMALocale locale,
CMACallback<java.lang.Integer> callback)
Delete the given locale instance asynchronously.
|
CMACallback<CMAArray<CMALocale>> |
fetchAll(java.lang.String spaceId,
CMACallback<CMAArray<CMALocale>> callback)
Fetch all locales of this space, asynchronously.
|
CMACallback<CMAArray<CMALocale>> |
fetchAll(java.lang.String spaceId,
java.util.Map<java.lang.String,java.lang.String> query,
CMACallback<CMAArray<CMALocale>> callback)
Fetch specific locales of this space.
|
CMACallback<CMALocale> |
fetchOne(java.lang.String spaceId,
java.lang.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(java.lang.String spaceId, CMACallback<CMAArray<CMALocale>> callback)
spaceId - the space identifier identifying the space.callback - a callback to be called, once the results are present.java.lang.IllegalArgumentException - if spaceId is null.ModuleLocales.fetchAll(String)public CMACallback<CMAArray<CMALocale>> fetchAll(java.lang.String spaceId, java.util.Map<java.lang.String,java.lang.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.java.lang.IllegalArgumentException - if spaceId is null.ModuleLocales.fetchAll(String)public CMACallback<CMALocale> fetchOne(java.lang.String spaceId, java.lang.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.java.lang.IllegalArgumentException - if space id is null.java.lang.IllegalArgumentException - if locale id is null.ModuleLocales.fetchOne(String, String)public CMACallback<CMALocale> create(java.lang.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.java.lang.IllegalArgumentException - if space id is null.java.lang.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.java.lang.IllegalArgumentException - if space id is null.java.lang.IllegalArgumentException - if locale is null.java.lang.IllegalArgumentException - if locale id is null.java.lang.IllegalArgumentException - if locale does not have a version attached.ModuleLocales.update(CMALocale)public CMACallback<java.lang.Integer> delete(java.lang.String spaceId, CMALocale locale, CMACallback<java.lang.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.java.lang.IllegalArgumentException - if space id is null.java.lang.IllegalArgumentException - if locale id is null.ModuleLocales.delete(String, CMALocale)Copyright © 2018 Contentful, GmbH.. All Rights Reserved.