5.1.3.9. How to create/define a portal extension?

A portal extension is in fact a web application declared as a PortalContainerConfigOwner (see previous section for more details about a PortalContainerConfigOwner) that has been added to the dependency list of the PortalContainerDefinition of a given portal.

See below an example of configuration file that add the portal extension "portal-ext" to the dependency list of the portal "portal":


<?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>
    <!-- The full qualified name of the PortalContainerConfig -->
    <target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
    <component-plugin>
      <!-- The name of the plugin -->
      <name>Add PortalContainer Definitions</name>
      <!-- The name of the method to call on the PortalContainerConfig in order to register the PortalContainerDefinitions -->
      <set-method>registerPlugin</set-method>
      <!-- The full qualified name of the PortalContainerDefinitionPlugin -->
      <type>org.exoplatform.container.definition.PortalContainerDefinitionPlugin</type>
      <init-params>
        <object-param>
          <name>portal</name>
          <object type="org.exoplatform.container.definition.PortalContainerDefinition">
            <!-- The name of the portal container -->
            <field name="name"><string>portal</string></field>
            <!-- The name of the context name of the rest web application -->
            <field name="restContextName"><string>rest</string></field>
            <!-- The name of the realm -->
            <field name="realmName"><string>exo-domain</string></field>
            <!-- All the dependencies of the portal container ordered by loading priority -->
            <field name="dependencies">
              <collection type="java.util.ArrayList">
                <value>
                  <string>eXoResources</string>
                </value>
                <value>
                  <string>portal</string>
                </value>
                <value>
                  <string>dashboard</string>
                </value>
                <value>
                  <string>exoadmin</string>
                </value>
                <value>
                  <string>eXoGadgets</string>
                </value>
                <value>
                  <string>eXoGadgetServer</string>
                </value>
                <value>
                  <string>rest</string>
                </value>
                <value>
                  <string>web</string>
                </value>
                <value>
                  <string>wsrp-producer</string>
                </value>
                <!-- The sample-ext has been added at the end of the dependency list in order to have the highest priority towards
                the other web applications and particularly towards "portal" -->
                <value>
                  <string>sample-ext</string>
                </value>
              </collection>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>
</configuration>
Copyright ©2012. All rights reserved. eXo Platform SAS