<?xml version="1.0" encoding="UTF-8"?>

<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.task</name>
          <description>The information of group task</description>
          <object type="org.exoplatform.commons.api.notification.plugin.config.GroupConfig">
            <field name="id">
              <string>task</string>
            </field>
            <field name="resourceBundleKey">
              <string>UINotification.label.group.Task</string>
            </field>
            <field name="order">
              <string>100</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.task.integration.notification.TaskAssignPlugin</type>
      <description>Initial information for plugin.</description>
      <init-params>
        <object-param>
          <name>template.TaskAssignPlugin</name>
          <description>The template of TaskAssignPlugin</description>
          <object
            type="org.exoplatform.commons.api.notification.plugin.config.PluginConfig">
            <field name="pluginId">
              <string>TaskAssignPlugin</string>
            </field>
            <field name="resourceBundleKey">
              <string>UINotification.label.TaskAssignPlugin</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>task</string>
            </field>
            <field name="bundlePath">
              <string>locale.notification.TaskNotification</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.task.integration.notification.TaskCoworkerPlugin</type>
      <description>Initial information for plugin.</description>
      <init-params>
        <object-param>
          <name>template.TaskCoworkerPlugin</name>
          <description>The template of TaskCoworkerPlugin</description>
          <object
            type="org.exoplatform.commons.api.notification.plugin.config.PluginConfig">
            <field name="pluginId">
              <string>TaskCoworkerPlugin</string>
            </field>
            <field name="resourceBundleKey">
              <string>UINotification.label.TaskCoworkerPlugin</string>
            </field>
            <field name="order">
              <string>2</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>task</string>
            </field>
            <field name="bundlePath">
              <string>locale.notification.TaskNotification</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.task.integration.notification.TaskDueDatePlugin</type>
      <description>Initial information for plugin.</description>
      <init-params>
        <object-param>
          <name>template.TaskDueDatePlugin</name>
          <description>The template of TaskDueDatePlugin</description>
          <object
            type="org.exoplatform.commons.api.notification.plugin.config.PluginConfig">
            <field name="pluginId">
              <string>TaskDueDatePlugin</string>
            </field>
            <field name="resourceBundleKey">
              <string>UINotification.label.TaskDueDatePlugin</string>
            </field>
            <field name="order">
              <string>3</string>
            </field>
            <field name="defaultConfig">
              <collection type="java.util.ArrayList">
                <value>
                  <string>Instantly</string>
                </value>
              </collection>
            </field>
            <field name="groupId">
              <string>task</string>
            </field>
            <field name="bundlePath">
              <string>locale.notification.TaskNotification</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.task.integration.notification.TaskCompletedPlugin</type>
      <description>Initial information for plugin.</description>
      <init-params>
        <object-param>
          <name>template.TaskCompletedPlugin</name>
          <description>The template of TaskCompletedPlugin</description>
          <object
            type="org.exoplatform.commons.api.notification.plugin.config.PluginConfig">
            <field name="pluginId">
              <string>TaskCompletedPlugin</string>
            </field>
            <field name="resourceBundleKey">
              <string>UINotification.label.TaskCompletedPlugin</string>
            </field>
            <field name="order">
              <string>4</string>
            </field>
            <field name="defaultConfig">
              <collection type="java.util.ArrayList">
                <value>
                  <string>weekly</string>
                </value>
              </collection>
            </field>
            <field name="groupId">
              <string>task</string>
            </field>
            <field name="bundlePath">
              <string>locale.notification.TaskNotification</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.task.integration.notification.TaskCommentPlugin</type>
      <description>Initial information for plugin.</description>
      <init-params>
        <object-param>
          <name>template.TaskCommentPlugin</name>
          <description>The template of TaskCommentPlugin</description>
          <object type="org.exoplatform.commons.api.notification.plugin.config.PluginConfig">
            <field name="pluginId">
              <string>TaskCommentedPlugin</string>
            </field>
            <field name="resourceBundleKey">
              <string>UINotification.label.TaskCommentedPlugin</string>
            </field>
            <field name="order">
              <string>5</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>task</string>
            </field>
            <field name="bundlePath">
              <string>locale.notification.TaskNotification</string>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
    <component-plugin>
      <name>notification.plugins</name>
      <set-method>addPlugin</set-method>
      <type>org.exoplatform.task.integration.notification.TaskMentionPlugin</type>
      <description>Initial information for plugin.</description>
      <init-params>
        <object-param>
          <name>template.TaskMentionPlugin</name>
          <description>The template of TaskMentionPlugin</description>
          <object type="org.exoplatform.commons.api.notification.plugin.config.PluginConfig">
            <field name="pluginId">
              <string>TaskMentionedPlugin</string>
            </field>
            <field name="resourceBundleKey">
              <string>UINotification.label.TaskMentionedPlugin</string>
            </field>
            <field name="order">
              <string>6</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>task</string>
            </field>
            <field name="bundlePath">
              <string>locale.notification.TaskNotification</string>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>
  
  <!-- template channel register -->
  <external-component-plugins>
    <target-component>org.exoplatform.commons.api.notification.channel.ChannelManager</target-component>
    <component-plugin profiles="all">
      <name>mail.channel.task.template</name>
      <set-method>registerTemplateProvider</set-method>
      <type>org.exoplatform.task.integration.notification.MailTemplateProvider</type>
      <init-params>
        <value-param>
          <name>channel-id</name>
          <value>MAIL_CHANNEL</value>
        </value-param>
      </init-params>
    </component-plugin>
    <component-plugin profiles="all">
      <name>web.channel.task.template</name>
      <set-method>registerTemplateProvider</set-method>
      <type>org.exoplatform.task.integration.notification.WebTemplateProvider</type>
      <init-params>
        <value-param>
          <name>channel-id</name>
          <value>WEB_CHANNEL</value>
        </value-param>
      </init-params>
    </component-plugin>
    <component-plugin profiles="all">
      <name>web.channel.task.template</name>
      <set-method>registerTemplateProvider</set-method>
      <type>org.exoplatform.task.integration.notification.PushTemplateProvider</type>
      <init-params>
        <value-param>
          <name>channel-id</name>
          <value>PUSH_CHANNEL</value>
        </value-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>
</configuration>