Package com.e1c.langtool.storage.context
Interface ContextTranslationData
- All Known Implementing Classes:
FeatureKeyContextData
public interface ContextTranslationData
The Interface for common data object that allows to get translations by
context key.-
Method Summary
Modifier and TypeMethodDescriptionGets the top data object comment.getComment(ContextTranslationKey translationKey) Gets the comment of the context key.getTranslation(ContextTranslationKey translationKey) Gets the translation by the context key.removeTranslation(ContextTranslationKey translationKey) Removes the translation by the context key.voidsetComment(String comment) Sets the top object comment.setTranslation(ContextTranslationKey translationKey, String value, String comment) Sets the translation and comment for the context key.
-
Method Details
-
setComment
Sets the top object comment.- Parameters:
comment- the new comment, can benull.
-
getComment
String getComment()Gets the top data object comment.- Returns:
- the comment, can return
null.
-
removeTranslation
Removes the translation by the context key.- Parameters:
translationKey- the translation key, cannot benull.- Returns:
- the removed translation or
nullif data object had now any translation associated with the key.
-
getComment
Gets the comment of the context key.- Parameters:
translationKey- the translation key, cannot benull.- Returns:
- the comment, can return
null.
-
getTranslation
Gets the translation by the context key.- Parameters:
translationKey- the translation key, cannot benull.- Returns:
- the translation, can return
null.
-
setTranslation
Sets the translation and comment for the context key.- Parameters:
translationKey- the translation key, cannot benull.value- the value, can benull.comment- the comment, can benull.- Returns:
- the previous stored translation, or
nullif was absent.
-