<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">

 <!-- Social integration -->
	
	<external-component-plugins>
    <target-component>org.exoplatform.wiki.service.WikiService</target-component>
    <component-plugin profiles="all">
      <name>Wiki listener for Social Space</name>
      <set-method>addComponentPlugin</set-method>
      <type>org.exoplatform.wiki.ext.impl.WikiSpaceActivityPublisher</type>
      <init-params>
				<value-param>
					<name>wikiPortletName</name>
					<value>wiki</value>
				</value-param>
			</init-params>
    </component-plugin>
  </external-component-plugins>
  <external-component-plugins>
    <target-component>org.exoplatform.social.core.space.spi.SpaceService</target-component>
    <component-plugin>
      <name>portlets.prefs.required</name>
      <set-method>setPortletsPrefsRequired</set-method>
      <type>org.exoplatform.social.core.application.PortletPreferenceRequiredPlugin</type>
      <init-params>      
        <values-param>
          <name>portletsPrefsRequired</name>
          <value>WikiPortlet</value>
        </values-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>
	
	<!-- configure activies plugin -->
	<external-component-plugins>
    <target-component>org.exoplatform.webui.ext.UIExtensionManager</target-component>
   
    <component-plugin>
      <name>add.wiki.activity.plugin</name>
      <set-method>registerUIExtensionPlugin</set-method>
      <type>org.exoplatform.webui.ext.UIExtensionPlugin</type>
      <init-params>
        <object-param>
          <name>Wiki Space Activity</name>
          <object type="org.exoplatform.social.webui.activity.UIActivityExtension">
            <field name="type"><string>org.exoplatform.social.webui.activity.BaseUIActivity</string></field>
            <field name="name"><string>ks-wiki:spaces</string></field>
            <field name="component"><string>org.exoplatform.wiki.ext.impl.WikiUIActivity</string></field>
            <field name="activityBuiderClass"><string>org.exoplatform.wiki.ext.impl.WikiSpaceUIActivityBuilder</string></field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>
  <!-- End social intergration -->

	<external-component-plugins>
		<!-- The full qualified name of the ResourceBundleService -->
		<target-component>org.exoplatform.services.resources.ResourceBundleService</target-component>
		<component-plugin>
			<!-- The name of the plugin -->
			<name>Wiki-Social integration ResourceBundle Plugin</name>
			<!-- The name of the method to call on the ResourceBundleService in order to register the ResourceBundles -->
			<set-method>addResourceBundle</set-method>
			<!-- The full qualified name of the BaseResourceBundlePlugin -->
			<type>org.exoplatform.services.resources.impl.BaseResourceBundlePlugin</type>
			<init-params>
				<values-param>
					<name>classpath.resources</name>
					<description>The resources that start with the following package name should be load from file system</description>
					<value>locale.wiki.integration.integration</value>
				</values-param>
				<values-param>
					<name>portal.resource.names</name>
					<description>The properties files of the portal , those file will be merged
						into one ResoruceBundle properties </description>
					<value>locale.wiki.integration.integration</value>
				</values-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>addChildPlugin</set-method>
      <type>org.exoplatform.wiki.notification.plugin.WikiActivityChildPlugin</type>
      <description>Initial information for forum child notification plugin.</description>
      <init-params>
        <value-param>
          <name>templatePath</name>
          <value><![CDATA[classpath:/groovy/wiki/social-integration/plugin/notification/WikiActivity.gtmpl]]></value>
        </value-param>
        <object-param>
          <name>template.WikiActivityChildPlugin</name>
          <description>The template of WikiActivityChildPlugin</description>
          <object type="org.exoplatform.commons.api.notification.plugin.config.PluginConfig">
            <field name="pluginId">
              <string>ks-wiki:spaces</string>
            </field>
            <field name="bundlePath">
              <string>locale.wiki.integration.notification.WikiNotification</string>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>

	<external-component-plugins>
		<target-component>org.exoplatform.commons.api.event.EventManager</target-component>
		<component-plugin>
			<name>SOC_ACTIVITY_MIGRATION</name>
			<set-method>addEventListener</set-method>
			<type>org.exoplatform.wiki.addons.rdbms.listener.WikiActivityUpdaterListener</type>
		</component-plugin>
	</external-component-plugins>

  <external-component-plugins>
    <target-component>org.exoplatform.social.common.router.ExoRouter</target-component>
    <component-plugin>
      <name>addRoutes</name>
      <set-method>addRoutes</set-method>
      <type>org.exoplatform.social.common.router.ExoRouterConfig</type>
      <init-params>
        <object-param>
          <name>uri.configuration</name>
          <description>defines action name which associate with uri pattern.</description>
          <object type="org.exoplatform.social.common.router.ExoRouterConfig">
            <field name="routeMapping">
              <map type="java.util.HashMap">
                <entry>
                  <key><string>wiki.owner.extended.show</string></key>
                  <value><string><![CDATA[/wiki/user/{streamOwnerId}/{<.*>path}]]></string></value>
                </entry>
                <entry>
                  <key><string>wiki.owner.show</string></key>
                  <value><string>/wiki/user/{streamOwnerId}</string></value>
                </entry>
              </map>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>

</configuration>
