public final class ModuleLocales.Async
extends java.lang.Object
| Constructor and Description |
|---|
Async() |
| Modifier and Type | Method and Description |
|---|---|
CMACallback<CMALocale> |
create(CMALocale locale,
CMACallback<CMALocale> callback)
Asynchronously create a new locale in the configured space and environment.
|
CMACallback<CMALocale> |
create(java.lang.String spaceId,
java.lang.String environmentId,
CMALocale locale,
CMACallback<CMALocale> callback)
Asynchronously create a new locale.
|
CMACallback<java.lang.Integer> |
delete(CMALocale locale,
CMACallback<java.lang.Integer> callback)
Delete the given locale instance asynchronously.
|
CMACallback<CMAArray<CMALocale>> |
fetchAll(CMACallback<CMAArray<CMALocale>> callback)
Fetch all locales from the configured space and environment, asynchronously.
|
CMACallback<CMAArray<CMALocale>> |
fetchAll(java.lang.String spaceId,
java.lang.String environmentId,
CMACallback<CMAArray<CMALocale>> callback)
Fetch all locales of the given space and environment, asynchronously.
|
CMACallback<CMALocale> |
fetchOne(java.lang.String localeId,
CMACallback<CMALocale> callback)
Fetches one locale by the configured space and environment, asynchronously.
|
CMACallback<CMALocale> |
fetchOne(java.lang.String spaceId,
java.lang.String environmentId,
java.lang.String localeId,
CMACallback<CMALocale> callback)
Fetches one locale by its id and the given space and environment, asynchronously.
|
CMACallback<CMALocale> |
update(CMALocale locale,
CMACallback<CMALocale> callback)
Update the given locale instance on Contentful, asynchronously.
|
public CMACallback<CMAArray<CMALocale>> fetchAll(CMACallback<CMAArray<CMALocale>> callback)
callback - a callback to be called, once the results are present.java.lang.IllegalArgumentException - if configured space id is null.java.lang.IllegalArgumentException - if configured environment id is null.CMAClient.Builder.setSpaceId(String),
CMAClient.Builder.setEnvironmentId(String),
ModuleLocales.fetchAll()public CMACallback<CMAArray<CMALocale>> fetchAll(java.lang.String spaceId, java.lang.String environmentId, CMACallback<CMAArray<CMALocale>> callback)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and
CMAClient.Builder.setEnvironmentId(String).
spaceId - the space identifier identifying the space.environmentId - the environment identifier identifying the space.callback - a callback to be called, once the results are present.java.lang.IllegalArgumentException - if space id is null.java.lang.IllegalArgumentException - if environment id is null.ModuleLocales.fetchAll(String, String)public CMACallback<CMALocale> fetchOne(java.lang.String localeId, CMACallback<CMALocale> callback)
localeId - the id of the locale to be found.callback - a callback to be called, once the results are present.java.lang.IllegalArgumentException - if configured space id is null.java.lang.IllegalArgumentException - if configured environment id is null.java.lang.IllegalArgumentException - if locale id is null.ModuleLocales.fetchOne(String),
CMAClient.Builder.setSpaceId(String),
CMAClient.Builder.setEnvironmentId(String)public CMACallback<CMALocale> fetchOne(java.lang.String spaceId, java.lang.String environmentId, java.lang.String localeId, CMACallback<CMALocale> callback)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and
CMAClient.Builder.setEnvironmentId(String).
spaceId - the space the given environment is hosted in.environmentId - the environment this locale is hosted in.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, String)public CMACallback<CMALocale> create(CMALocale locale, CMACallback<CMALocale> callback)
locale - the new locale to be created.callback - a callback to be called, once the results are present.java.lang.IllegalArgumentException - if configured space id is null.java.lang.IllegalArgumentException - if configured environment id is null.java.lang.IllegalArgumentException - if locale is null.ModuleLocales.create(CMALocale),
CMAClient.Builder.setSpaceId(String),
CMAClient.Builder.setEnvironmentId(String)public CMACallback<CMALocale> create(java.lang.String spaceId, java.lang.String environmentId, CMALocale locale, CMACallback<CMALocale> callback)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and
CMAClient.Builder.setEnvironmentId(String).
spaceId - the space id hosting the environment.environmentId - the environment 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, 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(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.
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(CMALocale)Copyright © 2019 Contentful, GmbH.. All Rights Reserved.