Class AbstractRecordableEventDescriptor

    • Field Detail

      • logger

        protected org.slf4j.Logger logger
      • componentManager

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

        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.
        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.
        key - the key to render
        the rendered localization.
        10.6RC1, 10.5, 9.11.6
      • hashCode

        public int hashCode()
        hashCode in class Object