Class DigestCategoryRegistry

java.lang.Object
io.meeds.commons.digest.DigestCategoryRegistry

public class DigestCategoryRegistry extends Object
Holds the digest categories the installed addons contribute, and the line providers building their email lines. It is a kernel component on purpose: the kernel container is shared by every webapp, while each webapp has its own Spring context. A category declared by an addon therefore reaches the digest whatever the addon is made of, which a Spring bean would not do.
  • Constructor Details

    • DigestCategoryRegistry

      public DigestCategoryRegistry()
  • Method Details

    • addCategoryProvider

      public void addCategoryProvider(org.exoplatform.container.component.ComponentPlugin plugin)
      Adds the category an addon owns. Called by the kernel for each declared component-plugin.
      Parameters:
      plugin - the category to add
    • addLineProvider

      public void addLineProvider(org.exoplatform.container.component.ComponentPlugin plugin)
      Adds the line provider of an addon, for each notification type it declares. Called by the kernel for each declared component-plugin.
      Parameters:
      plugin - the line provider to add
    • getLineProvider

      public DigestLineProvider getLineProvider(String pluginId)
      Parameters:
      pluginId - a notification type
      Returns:
      the provider building the email lines of this type, null when its addon declared none
    • getCategoryProviders

      public List<DigestCategoryProvider> getCategoryProviders()
      Returns:
      the categories of the installed addons, in display order