Interface MTLanguage

All Superinterfaces:
MTLanguageHeader

public interface MTLanguage extends 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 Details

    • setUUID

      void setUUID(UUID uuid)
      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

      void setTitle(String title)
      Sets the title of the language.
      Parameters:
      title - The new title.
      Since:
      3.0
    • setLocale

      void setLocale(MTLocale locale)
      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

      void setHyphenationDictionary(String hypDict)
      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

      boolean remove() throws MTAccessException
      Removes the language. Returns true if successful.
      Throws:
      MTAccessException
    • save

      boolean save() throws MTAccessException
      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

      boolean save(ProgressCallback callback, MTLanguage copyFrom)
      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.