<?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_3.xsd http://www.exoplatform.org/xml/ns/kernel_1_3.xsd" xmlns="http://www.exoplatform.org/xml/ns/kernel_1_3.xsd">
  <external-component-plugins>
    <target-component>org.exoplatform.portal.config.UserPortalConfigService</target-component>
    <component-plugin>
      <name>new.portal.config.user.listener</name>
      <set-method>initListener</set-method>
      <type>org.exoplatform.portal.config.NewPortalConfigListener</type>
      <description>This listener creates Agenda application Page</description>
      <init-params>
        <object-param>
          <name>portal.configuration</name>
          <description>description</description>
          <object type="org.exoplatform.portal.config.NewPortalConfig">
            <field name="ownerType">
              <string>portal</string>
            </field>
            <field name="predefinedOwner">
              <collection type="java.util.HashSet">
                <value>
                  <string>global</string>
                </value>
              </collection>
            </field>
            <field name="location">
              <string>war:/conf/agenda/portal</string>
            </field>
            <field name="override">
              <boolean>${exo.agenda.portalConfig.metadata.override:true}</boolean>
            </field>
            <field name="importMode">
              <string>${exo.agenda.portalConfig.metadata.importmode:insert}</string>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>

  <external-component-plugins>
    <target-component>org.exoplatform.commons.addons.AddOnService</target-component>
    <component-plugin>
      <name>addPlugin</name>
      <set-method>addPlugin</set-method>
      <type>org.exoplatform.commons.addons.AddOnPluginImpl</type>
      <description></description>
      <init-params>
        <value-param>
          <name>priority</name>
          <value>1</value>
        </value-param>
        <value-param>
          <name>containerName</name>
          <value>settings-bottom-container</value>
        </value-param>
        <object-param>
          <name>settings-agenda-portlet</name>
          <description></description>
          <object type="org.exoplatform.commons.addons.PortletModel">
            <field name="contentId">
              <string>agenda/AgendaSettings</string>
            </field>
            <field name="permissions">
              <collection type="java.util.ArrayList">
                <value>
                  <string>*:/platform/users</string>
                </value>
                <value>
                  <string>*:/platform/externals</string>
                </value>
              </collection>
            </field>
            <field name="title">
              <string>>Agenda Settings Portlet</string>
            </field>
            <field name="showInfoBar">
              <boolean>false</boolean>
            </field>
            <field name="showApplicationState">
              <boolean>false</boolean>
            </field>
            <field name="showApplicationMode">
              <boolean>false</boolean>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>
  <external-component-plugins>
    <target-component>org.exoplatform.commons.upgrade.UpgradeProductService</target-component>
    <component-plugin>
      <name>AgendaApplicationGlobalLayoutUpgrade</name>
      <set-method>addUpgradePlugin</set-method>
      <type>io.meeds.social.upgrade.LayoutUpgradePlugin</type>
      <init-params>
        <value-param>
          <name>product.group.id</name>
          <value>org.exoplatform.social</value>
        </value-param>
        <value-param>
          <name>plugin.execution.order</name>
          <value>120</value>
        </value-param>
        <value-param>
          <name>plugin.upgrade.execute.once</name>
          <value>true</value>
        </value-param>
        <value-param>
          <name>enabled</name>
          <value>true</value>
        </value-param>
        <object-param>
          <name>global.upgrade</name>
          <object type="io.meeds.social.upgrade.model.LayoutUpgrade">
            <field name="updatePageLayout">
              <boolean>true</boolean>
            </field>
            <field name="configPath">
              <string>war:/conf/agenda/portal</string>
            </field>
            <field name="portalType">
              <string>portal</string>
            </field>
            <field name="portalName">
              <string>global</string>
            </field>
            <field name="importMode">
              <string>merge</string>
            </field>
            <field name="pageNames">
              <collection type="java.util.ArrayList" item-type="java.lang.String">
                <value>
                  <string>agenda</string>
                </value>
              </collection>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
    <component-plugin>
      <name>AgendaApplicationPageUpgrade</name>
      <set-method>addUpgradePlugin</set-method>
      <type>io.meeds.social.upgrade.LayoutUpgradePlugin</type>
      <init-params>
        <value-param>
          <name>product.group.id</name>
          <value>org.exoplatform.social</value>
        </value-param>
        <value-param>
          <name>plugin.execution.order</name>
          <value>120</value>
        </value-param>
        <value-param>
          <name>plugin.upgrade.execute.once</name>
          <value>true</value>
        </value-param>
        <value-param>
          <name>enabled</name>
          <value>true</value>
        </value-param>
        <object-param>
          <name>global.upgrade</name>
          <object type="io.meeds.social.upgrade.model.LayoutUpgrade">
            <field name="updateNavigation">
              <boolean>true</boolean>
            </field>
            <field name="configPath">
              <string>war:/conf/agenda/portal</string>
            </field>
            <field name="portalType">
              <string>portal</string>
            </field>
            <field name="portalName">
              <string>global</string>
            </field>
            <field name="importMode">
              <string>merge</string>
            </field>
            <field name="pageNames">
              <collection type="java.util.ArrayList" item-type="java.lang.String">
                <value>
                  <string>agenda</string>
                </value>
                <value>
                  <string>home/agenda</string>
                </value>
              </collection>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>

</configuration>
