[gatein-commits] gatein SVN: r887 - in portal/trunk/docs/reference-guide: en/modules and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Dec 1 07:59:08 EST 2009


Author: thomas.heute at jboss.com
Date: 2009-12-01 07:59:08 -0500 (Tue, 01 Dec 2009)
New Revision: 887

Modified:
   portal/trunk/docs/reference-guide/en/modules/Development.xml
   portal/trunk/docs/reference-guide/en/modules/development/Portal_Lifecycle.xml
   portal/trunk/docs/reference-guide/en/modules/development/Right_To_Left_Framework.xml
   portal/trunk/docs/reference-guide/pom.xml
Log:
Updating documentation


Modified: portal/trunk/docs/reference-guide/en/modules/Development.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/Development.xml	2009-12-01 11:23:33 UTC (rev 886)
+++ portal/trunk/docs/reference-guide/en/modules/Development.xml	2009-12-01 12:59:08 UTC (rev 887)
@@ -2,26 +2,7 @@
 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 ]>
 <chapter id="chap-Reference_Guide-Development">
-	<!--   
-
-    Copyright (C) 2009 eXo Platform SAS.
-    
-    This is free software; you can redistribute it and/or modify it
-    under the terms of the GNU Lesser General Public License as
-    published by the Free Software Foundation; either version 2.1 of
-    the License, or (at your option) any later version.
-    
-    This software is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-    Lesser General Public License for more details.
-    
-    You should have received a copy of the GNU Lesser General Public
-    License along with this software; if not, write to the Free
-    Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-    02110-1301 USA, or see the FSF site: http://www.fsf.org.
-
-   --><title>Development</title>
+  <title>Development</title>
 	<xi:include href="development/Portal_Lifecycle.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
 	<xi:include href="development/Right_To_Left_Framework.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
 	<xi:include href="development/Internationalization_Configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />

Modified: portal/trunk/docs/reference-guide/en/modules/development/Portal_Lifecycle.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/development/Portal_Lifecycle.xml	2009-12-01 11:23:33 UTC (rev 886)
+++ portal/trunk/docs/reference-guide/en/modules/development/Portal_Lifecycle.xml	2009-12-01 12:59:08 UTC (rev 887)
@@ -2,43 +2,38 @@
 <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 ]>
 <section id="sect-Reference_Guide-Portal_Lifecycle">
-	<!--   
-
-    Copyright (C) 2009 eXo Platform SAS.
-    
-    This is free software; you can redistribute it and/or modify it
-    under the terms of the GNU Lesser General Public License as
-    published by the Free Software Foundation; either version 2.1 of
-    the License, or (at your option) any later version.
-    
-    This software is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-    Lesser General Public License for more details.
-    
-    You should have received a copy of the GNU Lesser General Public
-    License along with this software; if not, write to the Free
-    Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-    02110-1301 USA, or see the FSF site: http://www.fsf.org.
-
-   --><title>Portal Lifecycle</title>
+	<title>Portal Lifecycle</title>
 	<section id="sect-Reference_Guide-Portal_Lifecycle-Overview">
 		<title>Overview</title>
 		<para>
-			This chapter describes the portal lifecycle from the application server start to its stop as well as how requests are handled.
+			This chapter describes the portal lifecycle from the application
+			server start to its stop as well as how requests are handled.
 		</para>
 	</section>
-	
-	<section id="sect-Reference_Guide-Portal_Lifecycle-Application_Server_start_and_stop">
+
+	<section
+		id="sect-Reference_Guide-Portal_Lifecycle-Application_Server_start_and_stop">
 		<title>Application Server start and stop</title>
 		<para>
-			An GateIn Portal instance is simply a web application deployed as a WAR in an application server. Each portlet is also part of an enhanced WAR that we call a portlet application. Hence, the portal web.xml file is the main entry point to grab information about how does the portal start.
+			A GateIn Portal instance is simply a web application deployed as
+			a WAR in an application server.
+			Portlets are also part of an enhanced
+			WAR that we call a portlet application.
 		</para>
 		<para>
-			The web.xml file contains several information such as a listener, a servlet as well as some security information.
+			GateIn doesn't require any particular setup in most common scenario and the
+			web.xml file can remain empty. During deployment,
+			GateIn will automatically and transparently inject a listener and a servlet
+			filter to be able to interact with the portlet application.
+			This feature is dependent on the underlying servlet container and will
+			work out of the box on the proposed bundles. 
 		</para>
 	</section>
 	
+	<!-- 
+	   TODO: Define the added listener
+	 -->
+	<!-- 
 	<section id="sect-Reference_Guide-Portal_Lifecycle-The_Listener">
 		<title>The Listener</title>
 		<para>
@@ -98,19 +93,22 @@
     }
   }
 </programlisting>
+ -->
+        <section>
+           <title>The Servlet</title>
 		<para>
-			1.1 The Servlet
+			The servlet is the main entry point for incoming requests, it
+			also includes some interesting init code when the portal is launched.
+			This servlet (org.gatein.wci.command.CommandServlet) is automatically
+			added during deployment.
 		</para>
+       </section>
+<!-- 
 		<para>
-			The servlet is the main entry point for incoming requests, it also includes some interesting init code when the portal is launched.
-		</para>
-		<para>
 			Here is its definition in the web.xml file:
 		</para>
 		
-<programlisting>  &lt;!-- ================================================================== --&gt;
-  &lt;!--           SERVLET                                                  --&gt;
-  &lt;!-- ================================================================== --&gt;
+<programlisting>
   &lt;servlet&gt;
     &lt;servlet-name&gt;portal&lt;/servlet-name&gt;
     &lt;servlet-class&gt;org.exoplatform.portal.application.PortalController&lt;/servlet-class&gt;
@@ -328,7 +326,6 @@
     if(userPortalConfig_ == null) throw new Exception("Can't load user portal config");
     
     //  dang.tung - set portal language by user preference -&gt; browser -&gt; default
-    //----
     String portalLanguage = null ;
     LocaleConfigService localeConfigService  = getApplicationComponent(LocaleConfigService.class) ;
     OrganizationService orgService = getApplicationComponent(OrganizationService.class) ;
@@ -353,7 +350,7 @@
     }
     setLocale(localeConfig.getLocale()) ;
     setOrientation(localeConfig.getOrientation());
-    //----
+
     context.setUIApplication(this);
     UserACL acl = getApplicationComponent(UserACL.class);
     if(acl.hasAccessControlWorkspacePermission(context.getRemoteUser()))
@@ -951,6 +948,7 @@
   }
 </programlisting>
 	</section>
+-->
 
 </section>
 

Modified: portal/trunk/docs/reference-guide/en/modules/development/Right_To_Left_Framework.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/development/Right_To_Left_Framework.xml	2009-12-01 11:23:33 UTC (rev 886)
+++ portal/trunk/docs/reference-guide/en/modules/development/Right_To_Left_Framework.xml	2009-12-01 12:59:08 UTC (rev 887)
@@ -2,43 +2,27 @@
 <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 ]>
 <section id="sect-Reference_Guide-RTL_Right_To_Left_Framework">
-	<!--   
 
-    Copyright (C) 2009 eXo Platform SAS.
-    
-    This is free software; you can redistribute it and/or modify it
-    under the terms of the GNU Lesser General Public License as
-    published by the Free Software Foundation; either version 2.1 of
-    the License, or (at your option) any later version.
-    
-    This software is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-    Lesser General Public License for more details.
-    
-    You should have received a copy of the GNU Lesser General Public
-    License along with this software; if not, write to the Free
-    Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-    02110-1301 USA, or see the FSF site: http://www.fsf.org.
-
-   --><title>RTL (Right To Left) Framework</title>
+	<title>RTL (Right To Left) Framework</title>
 	<section id="sect-Reference_Guide-RTL_Right_To_Left_Framework-Overview">
 		<title>Overview</title>
 		<para>
-			The RTL framework (Right-To-Left framework) provides a set of tools that can be leveraged by the user interface components to handle directionality gracefully.
+			The RTL framework (Right-To-Left framework) provides a set of
+			tools that can be leveraged by the user interface components to
+			handle directionality gracefully.
 		</para>
-		<para>
-			&lt;object width="400" height="300"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip<emphasis>id=2870309&amp;server=vimeo.com&amp;show</emphasis>title=1&amp;show<emphasis>byline=1&amp;show</emphasis>portrait=0&amp;color=&amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip<emphasis>id=2870309&amp;server=vimeo.com&amp;show</emphasis>title=1&amp;show<emphasis>byline=1&amp;show</emphasis>portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;a href="http://vimeo.com/"&gt;GateIn Portal: RTL - Arabic support&lt;/a&gt; from &lt;a href="http://vimeo.com/user896168"&gt;Benjamin Mestrallet&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.
-		</para>
 	</section>
-	
+
 	<section id="sect-Reference_Guide-RTL_Right_To_Left_Framework-Direction">
 		<title>Direction</title>
 		<para>
-			The orientation depends on the current locale and during a portal request the current orientation is made available by various means. The orientation is a Java 5 enum that provides a set of functionalities:
+			The orientation depends on the current locale and during a
+			portal request the current orientation is made available by various
+			means. The orientation is a Java 5 enum that provides a set of
+			functionalities:
 		</para>
-		
-<programlisting>
+
+		<programlisting>
    LT, // Western Europe
    RT, // Middle East (Arabic, Hebrew)
    TL, // Japanese, Chinese, Korean
@@ -47,18 +31,25 @@
    public boolean isRT() { ... }
    public boolean isTL() { ... }
    public boolean isTR() { ... }
-}{code}
-The object defining the current Orientation for the current request is the UIPortalApplication. However it should be accessed at runtime using the RequestContext that delegates to the UIPortalApplication. In the case of a PortalRequestContext it is a direct delegate as the PortalRequestContext has a reference to the current UIPortalApplication. In case of a different context such as the PortletRequestContext, it delegates to the parent context given the fact that the root RequestContext is always a PortalRequestContext.
-h1. Usage in different layers
-h2. Java
-Orientation is obtained from the RequestContext:
 </programlisting>
+		<para>The object defining the current Orientation for the current
+			request is the UIPortalApplication. However it should be accessed at
+			runtime using the RequestContext that delegates to the
+			UIPortalApplication. In the case of a PortalRequestContext it is a
+			direct delegate as the PortalRequestContext has a reference to the
+			current UIPortalApplication. In case of a different context such as
+			the PortletRequestContext, it delegates to the parent context given
+			the fact that the root RequestContext is always a
+			PortalRequestContext.</para>
+
 	</section>
-	
-	<section id="sect-Reference_Guide-RTL_Right_To_Left_Framework-Groovy_templates">
+
+	<section
+		id="sect-Reference_Guide-RTL_Right_To_Left_Framework-Groovy_templates">
 		<title>Groovy templates</title>
 		<para>
-			Orientation is obtained from implicit variables defined by the groovy binding context:
+			Orientation is obtained from implicit variables defined by the
+			groovy binding context:
 		</para>
 		<itemizedlist>
 			<listitem>
@@ -78,91 +69,148 @@
 			</listitem>
 			<listitem>
 				<para>
-					dir : the string ltr if the orientation is LT or the string rtl if the orientation is RT
+					dir : the string 'ltr' if the orientation is LT or the string
+					'rtl' if the orientation is RT
 				</para>
 			</listitem>
 		</itemizedlist>
 	</section>
-	
+
 	<section id="sect-Reference_Guide-RTL_Right_To_Left_Framework-Stylesheet">
 		<title>Stylesheet</title>
 		<para>
-			The skin service handles stylesheet rewriting to accommodate the orientation. It works by appending -lt or -rt to the stylesheet name. For instance <emphasis role="bold">/web/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet-rt.css</emphasis> will return the same stylesheet as <emphasis role="bold">/web/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet.css</emphasis> but processed for the RT orientation. Obviously the -lt suffix is optional.
+			The skin service handles stylesheet rewriting to accommodate the
+			orientation. It works by appending -lt or -rt to the stylesheet name.
+			For instance
+			<emphasis role="bold">
+				/web/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet-rt.css
+			</emphasis>
+			will return the same stylesheet as
+			<emphasis role="bold">
+				/web/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet.css
+			</emphasis>
+			but processed for the RT orientation. Obviously the -lt suffix is
+			optional.
 		</para>
 		<para>
-			Stylesheet authors can annotate their stylesheet to create content that depends on the orientation.
+			Stylesheet authors can annotate their stylesheet to create
+			content that depends on the orientation.
 		</para>
+		<section>
+		<title>Example 1</title>
 		<para>
-			In the example we need to use the orientation to modify the float attribute that will make the horizontal tabs either float on left or on right:
-		</para>
-		
-<programlisting>  float: left; /* orientation=lt */
-  float: right; /* orientation=rt */
-  font-weight: bold;
-  text-align: center;
-  white-space: nowrap;
-}{code}
-The LT output will be:
+			In the example we need to use the orientation to modify the
+			float
+			attribute that will make the horizontal tabs either float on
+			left or
+			on right:
+			<programlisting>
+float: left; /* orientation=lt */
+float: right; /* orientation=rt */
+font-weight: bold;
+text-align: center;
+white-space: nowrap;
 </programlisting>
-		<para>
-			float: left; /<emphasis role="bold">orientation=lt</emphasis>{/ font-weight: bold; text-align: center; white-space: nowrap; }{code}
-		</para>
-		<para>
-			The RT output will be:
-		</para>
-		
-<programlisting>  float: right; /* orientation=rt */
-  font-weight: bold;
-  text-align: center;
-  white-space: nowrap;
-}{code}
-In this example we need to modify the padding according to the orientation:
+			The LT produced output will be:
+			<programlisting>
+float: left; /* orientation=lt */
+font-weight: bold;
+text-align: center;
+white-space: nowrap;
+		</programlisting>
+			The RT produced output will be:
+			<programlisting> 
+float: right; /* orientation=rt */
+font-weight: bold;
+text-align: center;
+white-space: nowrap;
 </programlisting>
-		<para>
-			color: white; line-height: 24px; padding: 0px 5px 0px 0px; /<emphasis role="bold">orientation=lt</emphasis>/ padding: 0px 0px 0px 5px; /<emphasis role="bold">orientation=rt</emphasis>{/ }{code}
 		</para>
+		</section>
+		<section>
+		   <title>Example 2</title>
 		<para>
-			The LT output will be:
-		</para>
-		
-<programlisting>  color: white;
-  line-height: 24px;
-  padding: 0px 5px 0px 0px; /* orientation=lt */
-}{code}
-The RT output will be:
+			In this example we need to modify the padding according to the
+			orientation:
+			<programlisting>
+color: white;
+line-height: 24px;
+padding: 0px 5px 0px 0px; /* orientation=lt */
+padding: 0px 0px 0px 5px; /* >orientation=rt */
 </programlisting>
-		<para>
-			color: white; line-height: 24px; padding: 0px 0px 0px 5px; /<emphasis role="bold">orientation=rt</emphasis>{/ }{code}
+			The LT produced output will be:
+			<programlisting> 
+color: white;
+line-height: 24px;
+padding: 0px 5px 0px 0px; /* orientation=lt */
+</programlisting>
+			The RT produced output will be:
+			<programlisting> 
+color: white;
+line-height: 24px;
+padding: 0px 0px 0px 5px; /* orientation=rt */
+</programlisting>
 		</para>
+		</section>
 	</section>
-	
+
 	<section id="sect-Reference_Guide-RTL_Right_To_Left_Framework-Images">
 		<title>Images</title>
 		<para>
-			Sometime it is necessary to create an RT version of an image that will be used from a template or from a stylesheet. However symmetric images can be automatically generated avoiding the necessity to create a mirrored version of an image and furthermore avoiding maintenance cost.
+			Sometimes it is necessary to create an RT version of an image
+			that will be used from a template or from a stylesheet. However
+			symmetric images can be automatically generated avoiding the
+			necessity to create a mirrored version of an image and furthermore
+			avoiding maintenance cost.
 		</para>
 		<para>
-			The web resource filter uses the same naming pattern than the skin service does. When an image ends with the -rt suffix the portal will attempt to locate the original image and create a mirror of it. For instance requesting the image <emphasis role="bold">/GateInResources/skin/DefaultSkin/webui/component/UITabSystem/UITabs/background/NormalTabStyle-rt.gif</emphasis> returns a mirror of the image <emphasis role="bold">/GateInResources/skin/DefaultSkin/webui/component/UITabSystem/UITabs/background/NormalTabStyle.gif</emphasis> and it works perfectly because the image is symmetric.
+			The web resource filter uses the same naming pattern than the skin
+			service does. When an image ends with the -rt suffix the portal will
+			attempt to locate the original image and create a mirror of it. For
+			instance requesting the image
+			<emphasis role="bold">
+				/GateInResources/skin/DefaultSkin/webui/component/UITabSystem/UITabs/background/NormalTabStyle-rt.gif
+			</emphasis>
+			returns a mirror of the image
+			<emphasis role="bold">
+				/GateInResources/skin/DefaultSkin/webui/component/UITabSystem/UITabs/background/NormalTabStyle.gif
+			</emphasis>
+			and it works perfectly because the image is symmetric.
 		</para>
 		<para>
 			Here is an example combining stylesheet and images:
 		</para>
-		
-<programlisting>  line-height: 24px; 
-  background: url('background/NavigationTab.gif') no-repeat right top; /* orientation=lt */
-  background: url('background/NavigationTab-rt.gif') no-repeat left top; /* orientation=rt */
-  padding-right: 2px; /* orientation=lt */
-  padding-left: 2px; /* orientation=rt */
-}{code}
-h2. Client side JavaScript
-Just use the *GateIn.core.I18n* object that provides the following methods:
-* getOrientation() : returns either the string lt or rt
-* getDir() : returns either the string ltr or rtl
-* isLT() : returns true for LT
-* isRT() : returns true of RT
+
+		<programlisting>
+line-height: 24px; 
+background: url('background/NavigationTab.gif') no-repeat right top; /* orientation=lt */
+background: url('background/NavigationTab-rt.gif') no-repeat left top; /* orientation=rt */
+padding-right: 2px; /* orientation=lt */
+padding-left: 2px; /* orientation=rt */
 </programlisting>
 	</section>
+	<section>
+		<title>Client side JavaScript</title>
+		<para>
+			Just use the eXo.core.I18n object that provides the following
+			methods:
+			<itemizedlist>
+				<listitem>
+					<para>getOrientation() : returns either the string
+						lt or rt</para>
+				</listitem>
+				<listitem>
+					<para>getDir() : returns either the string ltr or rtl
+					</para>
+				</listitem>
+				<listitem>
+					<para>isLT() : returns true for LT</para>
+				</listitem>
+				<listitem>
+					<para>isRT() : returns true of RT</para>
+				</listitem>
+			</itemizedlist>
+		</para>
+	</section>
 
 </section>
-
-

Modified: portal/trunk/docs/reference-guide/pom.xml
===================================================================
--- portal/trunk/docs/reference-guide/pom.xml	2009-12-01 11:23:33 UTC (rev 886)
+++ portal/trunk/docs/reference-guide/pom.xml	2009-12-01 12:59:08 UTC (rev 887)
@@ -33,10 +33,10 @@
     </parent> 
     
     <groupId>org.gatein.doc</groupId>
-    <artifactId>gatein-user-guide-en</artifactId>
+    <artifactId>gatein-reference-guide-en</artifactId>
     <version>3.0.0-Beta03-SNAPSHOT</version>
     <packaging>jdocbook</packaging>
-    <name>GateIn User Guide en</name>
+    <name>GateIn Reference Guide en</name>
 
     <!-- TODO Remove when repositories are configured once for all -->
     <repositories>



More information about the gatein-commits mailing list