Package io.meeds.commons.digest.service
Class DigestLabelResolver
java.lang.Object
io.meeds.commons.digest.service.DigestLabelResolver
Finds the wording of a digest label in the language of the recipient. The
category labels and the line wordings belong to the addons, so they are
looked up in the notification bundle the addon declared for its plugin; the
words of the email itself live in the commons bundle.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDigestLabelResolver(org.exoplatform.commons.api.notification.service.setting.PluginSettingService pluginSettingService, org.exoplatform.services.resources.ResourceBundleService resourceBundleService) -
Method Summary
-
Field Details
-
COMMONS_BUNDLE
- See Also:
-
-
Constructor Details
-
DigestLabelResolver
public DigestLabelResolver(org.exoplatform.commons.api.notification.service.setting.PluginSettingService pluginSettingService, org.exoplatform.services.resources.ResourceBundleService resourceBundleService)
-
-
Method Details
-
resolve
- Parameters:
labelKey- the key of the wordingpluginId- the notification type whose bundle holds itlocale- the recipient language- Returns:
- the wording, the commons one when the addon bundle doesn't have it, the key itself when nobody has it
-
commons
- Parameters:
key- a key of the commons notification bundlelocale- the recipient language- Returns:
- the wording, the key itself when missing
-
categoryLabel
-