<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2018 eXo Platform SAS. This is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This software 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 Lesser General Public License 
  for more details. You should have received a copy of the GNU Lesser General Public License along with this software; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF site: http://www.fsf.org. -->
<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.services.listener.ListenerService</target-component>
    <component-plugin>
      <name>exo.agenda.event.created</name>
      <set-method>addListener</set-method>
      <type>org.exoplatform.agenda.listener.AgendaEventGamificationIntegrationListener</type>
    </component-plugin>
    <component-plugin>
      <name>exo.agenda.event.updated</name>
      <set-method>addListener</set-method>
      <type>org.exoplatform.agenda.listener.AgendaEventGamificationIntegrationListener</type>
    </component-plugin>
    <component-plugin>
      <name>exo.agenda.event.poll.created</name>
      <set-method>addListener</set-method>
      <type>org.exoplatform.agenda.listener.AgendaEventGamificationIntegrationListener</type>
    </component-plugin>
    <component-plugin>
      <name>exo.agenda.event.poll.voted.all</name>
      <set-method>addListener</set-method>
      <type>org.exoplatform.agenda.listener.AgendaEventGamificationIntegrationListener</type>
    </component-plugin>
    <component-plugin>
      <name>exo.agenda.event.responseSent</name>
      <set-method>addListener</set-method>
      <type>org.exoplatform.agenda.listener.AgendaEventAttendeeGamificationIntegrationListener</type>
    </component-plugin>
  </external-component-plugins>

  <external-component-plugins>
    <target-component>io.meeds.gamification.service.EventRegistry</target-component>
    <component-plugin>
      <name>CreateEvent</name>
      <set-method>addPlugin</set-method>
      <type>io.meeds.gamification.plugin.EventConfigPlugin</type>
      <init-params>
        <object-param>
          <name>event</name>
          <object type="io.meeds.gamification.model.EventDTO">
            <field name="title">
              <string>CreateEvent</string>
            </field>
            <field name="type">
              <string>exoplatform</string>
            </field>
            <field name="trigger">
              <string>CreateEvent</string>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
    <component-plugin>
      <name>UpdateEvent</name>
      <set-method>addPlugin</set-method>
      <type>io.meeds.gamification.plugin.EventConfigPlugin</type>
      <init-params>
        <object-param>
          <name>event</name>
          <object type="io.meeds.gamification.model.EventDTO">
            <field name="title">
              <string>UpdateEvent</string>
            </field>
            <field name="type">
              <string>exoplatform</string>
            </field>
            <field name="trigger">
              <string>UpdateEvent</string>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
    <component-plugin>
      <name>ReplyToEvent</name>
      <set-method>addPlugin</set-method>
      <type>io.meeds.gamification.plugin.EventConfigPlugin</type>
      <init-params>
        <object-param>
          <name>event</name>
          <object type="io.meeds.gamification.model.EventDTO">
            <field name="title">
              <string>ReplyToEvent</string>
            </field>
            <field name="type">
              <string>exoplatform</string>
            </field>
            <field name="trigger">
              <string>ReplyToEvent</string>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
    <component-plugin>
      <name>CreateDatePoll</name>
      <set-method>addPlugin</set-method>
      <type>io.meeds.gamification.plugin.EventConfigPlugin</type>
      <init-params>
        <object-param>
          <name>event</name>
          <object type="io.meeds.gamification.model.EventDTO">
            <field name="title">
              <string>CreateDatePoll</string>
            </field>
            <field name="type">
              <string>exoplatform</string>
            </field>
            <field name="trigger">
              <string>CreateDatePoll</string>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
    <component-plugin>
      <name>VoteDatePoll</name>
      <set-method>addPlugin</set-method>
      <type>io.meeds.gamification.plugin.EventConfigPlugin</type>
      <init-params>
        <object-param>
          <name>event</name>
          <object type="io.meeds.gamification.model.EventDTO">
            <field name="title">
              <string>VoteDatePoll</string>
            </field>
            <field name="type">
              <string>exoplatform</string>
            </field>
            <field name="trigger">
              <string>VoteDatePoll</string>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>
</configuration>
