[exo-jcr-commits] exo-jcr SVN: r2621 - jcr/branches/1.12.x/docs/reference/en/src/main/docbook/en-US/modules/kernel.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Jun 16 04:02:54 EDT 2010
Author: nfilotto
Date: 2010-06-16 04:02:53 -0400 (Wed, 16 Jun 2010)
New Revision: 2621
Modified:
jcr/branches/1.12.x/docs/reference/en/src/main/docbook/en-US/modules/kernel/configuration.xml
Log:
EXOJCR-782: Implementation based on component-plugins
Modified: jcr/branches/1.12.x/docs/reference/en/src/main/docbook/en-US/modules/kernel/configuration.xml
===================================================================
--- jcr/branches/1.12.x/docs/reference/en/src/main/docbook/en-US/modules/kernel/configuration.xml 2010-06-16 08:01:20 UTC (rev 2620)
+++ jcr/branches/1.12.x/docs/reference/en/src/main/docbook/en-US/modules/kernel/configuration.xml 2010-06-16 08:02:53 UTC (rev 2621)
@@ -560,7 +560,7 @@
</external-component-plugins></programlisting></para>
<table>
- <title>Descriptions of the fields of
+ <title>Descriptions of the fields of a
<envar>PortalContainerDefinition</envar> when it is used to define a
new portal container</title>
@@ -703,7 +703,7 @@
</table>
<table>
- <title>Descriptions of the fields of
+ <title>Descriptions of the fields of a
<envar>PortalContainerDefinition</envar> when it is used to define
the default portal container</title>
@@ -1000,6 +1000,457 @@
<emphasis>"foo"</emphasis> will be <emphasis>value of the portal
container "foo"</emphasis>.</para>
</section>
+
+ <section>
+ <title>Add dynamically settings and/or dependencies to a
+ <envar>PortalContainer</envar></title>
+
+ <para>It is possible to use <envar>component-plugin</envar> elements
+ in order to dynamically change a PortalContainerDefinition. In the
+ example below, we add the dependency <envar>foo</envar> to the default
+ portal container and to the portal containers called
+ <envar>foo1</envar> and <envar>foo2</envar>:</para>
+
+ <programlisting><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>Change PortalContainer Definitions</name>
+ <!-- The name of the method to call on the PortalContainerConfig in order to register the changes on the PortalContainerDefinitions -->
+ <set-method>registerChangePlugin</set-method>
+ <!-- The full qualified name of the PortalContainerDefinitionChangePlugin -->
+ <type>org.exoplatform.container.definition.PortalContainerDefinitionChangePlugin</type>
+ <init-params>
+ <value-param>
+ <name>apply.default</name>
+ <value>true</value>
+ </value-param>
+ <values-param>
+ <name>apply.specific</name>
+ <value>foo1</value>
+ <value>foo2</value>
+ </values-param>
+ <object-param>
+ <name>change</name>
+ <object type="org.exoplatform.container.definition.PortalContainerDefinitionChange$AddDependencies">
+ <!-- The list of name of the dependencies to add -->
+ <field name="dependencies">
+ <collection type="java.util.ArrayList">
+ <value>
+ <string>foo</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+</external-component-plugins></programlisting>
+
+ <table>
+ <title>Descriptions of the fields of a
+ <envar>PortalContainerDefinitionChangePlugin</envar></title>
+
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>apply.all</entry>
+
+ <entry>Indicates whether the changes have to be applied to all
+ the portal containers or not. The default value of this field
+ is <envar>false</envar>. This field is a
+ <envar>ValueParam</envar> and is not mandatory.</entry>
+ </row>
+
+ <row>
+ <entry>apply.default</entry>
+
+ <entry>Indicates whether the changes have to be applied to the
+ default portal container or not. The default value of this
+ field is <envar>false</envar>. This field is a
+ <envar>ValueParam</envar> and is not mandatory.</entry>
+ </row>
+
+ <row>
+ <entry>apply.specific</entry>
+
+ <entry>A set of specific portal container names to which we
+ want to apply the changes. This field is a
+ <envar>ValuesParam</envar> and is not mandatory.</entry>
+ </row>
+
+ <row>
+ <entry><envar>Rest of the expected parameters </envar></entry>
+
+ <entry>The rest of the expected paramaters are
+ <envar>ObjectParam</envar> of type
+ <envar>PortalContainerDefinitionChange</envar>. Those
+ parameters are in fact the list of changes that we want to
+ apply to one or several portal containers. If the list of
+ changes is empty, the component plugin will be ignored. The
+ supported implementations of PortalContainerDefinitionChange
+ are described later in this section.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>To identify the portal containers to which the changes have to
+ be applied, we use the follwing algorithm:</para>
+
+ <orderedlist>
+ <listitem>
+ <para>The parameter <envar>apply.all</envar> has been set to
+ <envar>true</envar>. The corresponding changes will be applied to
+ all the portal containers. The other parameters will be
+ ignored.</para>
+ </listitem>
+
+ <listitem>
+ <para>The parameter <envar>apply.default</envar> has been set to
+ <envar>true</envar> and the parameter
+ <envar>apply.specific</envar> is <envar>null</envar>. The
+ corresponding changes will be applied to the default portal
+ container only.</para>
+ </listitem>
+
+ <listitem>
+ <para>The parameter <envar>apply.default</envar> has been set to
+ <envar>true</envar> and the parameter
+ <envar>apply.specific</envar> is not <envar>null</envar>. The
+ corresponding changes will be applied to the default portal
+ container and the given list of specific portal containers.</para>
+ </listitem>
+
+ <listitem>
+ <para>The parameter <envar>apply.default</envar> has been set to
+ <envar>false</envar> or has not been set and the parameter
+ <envar>apply.specific</envar> is <envar>null</envar>. The
+ corresponding changes will be applied to the default portal
+ container only.</para>
+ </listitem>
+
+ <listitem>
+ <para>The parameter <envar>apply.default</envar> has been set to
+ <envar>false</envar> or has not been set and the parameter
+ <envar>apply.specific</envar> is not <envar>null</envar>. The
+ corresponding changes will be applied to the given list of
+ specific portal containers.</para>
+ </listitem>
+ </orderedlist>
+
+ <section>
+ <title>The existing implementations of
+ <envar>PortalContainerDefinitionChange</envar></title>
+
+ <para>The modifications that can be applied to a
+ <envar>PortalContainerDefinition</envar> must be a class of type
+ <envar>PortalContainerDefinitionChange</envar>. The product proposes
+ out of the box some implementations that we describe in the next sub
+ sections. </para>
+
+ <section>
+ <title><envar>AddDependencies</envar></title>
+
+ <para>This modification adds a list of dependencies at the end of
+ the list of dependencies defined into the
+ <envar>PortalContainerDefinition</envar>. The full qualified name
+ is
+ <emphasis>org.exoplatform.container.definition.PortalContainerDefinitionChange$AddDependencies</emphasis>.</para>
+
+ <table>
+ <title>Descriptions of the fields of an
+ <envar>AddDependencies</envar></title>
+
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>dependencies</entry>
+
+ <entry>A list of <emphasis>String</emphasis> corresponding
+ to the list of name of the dependencies to add. If the
+ value of this field is empty, the change will be
+ ignored.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>See an example below, that will add <envar>foo</envar> at
+ the end of the dependency list of the default portal
+ container:</para>
+
+ <programlisting><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>Change PortalContainer Definitions</name>
+ <!-- The name of the method to call on the PortalContainerConfig in order to register the changes on the PortalContainerDefinitions -->
+ <set-method>registerChangePlugin</set-method>
+ <!-- The full qualified name of the PortalContainerDefinitionChangePlugin -->
+ <type>org.exoplatform.container.definition.PortalContainerDefinitionChangePlugin</type>
+ <init-params>
+ <value-param>
+ <name>apply.default</name>
+ <value>true</value>
+ </value-param>
+ <object-param>
+ <name>change</name>
+ <object type="org.exoplatform.container.definition.PortalContainerDefinitionChange$AddDependencies">
+ <!-- The list of name of the dependencies to add -->
+ <field name="dependencies">
+ <collection type="java.util.ArrayList">
+ <value>
+ <string>foo</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+</external-component-plugins></programlisting>
+ </section>
+
+ <section>
+ <title><envar>AddDependenciesBefore</envar></title>
+
+ <para>This modification adds a list of dependencies before a given
+ target dependency defined into the list of dependencies of the
+ <envar>PortalContainerDefinition</envar>. The full qualified name
+ is
+ <emphasis>org.exoplatform.container.definition.PortalContainerDefinitionChange$AddDependenciesBefore</emphasis>.</para>
+
+ <table>
+ <title>Descriptions of the fields of an
+ <envar>AddDependenciesBefore</envar></title>
+
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>dependencies</entry>
+
+ <entry>A list of <emphasis>String</emphasis> corresponding
+ to the list of name of the dependencies to add. If the
+ value of this field is empty, the change will be
+ ignored.</entry>
+ </row>
+
+ <row>
+ <entry>target</entry>
+
+ <entry>The name of the dependency before which we would
+ like to add the new dependencies. If this field is
+ <envar>null</envar> or the target dependency cannot be
+ found in the list of dependencies defined into the
+ <envar>PortalContainerDefinition</envar>, the new
+ dependencies will be added in first position to the
+ list.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>See an example below, that will add <envar>foo</envar>
+ before <envar>foo2</envar> in the dependency list of the default
+ portal container:</para>
+
+ <programlisting><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>Change PortalContainer Definitions</name>
+ <!-- The name of the method to call on the PortalContainerConfig in order to register the changes on the PortalContainerDefinitions -->
+ <set-method>registerChangePlugin</set-method>
+ <!-- The full qualified name of the PortalContainerDefinitionChangePlugin -->
+ <type>org.exoplatform.container.definition.PortalContainerDefinitionChangePlugin</type>
+ <init-params>
+ <value-param>
+ <name>apply.default</name>
+ <value>true</value>
+ </value-param>
+ <object-param>
+ <name>change</name>
+ <object type="org.exoplatform.container.definition.PortalContainerDefinitionChange$AddDependenciesBefore">
+ <!-- The list of name of the dependencies to add -->
+ <field name="dependencies">
+ <collection type="java.util.ArrayList">
+ <value>
+ <string>foo</string>
+ </value>
+ </collection>
+ </field>
+ <!-- The name of the target dependency -->
+ <field name="target">
+ <string>foo2</string>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+</external-component-plugins></programlisting>
+ </section>
+
+ <section>
+ <title><envar>AddDependenciesAfter</envar></title>
+
+ <para>This modification adds a list of dependencies before a given
+ target dependency defined into the list of dependencies of the
+ <envar>PortalContainerDefinition</envar>. The full qualified name
+ is
+ <emphasis>org.exoplatform.container.definition.PortalContainerDefinitionChange$AddDependenciesAfter</emphasis>.</para>
+
+ <table>
+ <title>Descriptions of the fields of an
+ <envar>AddDependenciesAfter</envar></title>
+
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>dependencies</entry>
+
+ <entry>A list of <emphasis>String</emphasis> corresponding
+ to the list of name of the dependencies to add. If the
+ value of this field is empty, the change will be
+ ignored.</entry>
+ </row>
+
+ <row>
+ <entry>target</entry>
+
+ <entry>The name of the dependency after which we would
+ like to add the new dependencies. If this field is
+ <envar>null</envar> or the target dependency cannot be
+ found in the list of dependencies defined into the
+ <envar>PortalContainerDefinition</envar>, the new
+ dependencies will be added in last position to the
+ list.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>See an example below, that will add <envar>foo</envar> after
+ <envar>foo2</envar> in the dependency list of the default portal
+ container:</para>
+
+ <programlisting><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>Change PortalContainer Definitions</name>
+ <!-- The name of the method to call on the PortalContainerConfig in order to register the changes on the PortalContainerDefinitions -->
+ <set-method>registerChangePlugin</set-method>
+ <!-- The full qualified name of the PortalContainerDefinitionChangePlugin -->
+ <type>org.exoplatform.container.definition.PortalContainerDefinitionChangePlugin</type>
+ <init-params>
+ <value-param>
+ <name>apply.default</name>
+ <value>true</value>
+ </value-param>
+ <object-param>
+ <name>change</name>
+ <object type="org.exoplatform.container.definition.PortalContainerDefinitionChange$AddDependenciesAfter">
+ <!-- The list of name of the dependencies to add -->
+ <field name="dependencies">
+ <collection type="java.util.ArrayList">
+ <value>
+ <string>foo</string>
+ </value>
+ </collection>
+ </field>
+ <!-- The name of the target dependency -->
+ <field name="target">
+ <string>foo2</string>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+</external-component-plugins></programlisting>
+ </section>
+
+ <section>
+ <title><envar>AddSettings</envar></title>
+
+ <para>This modification adds new settings to a
+ <envar>PortalContainerDefinition</envar>. The full qualified name
+ is
+ <emphasis>org.exoplatform.container.definition.PortalContainerDefinitionChange$AddSettings</emphasis>.</para>
+
+ <table>
+ <title>Descriptions of the fields of an
+ <envar>AddSettings</envar></title>
+
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>settings</entry>
+
+ <entry>A map of <emphasis><String,
+ Object></emphasis> corresponding to the settings to
+ add. If the value of this field is empty, the change will
+ be ignored.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>See an example below, that will add the settings
+ <envar>string</envar> and <envar>stringX</envar> to the settings
+ of the default portal container:</para>
+
+ <programlisting><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>Change PortalContainer Definitions</name>
+ <!-- The name of the method to call on the PortalContainerConfig in order to register the changes on the PortalContainerDefinitions -->
+ <set-method>registerChangePlugin</set-method>
+ <!-- The full qualified name of the PortalContainerDefinitionChangePlugin -->
+ <type>org.exoplatform.container.definition.PortalContainerDefinitionChangePlugin</type>
+ <init-params>
+ <value-param>
+ <name>apply.default</name>
+ <value>true</value>
+ </value-param>
+ <object-param>
+ <name>change</name>
+ <object type="org.exoplatform.container.definition.PortalContainerDefinitionChange$AddSettings">
+ <!-- The settings to add to the to the portal containers -->
+ <field name="settings">
+ <map type="java.util.HashMap">
+ <entry>
+ <key>
+ <string>string</string>
+ </key>
+ <value>
+ <string>value1</string>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <string>stringX</string>
+ </key>
+ <value>
+ <string>value1</string>
+ </value>
+ </entry>
+ </map>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+</external-component-plugins></programlisting>
+ </section>
+ </section>
+ </section>
</section>
</section>
More information about the exo-jcr-commits
mailing list