public class CMALocale extends CMAResource
This class will be used to represent a locale on the CMA SDK.
| Constructor and Description |
|---|
CMALocale()
Create a new locale, specifying the type in the system property.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCode()
Get the code of this locale.
|
String |
getFallbackCode() |
String |
getName()
What is the human readable name of this locale?
|
boolean |
isContentDeliveryApi() |
boolean |
isContentManagementApi() |
boolean |
isDefault() |
boolean |
isOptional() |
CMALocale |
setCode(String code)
Set the code of the locale.
|
CMALocale |
setContentDeliveryApi(boolean contentDeliveryApi)
Change this locale to be available in the content deliver api.
|
CMALocale |
setContentManagementApi(boolean contentManagementApi)
Change this locale to be the used on the management api.
|
CMALocale |
setDefault(boolean isDefault)
Deprecated.
Setting this to default will not get send to the backend. This method will get
removed in the next major release.
|
CMALocale |
setFallbackCode(String fallbackCode)
Set the fallback locale to be used once a localized field is not set in CDA.
|
CMALocale |
setId(String id)
Convenience: Update the id of this entry without going through
CMAResource.getSystem(). |
CMALocale |
setName(String name)
Change or create a human readable name of this locale.
|
CMALocale |
setOptional(boolean optional)
Control whether this locale is optional.
|
CMALocale |
setSpaceId(String spaceId)
Convenience: Update the space id of this entry without going through
CMAResource.getSystem(). |
CMALocale |
setSystem(CMASystem system)
Sets the system field.
|
CMALocale |
setVersion(Integer version)
Convenience: Update the version of this entry without going through
CMAResource.getSystem(). |
String |
toString() |
getEnvironmentId, getId, getSpaceId, getSystem, getVersion, getVisibility, isArchived, isPublished, setEnvironmentId, setVisibilitypublic CMALocale()
public CMALocale setSystem(CMASystem system)
setSystem in class CMAResourcesystem - sets the system property.public CMALocale setId(String id)
CMAResource.getSystem().setId in class CMAResourceid - to be set.public CMALocale setVersion(Integer version)
CMAResource.getSystem().setVersion in class CMAResourceversion - to be set.public CMALocale setSpaceId(String spaceId)
CMAResource.getSystem().setSpaceId in class CMAResourcespaceId - to be set.public String getName()
public CMALocale setName(String name)
name - name of the locale to be set.public String getCode()
This code will be one of IETF specification.
public CMALocale setCode(String code)
code - IETF code to be set.getCode()public String getFallbackCode()
public CMALocale setFallbackCode(String fallbackCode)
fallbackCode - an IETF code to represent the fallback.public boolean isOptional()
public CMALocale setOptional(boolean optional)
optional - a flag indicating optionality status of this locale.public boolean isDefault()
@Deprecated public CMALocale setDefault(boolean isDefault)
isDefault - set this to true, if you want this locale to be the default one.public boolean isContentManagementApi()
public CMALocale setContentManagementApi(boolean contentManagementApi)
contentManagementApi - to update the value with.public boolean isContentDeliveryApi()
public CMALocale setContentDeliveryApi(boolean contentDeliveryApi)
contentDeliveryApi - true if available.public String toString()
toString in class CMAResourceCopyright © 2026 Contentful, GmbH.. All rights reserved.