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 |
|---|---|
java.lang.String |
getCode()
Get the code of this locale.
|
java.lang.String |
getFallbackCode() |
java.lang.String |
getName()
What is the human readable name of this locale?
|
boolean |
isContentDeliveryApi() |
boolean |
isContentManagementApi() |
boolean |
isDefault() |
boolean |
isOptional() |
CMALocale |
setCode(java.lang.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(java.lang.String fallbackCode)
Set the fallback locale to be used once a localized field is not set in CDA.
|
CMALocale |
setId(java.lang.String id)
Convenience: Update the id of this entry without going through
CMAResource.getSystem(). |
CMALocale |
setName(java.lang.String name)
Change or create a human readable name of this locale.
|
CMALocale |
setOptional(boolean optional)
Control whether this locale is optional.
|
CMALocale |
setSpaceId(java.lang.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(java.lang.Integer version)
Convenience: Update the version of this entry without going through
CMAResource.getSystem(). |
java.lang.String |
toString() |
getEnvironmentId, getId, getSpaceId, getSystem, getVersion, isArchived, isPublished, setEnvironmentIdpublic CMALocale()
public CMALocale setSystem(CMASystem system)
setSystem in class CMAResourcesystem - sets the system property.public CMALocale setId(java.lang.String id)
CMAResource.getSystem().setId in class CMAResourceid - to be set.public CMALocale setVersion(java.lang.Integer version)
CMAResource.getSystem().setVersion in class CMAResourceversion - to be set.public CMALocale setSpaceId(java.lang.String spaceId)
CMAResource.getSystem().setSpaceId in class CMAResourcespaceId - to be set.public java.lang.String getName()
public CMALocale setName(java.lang.String name)
name - name of the locale to be set.public java.lang.String getCode()
This code will be one of IETF specification.
public CMALocale setCode(java.lang.String code)
code - IETF code to be set.getCode()public java.lang.String getFallbackCode()
public CMALocale setFallbackCode(java.lang.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 java.lang.String toString()
toString in class CMAResourceCopyright © 2019 Contentful, GmbH.. All Rights Reserved.