Package se.conciliate.extensions.store
Interface MTLanguage
- All Superinterfaces:
MTLanguageHeader
Full implementation for languages. Each repository has a set of
languages (one or more) which models, symbols, documents etc. can
be edited in.
- Since:
- 3.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns the hyphenation dictionary for this language, or null if none is used.booleanremove()Removes the language.booleansave()Saves a new language or changes to an existing one.booleansave(ProgressCallback callback, MTLanguage copyFrom) Saves the language in the same way as save().voidSets this language as the default language in the repository.voidsetHyphenationDictionary(String hypDict) Sets the hyphenation dictionary for this language.voidSets the locale used for this language.voidSets the title of the language.voidSets the UUID on a new language.Methods inherited from interface se.conciliate.extensions.store.MTLanguageHeader
expand, getID, getLocale, getTitle, getUUID, isDefaultLanguage
-
Method Details
-
setUUID
Sets the UUID on a new language. This can only be done before the language has been saved to storage.- Parameters:
uuid- The new UUID- Throws:
IllegalStateException- If the language exists in storage.
-
setTitle
Sets the title of the language.- Parameters:
title- The new title.- Since:
- 3.0
-
setLocale
Sets the locale used for this language. -
setAsDefaultLanguage
void setAsDefaultLanguage()Sets this language as the default language in the repository.- Since:
- 3.0
-
getHyphenationDictionary
String getHyphenationDictionary()Returns the hyphenation dictionary for this language, or null if none is used.- Returns:
- name of the dictionary language (locale) or null if not used
- Since:
- 3.0
-
setHyphenationDictionary
Sets the hyphenation dictionary for this language. Null if hyphenation is not used.- Parameters:
hypDict- name of the dictionary language (locale) or null if not used- Since:
- 3.0
-
remove
Removes the language. Returns true if successful.- Throws:
MTAccessException
-
save
Saves a new language or changes to an existing one. Saving a new language is a potentially time consuming task, specially for large repositories, since new entries must be created in the database for all language controlled objects. Saving a new language will block until all other users are logged out of the repository. The user will have the opportunity to abort the creation. The user must also have the appropriate privileges in the repository to create a new language.- Returns:
- true if the language was saved successfully, false if the user aborted the creation process or if the user did not have the appropriate privileges to create a new language in the repository.
- Throws:
MTAccessException- If an MTAccessException occurs.- Since:
- 3.0
-
save
Saves the language in the same way as save(). If this is a new language then new language entries will be created for all data in this repository. The supplied callback will be notified of the progress made.- Parameters:
callback- Callback which is notified of progress during language data creation.copyFrom- Another language to copy values from.- Returns:
- true if the language was saved successfully, false if the user aborted the creation process or if the user did not have the appropriate privileges to create a new language in the repository.
-