Package ch.tocco.nice2.dbrefactoring.api
Interface LanguageSupport
- All Known Implementing Classes:
LanguageSupportImpl
public interface LanguageSupport
-
Method Summary
Modifier and TypeMethodDescriptiongenerateNewLanguageChangelog
(Locale[] languages, @Nullable CallbackHandler callbackHandler) Generates a changelog that adds the given languages.generateNewLanguageChangelog
(Locale[] languages, Set<String> moduleNames, @Nullable CallbackHandler callbackHandler) Generates a changelog that adds the given languages for entities defined in the given module.getInstalledLanguages
(@Nullable Connection conn) Queries a table to find out what languages are installed at the given connection.getNewLanguageChangelogFile
(Locale[] languages, @Nullable CallbackHandler callbackHandler) LikegenerateNewLanguageChangelog(Locale[], CallbackHandler)
but the changelog is post-processed by the contribtued processors and stored in the file system undervar
of the current installation.getNewLanguageChangelogFile
(Locale[] languages, Set<String> moduleNames, @Nullable CallbackHandler callbackHandler) LikegenerateNewLanguageChangelog(Locale[], Set, CallbackHandler)
but the changelog is post-processed by the contributed processors and then stored in the file system undervar
of the current installation.getNewLanguagesToInstall
(@Nullable Connection conn) Compares the available languages as given in application[.local].properties with the languages really installed in the database.
-
Method Details
-
generateNewLanguageChangelog
Changelog generateNewLanguageChangelog(Locale[] languages, @Nullable @Nullable CallbackHandler callbackHandler) throws DbRefactoringException Generates a changelog that adds the given languages.
The language must be available within nice2, that is, it must be added to the list of available languages.
- Parameters:
languages
- array of new languages to add, must be at least one elementcallbackHandler
- receives progress messages (MessageCallback
- Throws:
DbRefactoringException
- on any error
-
getNewLanguageChangelogFile
File getNewLanguageChangelogFile(Locale[] languages, @Nullable @Nullable CallbackHandler callbackHandler) throws DbRefactoringException LikegenerateNewLanguageChangelog(Locale[], CallbackHandler)
but the changelog is post-processed by the contribtued processors and stored in the file system undervar
of the current installation.- Parameters:
callbackHandler
- receives progress messages (MessageCallback
- Throws:
DbRefactoringException
-
generateNewLanguageChangelog
Changelog generateNewLanguageChangelog(Locale[] languages, Set<String> moduleNames, @Nullable @Nullable CallbackHandler callbackHandler) throws DbRefactoringException Generates a changelog that adds the given languages for entities defined in the given module.
The language must be available within nice2, that is, it must be added to the list of available languages.
- Parameters:
callbackHandler
- receives progress messages (MessageCallback
- Throws:
DbRefactoringException
-
getNewLanguageChangelogFile
File getNewLanguageChangelogFile(Locale[] languages, Set<String> moduleNames, @Nullable @Nullable CallbackHandler callbackHandler) throws DbRefactoringException LikegenerateNewLanguageChangelog(Locale[], Set, CallbackHandler)
but the changelog is post-processed by the contributed processors and then stored in the file system undervar
of the current installation.- Parameters:
callbackHandler
- receives progress messages (MessageCallback
- Throws:
DbRefactoringException
-
getInstalledLanguages
Set<Locale> getInstalledLanguages(@Nullable @Nullable Connection conn) throws DbRefactoringException Queries a table to find out what languages are installed at the given connection. Returns an empty set if nothing has been installed yet.- Throws:
DbRefactoringException
-
getNewLanguagesToInstall
Set<Locale> getNewLanguagesToInstall(@Nullable @Nullable Connection conn) throws DbRefactoringException Compares the available languages as given in application[.local].properties with the languages really installed in the database. It will query a table to find installed languages. If no such table exists, an empty set is returned. Otherwise a set with all languages specified in application[.local].properties minus the languages installed on the database is returned.- Throws:
DbRefactoringException
-