Class AbstractRecordableEventDescriptor

    • Field Detail

      • logger

        @Inject
        protected org.slf4j.Logger logger
      • componentManager

        @Inject
        protected org.xwiki.component.manager.ComponentManager componentManager
      • namespaceContextExecutor

        @Inject
        protected org.xwiki.component.namespace.NamespaceContextExecutor namespaceContextExecutor
      • descriptionTranslationKey

        protected String descriptionTranslationKey
      • applicationTranslationKey

        protected String applicationTranslationKey
    • Constructor Detail

      • AbstractRecordableEventDescriptor

        public AbstractRecordableEventDescriptor​(String descriptionTranslationKey,
                                                 String applicationTranslationKey)
        Construct an AbstractRecordableEventDescriptor.
        Parameters:
        descriptionTranslationKey - the name of the translation key that describe the event
        applicationTranslationKey - the translation key of the name of the application that send this event
    • Method Detail

      • getLocalizedMessage

        protected String getLocalizedMessage​(String key)
        Render a translation key in the context of the namespace (e.g. the current wiki) where the component has been loaded. Use-case: an event descriptor coming from the sub wiki is loaded and displayed in the main wiki. If the translation resource is located in the sub wiki with the "WIKI" scope, the translation could not be rendered in the main wiki. That's why we need to execute the localization in the context of the sub wiki.
        Parameters:
        key - the key to render
        Returns:
        the rendered localization.
        Since:
        10.6RC1, 10.5, 9.11.6
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object