Package io.meeds.commons.digest.plugin
Class DigestCategoryPlugin
java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
io.meeds.commons.digest.plugin.DigestCategoryPlugin
- All Implemented Interfaces:
DigestCategoryProvider,org.exoplatform.container.component.ComponentPlugin
public class DigestCategoryPlugin
extends org.exoplatform.container.component.BaseComponentPlugin
implements DigestCategoryProvider
The way an addon declares the digest category it owns, in its own kernel
configuration and without a single line of Java:
<external-component-plugins>
<target-component>io.meeds.commons.digest.DigestCategoryRegistry</target-component>
<component-plugin>
<name>news</name>
<set-method>addCategoryProvider</set-method>
<type>io.meeds.commons.digest.plugin.DigestCategoryPlugin</type>
<init-params>
<value-param><name>id</name><value>news</value></value-param>
<value-param><name>labelKey</name><value>digest.category.news</value></value-param>
<value-param><name>order</name><value>30</value></value-param>
<values-param>
<name>pluginIds</name>
<value>PostNewsNotificationPlugin</value>
</values-param>
</init-params>
</component-plugin>
</external-component-plugins>
The kernel container is shared by every webapp, so a category declared this
way reaches the digest wherever the addon lives, and whether or not that
addon uses Spring at all.-
Field Summary
Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setName
-
Constructor Details
-
DigestCategoryPlugin
public DigestCategoryPlugin(org.exoplatform.container.xml.InitParams params)
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceDigestCategoryProvider- Returns:
- the category identifier, stored in the user settings and in the waiting digest items, for example "spaces"
-
getLabelKey
- Specified by:
getLabelKeyin interfaceDigestCategoryProvider- Returns:
- the resource bundle key of the category label, displayed to the user
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceDigestCategoryProvider- Returns:
- the display order of the category, in the settings panel and in the digest email
-
getPluginIds
- Specified by:
getPluginIdsin interfaceDigestCategoryProvider- Returns:
- the identifiers of the notification plugins this category covers, for example SpaceInvitationPlugin
-