<?xml version="1.0" encoding="ISO-8859-1"?>

<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.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 init the portal configuration</description>
      <init-params>
        <value-param>
          <name>override</name>
          <value>${exo.tasks.portalConfig.metadata.override:false}</value>
        </value-param>
        <object-param>
          <name>portal.configuration</name>
          <description>description</description>
          <object type="org.exoplatform.portal.config.NewPortalConfig">
            <field name="predefinedOwner">
              <collection type="java.util.HashSet">
                <value>
                  <string>intranet</string>
                </value>
              </collection>
            </field>
            <field name="ownerType">
              <string>portal</string>
            </field>
            <field name="templateLocation">
              <string>war:/conf/task-addon/</string>
            </field>
            <field name="importMode"><string>merge</string></field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>
  <external-component-plugins>
    <target-component>org.exoplatform.application.registry.ApplicationRegistryService</target-component>
    <component-plugin>
      <name>tasks.portlets.registry</name>
      <set-method>initListener</set-method>
      <type>org.exoplatform.application.registry.ApplicationCategoriesPlugins</type>
      <description>Add TaskManagementPortlet to Collaboration category</description>
      <init-params>
        <object-param>
          <name>Collaboration</name>
          <description>Collaboration</description>
          <object type="org.exoplatform.application.registry.ApplicationCategory">
            <field name="name">
              <string>Collaboration</string>
            </field>
            <field name="displayName">
              <string>Collaboration</string>
            </field>
            <field name="accessPermissions">
              <collection type="java.util.ArrayList" item-type="java.lang.String">
                <value>
                  <string>*:/platform/users</string>
                </value>
              </collection>
            </field>
            <field name="applications">
              <collection type="java.util.ArrayList">
                <value>
                  <object type="org.exoplatform.application.registry.Application">
                    <field name="applicationName"><string>Tasks</string></field>
                    <field name="categoryName"><string>Collaboration</string></field>
                    <field name="displayName"><string>Tasks</string></field>
                    <field name="description"><string>Task management application</string></field>
                    <field name="type"><string>portlet</string></field>
                    <field name="contentId"><string>task-management/TaskManagementApplication</string></field>
                    <field name="accessPermissions">
                      <collection type="java.util.ArrayList" item-type="java.lang.String">
                        <value><string>*:/platform/users</string></value>
                      </collection>
                    </field>
                  </object>
                </value>
              </collection>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>

  <external-component-plugins>
    <target-component>org.exoplatform.portal.config.UserACL</target-component>
    <component-plugin>
      <name>tasks_projects_permissions</name>
      <set-method>addGroupVisibilityPlugin</set-method>
      <type>org.exoplatform.task.integration.ProjectGroupVisibilityPlugin</type>
    </component-plugin>
  </external-component-plugins>
</configuration>