[exo-jcr-commits] exo-jcr SVN: r2011 - jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/kernel.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Mar 4 15:41:17 EST 2010


Author: nfilotto
Date: 2010-03-04 15:41:17 -0500 (Thu, 04 Mar 2010)
New Revision: 2011

Modified:
   jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/kernel/configuration.xml
Log:
EXOJCR-565: doc added

Modified: jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/kernel/configuration.xml
===================================================================
--- jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/kernel/configuration.xml	2010-03-04 17:40:20 UTC (rev 2010)
+++ jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/kernel/configuration.xml	2010-03-04 20:41:17 UTC (rev 2011)
@@ -350,6 +350,60 @@
         <name>default.realm.name</name>
         <value>my-exo-domain</value>
       </value-param>
+      <!-- The default portal container definition -->
+      <!-- It cans be used to avoid duplicating configuration -->
+      <object-param>
+        <name>default.portal.definition</name>
+        <object type="org.exoplatform.container.definition.PortalContainerDefinition">
+          <!-- All the dependencies of the portal container ordered by loading priority -->
+          <field name="dependencies">
+            <collection type="java.util.ArrayList">
+              <value>
+                <string>foo</string>
+              </value>
+              <value>
+                <string>foo2</string>
+              </value>
+              <value>
+                <string>foo3</string>
+              </value>
+            </collection>
+          </field>        
+          <!-- A map of settings tied to the default portal container -->
+          <field name="settings">
+            <map type="java.util.HashMap">
+              <entry>
+                <key>
+                  <string>foo5</string>
+                </key>
+                <value>
+                  <string>value</string>
+                </value>
+              </entry>
+              <entry>
+                <key>
+                  <string>string</string>
+                </key>
+                <value>
+                  <string>value0</string>
+                </value>
+              </entry>
+              <entry>
+                <key>
+                  <string>int</string>
+                </key>
+                <value>
+                  <int>100</int>
+                </value>
+              </entry>
+            </map>
+          </field>
+          <!-- The path to the external properties file -->
+          <field name="externalSettingsPath">
+            <string>classpath:/org/exoplatform/container/definition/default-settings.properties</string>
+          </field>
+        </object>
+      </object-param>
     </init-params>
   &lt;/component&gt;</programlisting>
 
@@ -379,6 +433,17 @@
                 <entry>The name of the default realm. This field is
                 optional.</entry>
               </row>
+
+              <row>
+                <entry>default.portal.definition</entry>
+
+                <entry>The definition of the default portal container. This
+                field is optional. The expected type is
+                <envar>org.exoplatform.container.definition.PortalContainerDefinition</envar>
+                that is described below. Allow the parameters defined in this
+                default <envar>PortalContainerDefinition</envar> will be the
+                default values.</entry>
+              </row>
             </tbody>
           </tgroup>
         </table>
@@ -482,7 +547,8 @@
 
         <table>
           <title>Descriptions of the fields of
-          <envar>PortalContainerDefinition</envar></title>
+          <envar>PortalContainerDefinition</envar> when it is used to define a
+          new portal container</title>
 
           <tgroup cols="2">
             <tbody>
@@ -490,7 +556,7 @@
                 <entry>name</entry>
 
                 <entry>The name of the portal container. This field is
-                mandatory.</entry>
+                mandatory .</entry>
               </row>
 
               <row>
@@ -499,7 +565,7 @@
                 <entry>The name of the context name of the rest web
                 application. This field is optional. The default value will
                 the value define at the <envar>PortalContainerConfig</envar>
-                level if it is not null, "rest" otherwise.</entry>
+                level.</entry>
               </row>
 
               <row>
@@ -507,22 +573,24 @@
 
                 <entry>The name of the realm. This field is optional. The
                 default value will the value define at the
-                <envar>PortalContainerConfig</envar> level if it is not null,
-                "exo-domain" otherwise.</entry>
+                <envar>PortalContainerConfig</envar> level.</entry>
               </row>
 
               <row>
                 <entry>dependencies</entry>
 
                 <entry>All the dependencies of the portal container ordered by
-                loading priority. The dependencies are in fact the list of the
-                context names of the web applications from which the portal
-                container depends. This field is optional. The dependency
-                order is really crucial since it will be interpreted the same
-                way by several components of the platform. All those
-                components, will consider the 1st element in the list less
-                important than the second element and so on. It is currently
-                used to:<itemizedlist>
+                loading priority. This field is optional. The default value
+                will the value define at the
+                <envar>PortalContainerConfig</envar> level. The dependencies
+                are in fact the list of the context names of the web
+                applications from which the portal container depends. This
+                field is optional. The dependency order is really crucial
+                since it will be interpreted the same way by several
+                components of the platform. All those components, will
+                consider the 1st element in the list less important than the
+                second element and so on. It is currently used
+                to:<itemizedlist>
                     <listitem>
                       <para>Know the loading order of all the
                       dependencies.</para>
@@ -571,7 +639,11 @@
                 <entry>A <envar>java.util.Map</envar> of internal parameters
                 that we would like to tie the portal container. Those
                 parameters could have any type of value. This field is
-                optional.</entry>
+                optional. If some internal settings are defined at the
+                <envar>PortalContainerConfig</envar> level, the two maps of
+                settings will be merged. If a setting with the same name is
+                defined in both maps, it will keep the value defined at the
+                <envar>PortalContainerDefinition</envar> level.</entry>
               </row>
 
               <row>
@@ -579,9 +651,13 @@
 
                 <entry>The path of the external properties file to load as
                 default settings to the portal container. This field is
-                optional. The external properties files can be either of type
-                "properties" or of type "xml". The path will be interpreted as
-                follows:<orderedlist>
+                optional. If some external settings are defined at the
+                <envar>PortalContainerConfig</envar> level, the two maps of
+                settings will be merged. If a setting with the same name is
+                defined in both maps, it will keep the value defined at the
+                <envar>PortalContainerDefinition</envar> level. The external
+                properties files can be either of type "properties" or of type
+                "xml". The path will be interpreted as follows:<orderedlist>
                     <listitem>
                       <para>The path doesn't contain any prefix of type
                       "classpath:", "jar:" or "file:", we assume that the file
@@ -612,6 +688,148 @@
           </tgroup>
         </table>
 
+        <table>
+          <title>Descriptions of the fields of
+          <envar>PortalContainerDefinition</envar> when it is used to define
+          the default portal container</title>
+
+          <tgroup cols="2">
+            <tbody>
+              <row>
+                <entry>name</entry>
+
+                <entry>The name of the portal container. This field is
+                optional. The default portal name will be:<orderedlist>
+                    <listitem>
+                      <para>If this field is not empty, then the default value
+                      will be the value of this field.</para>
+                    </listitem>
+
+                    <listitem>
+                      <para>If this field is empty and the value of the
+                      parameter <emphasis>default.portal.container</emphasis>
+                      is not empty, then the default value will be the value
+                      of the parameter.</para>
+                    </listitem>
+
+                    <listitem>
+                      <para>If this field and the parameter
+                      <emphasis>default.portal.container</emphasis> are both
+                      empty, the default value will be
+                      <emphasis>"portal".</emphasis></para>
+                    </listitem>
+                  </orderedlist></entry>
+              </row>
+
+              <row>
+                <entry>restContextName</entry>
+
+                <entry>The name of the context name of the rest web
+                application. This field is optional. The default value wil
+                be:<orderedlist>
+                    <listitem>
+                      <para>If this field is not empty, then the default value
+                      will be the value of this field.</para>
+                    </listitem>
+
+                    <listitem>
+                      <para>f this field is empty and the value of the
+                      parameter <emphasis>default.rest.context</emphasis> is
+                      not empty, then the default value will be the value of
+                      the parameter.</para>
+                    </listitem>
+
+                    <listitem>
+                      <para>f this field and the parameter
+                      <emphasis>default.rest.context</emphasis> are both
+                      empty, the default value will be
+                      <emphasis>"rest".</emphasis></para>
+                    </listitem>
+                  </orderedlist></entry>
+              </row>
+
+              <row>
+                <entry>realmName</entry>
+
+                <entry>The name of the realm. This field is optional. The
+                default value wil be:<orderedlist>
+                    <listitem>
+                      <para>If this field is not empty, then the default value
+                      will be the value of this field.</para>
+                    </listitem>
+
+                    <listitem>
+                      <para>f this field is empty and the value of the
+                      parameter <emphasis>default.realm.name</emphasis> is not
+                      empty, then the default value will be the value of the
+                      parameter.</para>
+                    </listitem>
+
+                    <listitem>
+                      <para>f this field and the parameter
+                      <emphasis>default.realm.name</emphasis> are both empty,
+                      the default value will be
+                      <emphasis>"exo-domain".</emphasis></para>
+                    </listitem>
+                  </orderedlist></entry>
+              </row>
+
+              <row>
+                <entry>dependencies</entry>
+
+                <entry>All the dependencies of the portal container ordered by
+                loading priority. This field is optional. If this field has a
+                non empty value, it will be the default list of
+                dependencies.</entry>
+              </row>
+
+              <row>
+                <entry>settings</entry>
+
+                <entry>A <envar>java.util.Map</envar> of internal parameters
+                that we would like to tie the default portal container. Those
+                parameters could have any type of value. This field is
+                optional.</entry>
+              </row>
+
+              <row>
+                <entry>externalSettingsPath</entry>
+
+                <entry>The path of the external properties file to load as
+                default settings to the default portal container. This field
+                is optional. The external properties files can be either of
+                type "properties" or of type "xml". The path will be
+                interpreted as follows:<orderedlist>
+                    <listitem>
+                      <para>The path doesn't contain any prefix of type
+                      "classpath:", "jar:" or "file:", we assume that the file
+                      could be externalized so we apply the following
+                      rules:<orderedlist>
+                          <listitem>
+                            <para>A file exists at
+                            <emphasis>${exo-conf-dir}/portal/${externalSettingsPath}</emphasis>,
+                            we will load this file.</para>
+                          </listitem>
+
+                          <listitem>
+                            <para>No file exists at the previous path, we then
+                            assume that the path cans be interpreted by the
+                            <envar>ConfigurationManager</envar>.</para>
+                          </listitem>
+                        </orderedlist></para>
+                    </listitem>
+
+                    <listitem>
+                      <para>The path contains a prefix, we then assume that
+                      the path cans be interpreted by the
+                      <envar>ConfigurationManager</envar>.</para>
+                    </listitem>
+                  </orderedlist></entry>
+              </row>
+            </tbody>
+          </tgroup>
+        </table>
+
         <para>Internal and external settings are both optional, but if we give
         a non empty value for both the application will merge the settings. If
         the same setting name exists in both settings, we apply the following
@@ -739,11 +957,34 @@
 &lt;/configuration&gt;</programlisting></para>
 
         <para>In the properties file corresponding to the external settings,
-        you can reuse variables previously defined to create a new variable.
-        In this case the prefix "<emphasis>portal.container.</emphasis>" is
-        not needed, see an example below:<programlisting>my-var1=value 1
+        you can reuse variables previously defined (in the external settings
+        or in the internal settings) to create a new variable. In this case
+        the prefix "<emphasis>portal.container.</emphasis>" is not needed, see
+        an example below:<programlisting>my-var1=value 1
 my-var2=value 2
-complex-value=${my-var1}-${my-var2}</programlisting> </para>
+complex-value=${my-var1}-${my-var2}</programlisting></para>
+
+        <para>In the external and internal settings, you can also use create
+        variables based on value of System paramaters. The System parameters
+        can either be defined at launch time or thanks to the
+        <envar>PropertyConfigurator</envar> (see next section for more
+        details). See an example below:</para>
+
+        <programlisting>temp-dir=${java.io.tmpdir}${file.separator}my-temp</programlisting>
+
+        <para>However, for the internal settings you can use System parameters
+        only to define settings of type
+        <envar>java.lang.String</envar>.</para>
+
+        <para>It cans be also very usefull to define a generic variable in the
+        settings of the default portal container, the value of this variable
+        will change according to the current portal container. See below an
+        example:<programlisting>my-generic-var=value of the portal container "${name}"</programlisting></para>
+
+        <para>If this variable is defined at the default portal container
+        level, the value of this variable for a portal container called
+        <emphasis>"foo"</emphasis> will be <emphasis>value of the portal
+        container "foo"</emphasis>.</para>
       </section>
     </section>
   </section>



More information about the exo-jcr-commits mailing list