Package de.espirit.firstspirit.access
Interface Language
- All Superinterfaces:
Comparable<Language>
A Language
- Since:
- 3.0
-
Method Summary
Modifier and TypeMethodDescriptionGet the abbreviation used for this language, for example "DE" for "German".@Nullable String
getDisplayName
(Language language) Gets display name of the Language for the given language.Gets the HTMLEncoding of this languageReturn Locale corresponding to this languagegetName()
Get the name of this languageboolean
Indicates, whether validation should be ignored in this language.
Note: This method employs a negative logic for minimal impact on usages (e.g. tests).boolean
Returnstrue
if this language is the master language of the belonging project,false
otherwisevoid
setDisplayName
(Language language, String displayName) Sets the display name of the Language for the given languagevoid
setGenerate
(boolean shouldGenerate) Activates/deactivates the generation of this language.void
setHTMLEncoding
(String encoding) Set the HTMLEncodingvoid
setIgnoreValidation
(boolean ignoreValidation) Defines, whether validation should be performed.void
Sets the locale for this languagevoid
setMasterLanguage
(boolean status) Sets this language as master languagevoid
Sets the nameboolean
Should this language be generated?Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getAbbreviation
String getAbbreviation()Get the abbreviation used for this language, for example "DE" for "German". This abbreviation should be a valid ISO 3166 country code but no test for correctness is performed at creation time of the object.- Returns:
- the abbreviation
- Since:
- 3.0
-
getName
String getName()Get the name of this language- Returns:
- the name
- Since:
- 3.0
-
setName
Sets the name- Parameters:
name
- the new name- Since:
- 3.0
-
getDisplayName
Gets display name of the Language for the given language.- Parameters:
language
-- Returns:
- the name or
null
if not defined - Since:
- 4.2.15
-
setDisplayName
Sets the display name of the Language for the given language- Parameters:
displayName
- the new displaynamelanguage
- the language to set the display name for- Since:
- 4.2.15
-
getHTMLEncoding
String getHTMLEncoding()Gets the HTMLEncoding of this language- Returns:
- the HTMLEncoding
- Since:
- 3.0
-
setHTMLEncoding
Set the HTMLEncoding- Parameters:
encoding
- the new HTMLEncoding value- Since:
- 3.0
-
shouldGenerate
boolean shouldGenerate()Should this language be generated?- Returns:
- the shouldGenerate value
- Since:
- 4.0
-
setGenerate
void setGenerate(boolean shouldGenerate) Activates/deactivates the generation of this language.- Since:
- 4.0
-
ignoreValidation
boolean ignoreValidation()Indicates, whether validation should be ignored in this language.
Note: This method employs a negative logic for minimal impact on usages (e.g. tests).- Returns:
true
, if validation should be ignored.- Since:
- 5.2.1902
-
setIgnoreValidation
void setIgnoreValidation(boolean ignoreValidation) Defines, whether validation should be performed.- Parameters:
ignoreValidation
- Iftrue
, validation should be ignored.- Since:
- 5.2.1902
-
getLocale
Locale getLocale()Return Locale corresponding to this language- Since:
- 4.0
-
setLocale
Sets the locale for this language- Parameters:
locale
-- Since:
- 4.0
-
isMasterLanguage
boolean isMasterLanguage()Returnstrue
if this language is the master language of the belonging project,false
otherwise- Returns:
- returns
true
if this language is master language,false
otherwise - Since:
- 4.0
-
setMasterLanguage
void setMasterLanguage(boolean status) Sets this language as master language- Since:
- 4.0
-