<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
 * Copyright (C) 2022 eXo Platform SAS.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
-->
<configuration
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd http://www.exoplatform.org/xml/ns/kernel_1_2.xsd"
        xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd">

    <external-component-plugins>
        <target-component>org.exoplatform.commons.api.notification.service.setting.PluginSettingService
        </target-component>
        <component-plugin profiles="all">
            <name>notification.groups</name>
            <set-method>registerGroupConfig</set-method>
            <type>org.exoplatform.commons.api.notification.plugin.GroupProviderPlugin</type>
            <description>Initial the default groups.</description>
            <init-params>
                <object-param>
                    <name>group.documents</name>
                    <description>The information of Notification group : componentUpdateState</description>
                    <object type="org.exoplatform.commons.api.notification.plugin.config.GroupConfig">
                        <field name="id">
                            <string>documents</string>
                        </field>
                        <field name="resourceBundleKey">
                            <string>UINotification.label.group.documents</string>
                        </field>
                        <field name="order">
                            <string>300</string>
                        </field>
                    </object>
                </object-param>
            </init-params>
        </component-plugin>
    </external-component-plugins>

    <external-component-plugins>
        <target-component>org.exoplatform.commons.api.notification.service.setting.PluginContainer</target-component>
        <component-plugin>
            <name>notification.plugins</name>
            <set-method>addPlugin</set-method>
            <type>org.exoplatform.documents.notification.plugin.AddDocumentCollaboratorPlugin</type>
            <description>Initial information for plugin AddDocumentCollaboratorPlugin</description>
            <init-params>
                <object-param>
                    <name>template.AddDocumentCollaboratorPlugin</name>
                    <description>The template for the plugin of the state updates of contents</description>
                    <object type="org.exoplatform.commons.api.notification.plugin.config.PluginConfig">
                        <field name="pluginId">
                            <string>AddDocumentCollaboratorPlugin</string>
                        </field>
                        <field name="resourceBundleKey">
                            <string>UINotification.label.AddDocumentCollaboratorPlugin</string>
                        </field>
                        <field name="order">
                            <string>1</string>
                        </field>
                        <field name="defaultConfig">
                            <collection type="java.util.ArrayList">
                                <value>
                                    <string>daily</string>
                                </value>
                                <value>
                                    <string>Instantly</string>
                                </value>
                            </collection>
                        </field>
                        <field name="groupId">
                            <string>documents</string>
                        </field>
                        <field name="bundlePath">
                            <string>locale.notification.DocumentsNotification</string>
                        </field>
                        <field name="mutable">
                            <boolean>false</boolean>
                        </field>
                    </object>
                </object-param>
            </init-params>
        </component-plugin>
    </external-component-plugins>
    <external-component-plugins>
        <target-component>org.exoplatform.commons.api.notification.service.setting.PluginContainer</target-component>
        <component-plugin>
            <name>notification.plugins</name>
            <set-method>addPlugin</set-method>
            <type>org.exoplatform.documents.notification.plugin.ImportDocumentsPlugin</type>
            <description>Initial information for plugin ImportDocumentsPlugin</description>
            <init-params>
                <object-param>
                    <name>template.ImportDocumentsPlugin</name>
                    <description>The template for the plugin of the state updates of contents</description>
                    <object type="org.exoplatform.commons.api.notification.plugin.config.PluginConfig">
                        <field name="pluginId">
                            <string>ImportDocumentsPlugin</string>
                        </field>
                        <field name="resourceBundleKey">
                            <string>UINotification.label.ImportDocumentsPlugin</string>
                        </field>
                        <field name="order">
                            <string>1</string>
                        </field>
                        <field name="defaultConfig">
                            <collection type="java.util.ArrayList">
                                <value>
                                    <string>daily</string>
                                </value>
                                <value>
                                    <string>Instantly</string>
                                </value>
                            </collection>
                        </field>
                        <field name="groupId">
                            <string>documents</string>
                        </field>
                        <field name="bundlePath">
                            <string>locale.notification.DocumentsNotification</string>
                        </field>
                        <field name="mutable">
                            <boolean>false</boolean>
                        </field>
                    </object>
                </object-param>
            </init-params>
        </component-plugin>
    </external-component-plugins>


    <external-component-plugins>
        <target-component>org.exoplatform.commons.api.notification.channel.ChannelManager</target-component>
        <component-plugin>
            <name>mail.channel.content</name>
            <set-method>registerTemplateProvider</set-method>
            <type>org.exoplatform.documents.notification.provider.MailTemplateProvider</type>
            <init-params>
                <value-param>
                    <name>channel-id</name>
                    <value>MAIL_CHANNEL</value>
                </value-param>
            </init-params>
        </component-plugin>
        <component-plugin>
            <name>push.channel.content</name>
            <set-method>registerTemplateProvider</set-method>
            <type>org.exoplatform.documents.notification.provider.PushTemplateProvider</type>
            <init-params>
                <value-param>
                    <name>channel-id</name>
                    <value>PUSH_CHANNEL</value>
                </value-param>
            </init-params>
        </component-plugin>
    </external-component-plugins>

</configuration>