| Modifier and Type | Class and Description |
|---|---|
class |
CMAAsset.Fields.Localized
Localize all fields with a given locale.
|
| Constructor and Description |
|---|
Fields() |
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription(String locale)
Retrieve the description to the given locale.
|
CMAAssetFile |
getFile(String locale)
Return the localized file of this asset.
|
String |
getTitle(String locale)
What is the title of this asset in a given locale?
|
CMAAsset.Fields.Localized |
localize(String locale)
Localize access to fields by the same locale.
|
CMAAsset.Fields |
setDescription(String locale,
String description)
Set the description in a specific locale.
|
CMAAsset.Fields |
setFile(String locale,
CMAAssetFile file)
Update or create a new file for this asset.
|
CMAAsset.Fields |
setTitle(String locale,
String title)
Update or set title in a given locale.
|
String |
toString()
For debugging, it returns only the en-US locales!
|
String |
toString(String locale) |
public String getDescription(String locale)
locale - which locale should the description be in?public CMAAsset.Fields setDescription(String locale, String description)
locale - the locale to be used. Think 'en-US'.description - the text of the description, localized into the locale.CMAAsset.Fields instance calling, used for chaining.public String getTitle(String locale)
locale - the locale to check for a titlepublic CMAAsset.Fields setTitle(String locale, String title)
If a title in the given locale is present, update it, otherwise create a new one.
locale - which locale to be used.title - the title corresponding to this locale.CMAAsset.Fields instance used to calling other setters for chaining.public CMAAssetFile getFile(String locale)
Returns CMAAssetFile for the given locale.
locale - which locale should be used to select the right file?public CMAAsset.Fields setFile(String locale, CMAAssetFile file)
locale - which locale to be used?file - the actual file to be set.public CMAAsset.Fields.Localized localize(String locale)
Use this to not keep repeating the same locale for fields.
locale - a code of a locale. Think `en-US`.public String toString(String locale)
locale - the locale to be used for converting.public String toString()
toString in class ObjecttoString(String)Copyright © 2026 Contentful, GmbH.. All rights reserved.