From do-not-reply at jboss.org Wed Jun 16 04:02:55 2010 Content-Type: multipart/mixed; boundary="===============6113554459486814490==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: exo-jcr-commits at lists.jboss.org Subject: [exo-jcr-commits] exo-jcr SVN: r2621 - jcr/branches/1.12.x/docs/reference/en/src/main/docbook/en-US/modules/kernel. Date: Wed, 16 Jun 2010 04:02:54 -0400 Message-ID: <201006160802.o5G82shT021791@svn01.web.mwc.hst.phx2.redhat.com> --===============6113554459486814490== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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/ker= nel/configuration.xml Log: EXOJCR-782: Implementation based on component-plugins Modified: jcr/branches/1.12.x/docs/reference/en/src/main/docbook/en-US/modu= les/kernel/configuration.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- jcr/branches/1.12.x/docs/reference/en/src/main/docbook/en-US/modules/ke= rnel/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/ke= rnel/configuration.xml 2010-06-16 08:02:53 UTC (rev 2621) @@ -560,7 +560,7 @@ </external-component-plugins> = - Descriptions of the fields of + <title>Descriptions of the fields of a <envar>PortalContainerDefinition</envar> when it is used to defi= ne a new portal container = @@ -703,7 +703,7 @@
= - Descriptions of the fields of + <title>Descriptions of the fields of a <envar>PortalContainerDefinition</envar> when it is used to defi= ne the default portal container = @@ -1000,6 +1000,457 @@ "foo" will be value of the portal container "foo". + +
+ Add dynamically settings and/or dependencies to a + <envar>PortalContainer</envar> + + It is possible to use component-plugin elemen= ts + in order to dynamically change a PortalContainerDefinition. In the + example below, we add the dependency foo to the def= ault + portal container and to the portal containers called + foo1 and foo2: + + <external-component-plugins> + <!-- The full qualified name of the PortalContainerConfig --> + <target-component>org.exoplatform.container.definition.PortalConta= inerConfig</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 PortalContainerDefinitionChange= Plugin --> + <type>org.exoplatform.container.definition.PortalContainerDefini= tionChangePlugin</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=3D"org.exoplatform.container.definition.PortalCont= ainerDefinitionChange$AddDependencies"> + <!-- The list of name of the dependencies to add --> + <field name=3D"dependencies"> + <collection type=3D"java.util.ArrayList"> + <value> + <string>foo</string> + </value> + </collection> + </field> + </object> + </object-param> = + </init-params> + </component-plugin> +</external-component-plugins> + +
+ Descriptions of the fields of a + <envar>PortalContainerDefinitionChangePlugin</envar> + + + + + apply.all + + Indicates whether the changes have to be applied to= all + the portal containers or not. The default value of this fi= eld + is false. This field is a + ValueParam and is not mandatory. + + + + apply.default + + Indicates whether the changes have to be applied to= the + default portal container or not. The default value of this + field is false. This field is a + ValueParam and is not mandatory. + + + + apply.specific + + A set of specific portal container names to which we + want to apply the changes. This field is a + ValuesParam and is not mandatory. + + + + Rest of the expected parameters + + The rest of the expected paramaters are + ObjectParam of type + PortalContainerDefinitionChange. 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 PortalContainerDefinitionChan= ge + are described later in this section. + + + +
+ + To identify the portal containers to which the changes have = to + be applied, we use the follwing algorithm: + + + + The parameter apply.all has been set to + true. The corresponding changes will be applied= to + all the portal containers. The other parameters will be + ignored. + + + + The parameter apply.default has been set = to + true and the parameter + apply.specific is null. The + corresponding changes will be applied to the default portal + container only. + + + + The parameter apply.default has been set = to + true and the parameter + apply.specific is not null. The + corresponding changes will be applied to the default portal + container and the given list of specific portal containers. + + + + The parameter apply.default has been set = to + false or has not been set and the parameter + apply.specific is null. The + corresponding changes will be applied to the default portal + container only. + + + + The parameter apply.default has been set = to + false or has not been set and the parameter + apply.specific is not null. The + corresponding changes will be applied to the given list of + specific portal containers. + + + +
+ The existing implementations of + <envar>PortalContainerDefinitionChange</envar> + + The modifications that can be applied to a + PortalContainerDefinition must be a class of type + PortalContainerDefinitionChange. The product prop= oses + out of the box some implementations that we describe in the next= sub + sections. + +
+ <envar>AddDependencies</envar> + + This modification adds a list of dependencies at the end= of + the list of dependencies defined into the + PortalContainerDefinition. The full qualified n= ame + is + org.exoplatform.container.definition.PortalContainer= DefinitionChange$AddDependencies. + + + Descriptions of the fields of an + <envar>AddDependencies</envar> + + + + + dependencies + + A list of String correspon= ding + to the list of name of the dependencies to add. If the + value of this field is empty, the change will be + ignored. + + + +
+ + See an example below, that will add foo at + the end of the dependency list of the default portal + container: + + <external-component-plugins> + <!-- The full qualified name of the PortalContainerConfig --> + <target-component>org.exoplatform.container.definition.PortalConta= inerConfig</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 PortalContainerDefinitionChange= Plugin --> + <type>org.exoplatform.container.definition.PortalContainerDefini= tionChangePlugin</type> + <init-params> + <value-param> + <name>apply.default</name> + <value>true</value> + </value-param> + <object-param> + <name>change</name> + <object type=3D"org.exoplatform.container.definition.PortalCont= ainerDefinitionChange$AddDependencies"> + <!-- The list of name of the dependencies to add --> + <field name=3D"dependencies"> + <collection type=3D"java.util.ArrayList"> + <value> + <string>foo</string> + </value> + </collection> + </field> + </object> + </object-param> = + </init-params> + </component-plugin> +</external-component-plugins> +
+ +
+ <envar>AddDependenciesBefore</envar> + + This modification adds a list of dependencies before a g= iven + target dependency defined into the list of dependencies of the + PortalContainerDefinition. The full qualified n= ame + is + org.exoplatform.container.definition.PortalContainer= DefinitionChange$AddDependenciesBefore. + + + Descriptions of the fields of an + <envar>AddDependenciesBefore</envar> + + + + + dependencies + + A list of String correspon= ding + to the list of name of the dependencies to add. If the + value of this field is empty, the change will be + ignored. + + + + target + + The name of the dependency before which we would + like to add the new dependencies. If this field is + null or the target dependency cannot be + found in the list of dependencies defined into the + PortalContainerDefinition, the new + dependencies will be added in first position to the + list. + + + +
+ + See an example below, that will add foo + before foo2 in the dependency list of the defau= lt + portal container: + + <external-component-plugins> + <!-- The full qualified name of the PortalContainerConfig --> + <target-component>org.exoplatform.container.definition.PortalConta= inerConfig</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 PortalContainerDefinitionChange= Plugin --> + <type>org.exoplatform.container.definition.PortalContainerDefini= tionChangePlugin</type> + <init-params> + <value-param> + <name>apply.default</name> + <value>true</value> + </value-param> + <object-param> + <name>change</name> + <object type=3D"org.exoplatform.container.definition.PortalCont= ainerDefinitionChange$AddDependenciesBefore"> + <!-- The list of name of the dependencies to add --> + <field name=3D"dependencies"> + <collection type=3D"java.util.ArrayList"> + <value> + <string>foo</string> + </value> + </collection> + </field> + <!-- The name of the target dependency --> + <field name=3D"target"> + <string>foo2</string> + </field> + </object> + </object-param> = + </init-params> + </component-plugin> +</external-component-plugins> +
+ +
+ <envar>AddDependenciesAfter</envar> + + This modification adds a list of dependencies before a g= iven + target dependency defined into the list of dependencies of the + PortalContainerDefinition. The full qualified n= ame + is + org.exoplatform.container.definition.PortalContainer= DefinitionChange$AddDependenciesAfter. + + + Descriptions of the fields of an + <envar>AddDependenciesAfter</envar> + + + + + dependencies + + A list of String correspon= ding + to the list of name of the dependencies to add. If the + value of this field is empty, the change will be + ignored. + + + + target + + The name of the dependency after which we would + like to add the new dependencies. If this field is + null or the target dependency cannot be + found in the list of dependencies defined into the + PortalContainerDefinition, the new + dependencies will be added in last position to the + list. + + + +
+ + See an example below, that will add foo a= fter + foo2 in the dependency list of the default port= al + container: + + <external-component-plugins> + <!-- The full qualified name of the PortalContainerConfig --> + <target-component>org.exoplatform.container.definition.PortalConta= inerConfig</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 PortalContainerDefinitionChange= Plugin --> + <type>org.exoplatform.container.definition.PortalContainerDefini= tionChangePlugin</type> + <init-params> + <value-param> + <name>apply.default</name> + <value>true</value> + </value-param> + <object-param> + <name>change</name> + <object type=3D"org.exoplatform.container.definition.PortalCont= ainerDefinitionChange$AddDependenciesAfter"> + <!-- The list of name of the dependencies to add --> + <field name=3D"dependencies"> + <collection type=3D"java.util.ArrayList"> + <value> + <string>foo</string> + </value> + </collection> + </field> + <!-- The name of the target dependency --> + <field name=3D"target"> + <string>foo2</string> + </field> + </object> + </object-param> = + </init-params> + </component-plugin> +</external-component-plugins> +
+ +
+ <envar>AddSettings</envar> + + This modification adds new settings to a + PortalContainerDefinition. The full qualified n= ame + is + org.exoplatform.container.definition.PortalContainer= DefinitionChange$AddSettings. + + + Descriptions of the fields of an + <envar>AddSettings</envar> + + + + + settings + + A map of <String, + Object> corresponding to the settings to + add. If the value of this field is empty, the change w= ill + be ignored. + + + +
+ + See an example below, that will add the settings + string and stringX to the settin= gs + of the default portal container: + + <external-component-plugins> + <!-- The full qualified name of the PortalContainerConfig --> + <target-component>org.exoplatform.container.definition.PortalConta= inerConfig</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 PortalContainerDefinitionChange= Plugin --> + <type>org.exoplatform.container.definition.PortalContainerDefini= tionChangePlugin</type> + <init-params> + <value-param> + <name>apply.default</name> + <value>true</value> + </value-param> + <object-param> + <name>change</name> + <object type=3D"org.exoplatform.container.definition.PortalCont= ainerDefinitionChange$AddSettings"> + <!-- The settings to add to the to the portal containers --&g= t; + <field name=3D"settings"> + <map type=3D"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> +
+
+ = --===============6113554459486814490==--