Package com.e1c.langtool.history.db
Interface IProjectTranslationStorage
- All Superinterfaces:
IManagedService
- All Known Implementing Classes:
ProjectTranslationStorage
The service provides an access to a storage of translations in context of projects.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA translation result that contains the translated value and the number of translations which have been found by query and grouped by the translated value. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTranslation(IProjectTranslation translation) Adds a new translation to the storage.voiddeleteByProject(String projectName) Removes all translations from the storage for the given project.voiddeleteTranslations(IExpression expression) Removes all translations that found by the query expression.voiddeleteTranslations(IExpression expression, Predicate<? super IProjectTranslation> filter) Removes translations from the storage which found by the query expression and filtered by the predicated.getGroupedTranslations(IExpression expression) Returns translations grouped by translated value and which found by the query expression.Returns the list of all registered translation languages for all projects.getTranslations(IExpression expression) Returns all translations that have been found by the given query expression.getTranslations(IExpression expression, IPageable pageRequest) Returns a page of translations found by the given query expression and with restriction provided in theIPageableobject.Methods inherited from interface com._1c.g5.wiring.IManagedService
activate, deactivate
-
Method Details
-
getTranslations
Returns all translations that have been found by the given query expression.- Parameters:
expression- the expression to find translation- Returns:
- all found translations by the given expression
- Throws:
HistoryDataBaseException- if there is any storage error or the given expression is not correct
-
getTranslations
Returns a page of translations found by the given query expression and with restriction provided in theIPageableobject.- Parameters:
expression- the expression to find translationspageRequest- the request that specifies which page to load- Returns:
- a page of translations
- Throws:
HistoryDataBaseException- if there is any storage error or the given expression is not correct
-
getGroupedTranslations
Returns translations grouped by translated value and which found by the query expression.- Parameters:
expression- the expression to find translations- Returns:
- a translations grouped by translated value
- Throws:
HistoryDataBaseException- if there is any storage error or the given expression is not correct
-
addTranslation
Adds a new translation to the storage.- Parameters:
translation- the translation to be added- Throws:
HistoryDataBaseException- if there is any storage error (including the case when this translation already exists) or the given expression is not correct
-
deleteTranslations
Removes translations from the storage which found by the query expression and filtered by the predicated.- Parameters:
expression- the query expression for searching translations to removefilter- the predicate to filter translations which shouldn't be removed. It removes the translation only if this filter returns true.- Throws:
HistoryDataBaseException- if there is any storage error or the given expression is not correct
-
deleteTranslations
Removes all translations that found by the query expression.- Parameters:
expression- the query expression for searching translations to remove- Throws:
HistoryDataBaseException- if there is any storage error or the given expression is not correct
-
deleteByProject
Removes all translations from the storage for the given project.- Parameters:
projectName- the name of project for which the translations to remove- Throws:
HistoryDataBaseException- if there is any storage error or the given expression is not correct
-
getLanguages
Returns the list of all registered translation languages for all projects.- Returns:
- the list of translation languages.
-