gatein SVN: r2654 - in portal/trunk: gadgets/server/src/main/webapp/WEB-INF/classes/containers/default and 3 other directories.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-04-15 08:14:27 -0400 (Thu, 15 Apr 2010)
New Revision: 2654
Modified:
portal/trunk/gadgets/core/src/main/java/containers/default/container.js
portal/trunk/gadgets/server/src/main/webapp/WEB-INF/classes/containers/default/container.js
portal/trunk/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
Log:
GTNPORTAL-1014 Returned currentView does not match enum view (revert code to revision 2549 to use code that is compatable with google gadgets)
Modified: portal/trunk/gadgets/core/src/main/java/containers/default/container.js
===================================================================
--- portal/trunk/gadgets/core/src/main/java/containers/default/container.js 2010-04-15 10:44:10 UTC (rev 2653)
+++ portal/trunk/gadgets/core/src/main/java/containers/default/container.js 2010-04-15 12:14:27 UTC (rev 2654)
@@ -177,4 +177,4 @@
// for a container.
"library": ""
}
-}}
\ No newline at end of file
+}}
Modified: portal/trunk/gadgets/server/src/main/webapp/WEB-INF/classes/containers/default/container.js
===================================================================
--- portal/trunk/gadgets/server/src/main/webapp/WEB-INF/classes/containers/default/container.js 2010-04-15 10:44:10 UTC (rev 2653)
+++ portal/trunk/gadgets/server/src/main/webapp/WEB-INF/classes/containers/default/container.js 2010-04-15 12:14:27 UTC (rev 2654)
@@ -177,4 +177,4 @@
// for a container.
"library": ""
}
-}}
\ No newline at end of file
+}}
Modified: portal/trunk/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl
===================================================================
--- portal/trunk/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl 2010-04-15 10:44:10 UTC (rev 2653)
+++ portal/trunk/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl 2010-04-15 12:14:27 UTC (rev 2654)
@@ -20,4 +20,4 @@
height = (Integer.parseInt(metadataMap.get("height")) + 10) + "px" ;
%>
-<div class="UIGadgetViewMode" id="$id" style="height: <%=height%>;"></div>
\ No newline at end of file
+<div class="UIGadgetViewMode" id="$id" style="height: <%=height%>;"></div>
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js 2010-04-15 10:44:10 UTC (rev 2653)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js 2010-04-15 12:14:27 UTC (rev 2654)
@@ -947,4 +947,4 @@
/**
* Default container.
*/
-gadgets.container = new gadgets.IfrContainer();
\ No newline at end of file
+gadgets.container = new gadgets.IfrContainer();
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-04-15 10:44:10 UTC (rev 2653)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-04-15 12:14:27 UTC (rev 2654)
@@ -86,9 +86,9 @@
public static final String PREF_DEBUG = "_pref_debug_";
- public static final String HOME_VIEW = "HOME";
+ public static final String HOME_VIEW = "home";
- public static final String CANVAS_VIEW = "CANVAS";
+ public static final String CANVAS_VIEW = "canvas";
public String view = HOME_VIEW;
16 years
gatein SVN: r2653 - portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_Reference_Guide/en-US.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-04-15 06:44:10 -0400 (Thu, 15 Apr 2010)
New Revision: 2653
Modified:
portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_Reference_Guide/en-US/Reference_Guide.xml
Log:
Created "Advanced section"
Modified: portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_Reference_Guide/en-US/Reference_Guide.xml
===================================================================
--- portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_Reference_Guide/en-US/Reference_Guide.xml 2010-04-15 10:43:53 UTC (rev 2652)
+++ portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_Reference_Guide/en-US/Reference_Guide.xml 2010-04-15 10:44:10 UTC (rev 2653)
@@ -13,6 +13,7 @@
<xi:include href="modules/GadgetDevelopment.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="modules/AuthenticationAndIdentity.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="modules/WSRP.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/Advanced.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="Revision_History.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<index />
16 years
gatein SVN: r2652 - in portal/trunk/docs/reference-guide/en: images and 5 other directories.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-04-15 06:43:53 -0400 (Thu, 15 Apr 2010)
New Revision: 2652
Added:
portal/trunk/docs/reference-guide/en/images/Advanced/
portal/trunk/docs/reference-guide/en/images/Advanced/Foundations/
portal/trunk/docs/reference-guide/en/modules/Advanced/
portal/trunk/docs/reference-guide/en/modules/Advanced/Foundations.xml
Removed:
portal/trunk/docs/reference-guide/en/images/PortalDevelopment/Foundations/
portal/trunk/docs/reference-guide/en/modules/PortalDevelopment/Foundations.xml
Modified:
portal/trunk/docs/reference-guide/en/master.xml
portal/trunk/docs/reference-guide/en/modules/PortalDevelopment.xml
Log:
Moved Foundation chapter in a new "Advanced" section
Copied: portal/trunk/docs/reference-guide/en/images/Advanced/Foundations (from rev 2648, portal/trunk/docs/reference-guide/en/images/PortalDevelopment/Foundations)
Modified: portal/trunk/docs/reference-guide/en/master.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/master.xml 2010-04-15 10:32:55 UTC (rev 2651)
+++ portal/trunk/docs/reference-guide/en/master.xml 2010-04-15 10:43:53 UTC (rev 2652)
@@ -89,4 +89,5 @@
<xi:include href="modules/GadgetDevelopment.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="modules/AuthenticationAndIdentity.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="modules/WSRP.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/Advanced.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</book>
Copied: portal/trunk/docs/reference-guide/en/modules/Advanced/Foundations.xml (from rev 2648, portal/trunk/docs/reference-guide/en/modules/PortalDevelopment/Foundations.xml)
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/Advanced/Foundations.xml (rev 0)
+++ portal/trunk/docs/reference-guide/en/modules/Advanced/Foundations.xml 2010-04-15 10:43:53 UTC (rev 2652)
@@ -0,0 +1,733 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
+<section id="sect-Reference_Guide-Foundations">
+
+ <title>Foundations</title>
+ <section id="sect-Reference_Guide-Foundations-Kernel">
+ <title>GateIn Kernel</title>
+ <para>
+ &PRODUCT; is built as a set of services on top of a dependency injection kernel. The kernel provides configuration, lifecycle handling, component scopes, and some core services.
+ </para>
+ <para>
+ Service components exist in two scopes. First scope is represented by <emphasis role="bold">RootContainer</emphasis> - it contains services that exist independently of any portal, and can be
+ accessed by all portals.
+ </para>
+ <para>
+ Second scope is portal-private in the form of <emphasis role="bold">PortalContainer</emphasis>. Each portal lives in an instance of PortalContainer.
+ This scope contains services that are common for a set of portals, and services which should not be shared by all portals.
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/Advanced/Foundations/PortalContainers.png" format="PNG" align="center" scale="100" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/Advanced/Foundations/PortalContainers.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>
+ Whenever a specific service is looked up through PortalContainer, and the service is not available, the lookup is
+ delegated further up to RootContainer. We can therefore have default instance of a certain component in
+ RootContainer, and portal specific instances in some or all PortalContainers, that override the default
+ instance.
+ </para>
+ <para>
+ Whenever your portal application has to be integrated more closely with GateIn services, the way to do it is by
+ looking up these services through PortalContainer. Be careful though - only officially documented services
+ should be accessed this way, and used according to documentation, as most of the services are an implementation
+ detail of GateIn, and subject to change without notice.
+ </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Foundations-Configuring_services">
+ <title>Configuring services</title>
+
+ <para>GateIn Kernel uses dependency injection to create services based on <emphasis role="bold">configuration.xml</emphasis> configuration files.
+ The location of the configuration files determines if services are placed into RootContainer scope, or into PortalContainer scope.
+ All configuration.xml files located at <emphasis role="bold">conf/configuration.xml</emphasis> in the classpath (any directory, or any jar in the classpath) will have their
+ services configured at RootContainer scope.
+ All configuration.xml files located at <emphasis role="bold">conf/portal/configuration.xml</emphasis> in the classpath will have their services configured at PortalContainer scope.
+ Additionally, <emphasis role="bold">portal extensions</emphasis> can contain configuration in <emphasis role="bold">WEB-INF/conf/configuration.xml</emphasis>, and will also have their services configured at PortalContainer scope.
+ </para>
+ <note>
+ <para>Portal extensions are described later on.</para>
+ </note>
+
+ </section>
+
+ <section id="sect-Reference_Guide-Foundations-Configuration_syntax">
+ <title>Configuration syntax</title>
+
+ <section id="sect-Reference_Guide-Foundations-Configuration_syntax-Component">
+ <title>Components</title>
+ <para>A service component is defined in <emphasis role="bold">configuration.xml</emphasis> by using <emphasis role="bold"><component></emphasis> element.</para>
+ <para>There is only one required information when defining a service - the service implementation class, specified using <emphasis role="bold"><type></emphasis></para>
+ <para>Every component has a <emphasis role="bold"><key></emphasis> that identifies it. If not explicitly set, a key defaults to the value of <type>.
+ If key can be loaded as a class, a Class object is used as a key, otherwise a String is used.</para>
+ <para>The usual approach is to specify an interface as a key.</para>
+
+ <example>
+ <title>Example of service component configuration:</title>
+ <programlisting role="XML"><![CDATA[
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<configuration
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
+ http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+ <component>
+ <key>org.exoplatform.services.database.HibernateService</key>
+ <type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
+
+ ...
+
+ </component>
+</configuration>
+ ]]></programlisting>
+ </example>
+ </section>
+ <section id="sect-Reference_Guide-Foundations-Configuration_syntax-External_plugins">
+ <title>External Plugins</title>
+ <para>GateIn Kernel supports non-component objects that can be configured, instantiated, and injected into registered components, using method calls.
+ The mechanism is called 'plugins', and allows portal extensions to add additional configurations to core services.</para>
+ <para>External plugin is defined by using <emphasis role="bold"><external-component-plugins></emphasis> wrapper element which contains one or more
+ <emphasis role="bold"><component-plugin></emphasis> definitions. <external-component-plugins> uses <emphasis role="bold"><target-component></emphasis> to specify a target service component that will receive injected objects.</para>
+ <para>Every <component-plugin> defines an implementation type, and a method on target component
+ to use for injection (<emphasis role="bold"><set-method></emphasis>). </para>
+ <para>A plugin implementation class has to implement <emphasis role="bold">org.exoplatform.container.component. ComponentPlugin</emphasis> interface.</para>
+ <para>In the following example <emphasis role="bold">PortalContainerDefinitionPlugin</emphasis> implements ComponentPlugin:</para>
+ <example>
+ <title>PortalContainerDefinitionPlugin</title>
+ <programlisting role="XML"><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
+ http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <external-component-plugins>
+ <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 fully qualified name of the PortalContainerDefinitionPlugin -->
+ <type>org.exoplatform.container.definition.PortalContainerDefinitionPlugin</type>
+
+ ...
+
+ </component-plugin>
+ </external-component-plugins>
+</configuration>
+ ]]></programlisting>
+ </example>
+ </section>
+
+ <section id="sect-Reference_Guide-Foundations-Configuration_syntax-Includes">
+ <title>Includes, and special URLs</title>
+ <para>It is possible to break <emphasis role="bold">configuration.xml</emphasis> file into many smaller files, that are then included into a 'master' configuration file.
+ The included files are complete configuration xml documents by themselves - they are not fragments of text.</para>
+ <para>An example configuration.xml that 'outsources' its content into several files:</para>
+ <programlisting role="XML"><![CDATA[
+<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
+ http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <import>war:/conf/sample-ext/jcr/jcr-configuration.xml</import>
+ <import>war:/conf/sample-ext/portal/portal-configuration.xml</import>
+
+</configuration>
+ ]]></programlisting>
+
+ <para>We see a special URL being used to reference another configuration file.
+ URL schema <emphasis role="bold">'war:'</emphasis> means, that the path that follows is resolved relative to current PortalContainer's servlet context resource path, starting at <emphasis role="bold">WEB-INF</emphasis> as a root.</para>
+ <note>
+ <para>Current PortalContainer is really a newly created PortalContainer, as war: URLs only make sense for PortalContainer scoped configuration.</para>
+ </note>
+ <para>Also, thanks to extension mechanism, the servlet context used for resource loading is a <emphasis role="bold">unified servlet context</emphasis> (as explaned in a later section).</para>
+ <para>To have include path resolved relative to current classpath (context classloader), use <emphasis role="bold">'jar:'</emphasis> URL schema.</para>
+ </section>
+
+ <section id="sect-Reference_Guide-Foundations-Configuration_syntax-Special_vars">
+ <title>Special variables</title>
+ <para>Configuration files may contain a <emphasis role="bold">special variable</emphasis> reference <emphasis>${container.name.suffix}</emphasis>. This variable resolves to the name of the current portal container, prefixed by underscore (_).
+ This facilitates reuse of configuration files in situations where portal specific unique names need to be assigned to some resources
+ (i.e. JNDI names, Database / DataSource names, JCR repository names, etc ...).</para>
+ <para>This variable is only defined when there is a current PortalContainer available - only for PortalContainer scoped services.</para>
+ <para>A good example for this is <emphasis role="bold">HibernateService</emphasis>:</para>
+ <example id="sect-Reference_Guide-Foundations-Configuration_syntax-Special_vars-Example">
+ <title>HibernateService using variables</title>
+ <programlisting role="XML"><![CDATA[
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<configuration
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
+ http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>org.exoplatform.services.database.HibernateService</key>
+ <jmx-name>database:type=HibernateService</jmx-name>
+ <type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
+ <init-params>
+ <properties-param>
+ <name>hibernate.properties</name>
+ <description>Default Hibernate Service</description>
+ <property name="hibernate.show_sql" value="false" />
+ <property name="hibernate.cglib.use_reflection_optimizer" value="true" />
+ <property name="hibernate.connection.url"
+ value="jdbc:hsqldb:file:../temp/data/exodb${container.name.suffix}" />
+ <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver" />
+ <property name="hibernate.connection.autocommit" value="true" />
+ <property name="hibernate.connection.username" value="sa" />
+ <property name="hibernate.connection.password" value="" />
+ <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
+ <property name="hibernate.c3p0.min_size" value="5" />
+ <property name="hibernate.c3p0.max_size" value="20" />
+ <property name="hibernate.c3p0.timeout" value="1800" />
+ <property name="hibernate.c3p0.max_statements" value="50" />
+ </properties-param>
+ </init-params>
+ </component>
+</configuration>
+ ]]></programlisting>
+ </example>
+
+ </section>
+ </section>
+
+
+ <section id="sect-Reference_Guide-Foundations-Init_params">
+ <title>InitParams configuration object</title>
+
+ <para>
+ <literal>InitParams</literal> is a configuration object that is essentially a map of key-value pairs,
+ where key is always a <literal>String</literal>, and value can be any type that can be described
+ using kernel configuration xml.
+ </para>
+
+ <para>
+ Service components that form the &PRODUCT; insfrastructure use <literal>InitParams</literal> object to configure themselves.
+ A component can have one instance of InitParams injected at most. If the service component's constructor takes InitParams
+ as any of the parameters it will automatically be injected at component instantiation time. The xml configuration
+ for a service component that expects InitParams object must include <init-params> element (even if an empty one).
+ </para>
+
+ <para>
+ Let's use an example to see how the kernel xml configuration syntax looks for creating <literal>InitParams</literal> instances.
+ </para>
+
+ <example>
+ <title>InitParams - properties-param</title>
+ <programlisting role="XML"><![CDATA[
+<component>
+ <key>org.exoplatform.services.naming.InitialContextInitializer</key>
+ <type>org.exoplatform.services.naming.InitialContextInitializer</type>
+ <init-params>
+ <properties-param>
+ <name>default-properties</name>
+ <description>Default initial context properties</description>
+ <property name="java.naming.factory.initial"
+ value="org.exoplatform.services.naming.SimpleContextFactory" />
+ </properties-param>
+ </init-params>
+</component>
+ ]]></programlisting>
+ </example>
+
+ <para>
+ InitParams object description begins with <init-params> element. It can have zero or more children elements
+ each of which is one of <value-param>, <values-param>, <properties-param>, or <object-param>.
+ Each of these child elements takes a <name> that serves as a map entry key, and an optional <description>.
+ It also takes a type-specific value specification.
+ </para>
+
+ <para>
+ For <properties-param> the value specification is in the form of one or more <property> elements,
+ each of which specifies two strings - a property name, and a property value. Each <properties-params>
+ defines one <literal>java.util.Properties</literal> instance. Also see
+ <xref linkend="sect-Reference_Guide-Foundations-Configuration_syntax-Special_vars-Example"/> for an example.
+ </para>
+
+ <example>
+ <title>InitParams - value-param</title>
+ <programlisting role="XML"><![CDATA[
+<component>
+ <key>org.exoplatform.services.transaction.TransactionService</key>
+ <type>org.exoplatform.services.transaction.impl.jotm.TransactionServiceJotmImpl</type>
+ <init-params>
+ <value-param>
+ <name>timeout</name>
+ <value>5</value>
+ </value-param>
+ </init-params>
+</component>
+ ]]></programlisting>
+ </example>
+
+ <para>
+ For <value-param> the value specification is in the form of <value> element, which defines
+ one <literal>String</literal> instance.
+ </para>
+
+ <example>
+ <title>InitParams - values-param</title>
+ <programlisting role="XML"><![CDATA[
+<component>
+ <key>org.exoplatform.services.resources.ResourceBundleService</key>
+ <type>org.exoplatform.services.resources.impl.SimpleResourceBundleService</type>
+ <init-params>
+ <values-param>
+ <name>classpath.resources</name>
+ <description>The resources that start with the following package name should be load from file system</description>
+ <value>locale.portlet</value>
+ </values-param>
+
+ <values-param>
+ <name>init.resources</name>
+ <description>Store the following resources into the db for the first launch </description>
+ <value>locale.test.resources.test</value>
+ </values-param>
+
+ <values-param>
+ <name>portal.resource.names</name>
+ <description>The properties files of the portal , those file will be merged
+ into one ResourceBundle properties </description>
+ <value>local.portal.portal</value>
+ <value>local.portal.custom</value>
+ </values-param>
+ </init-params>
+</component>
+ ]]></programlisting>
+ </example>
+
+ <para>
+ For <values-param> the value specification is in the form of one or more <value> elements,
+ each of which represents one <literal>String</literal> instance, where all the <literal>String</literal> values
+ are then collected into a <literal>java.util.List</literal> instance.
+ </para>
+
+ <example>
+ <title>InitParams - object-param</title>
+ <programlisting role="XML"><![CDATA[
+<component>
+ <key>org.exoplatform.services.cache.CacheService</key>
+ <jmx-name>cache:type=CacheService</jmx-name>
+ <type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
+ <init-params>
+ <object-param>
+ <name>cache.config.default</name>
+ <description>The default cache configuration</description>
+ <object type="org.exoplatform.services.cache.ExoCacheConfig">
+ <field name="name">
+ <string>default</string>
+ </field>
+ <field name="maxSize">
+ <int>300</int>
+ </field>
+ <field name="liveTime">
+ <long>300</long>
+ </field>
+ <field name="distributed">
+ <boolean>false</boolean>
+ </field>
+ <field name="implementation">
+ <string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+</component>
+ ]]></programlisting>
+ </example>
+
+ <para>
+ For <object-param> in our case, the value specification comes in a form of <object> element, which is
+ used for POJO style object specification (you specify an implementation class - <type>, and property values - <field>).
+ </para>
+
+ <para>
+ Also see <xref linkend="sect-Reference_Guide-Foundations-Configuring_portal_Container_declaration_example" />
+ for an example of specifying a field of <literal>Collection</literal> type.
+ </para>
+
+ <para>
+ The <literal>InitParams</literal> structure - the names and types of entries is specific for each service,
+ as it is the code inside service components's class that decides what entry names to look up and what types
+ it expects to find.
+ </para>
+ </section>
+
+
+ <section id="sect-Reference_Guide-Foundations-Configuring_portal">
+ <title>Configuring a portal container</title>
+
+ <para>
+ A <emphasis role="bold">portal container</emphasis> is defined by several attributes.
+ </para>
+
+ <para>
+ First, there is a <emphasis role="bold">portal container name</emphasis>, which is always equal to URL context to which the current portal is bound.
+ </para>
+
+ <para>
+ Second, there is a <emphasis role="bold">REST context name</emphasis>, which is used for REST access to portal application - every portal has
+ exactly one (unique) REST context name.
+ </para>
+
+ <para>
+ Then, there is a <emphasis role="bold">realm name</emphasis> which is the name of security realm used for authentication when users log into the
+ portal.
+ </para>
+
+ <para>
+ Finally, there is a list of <emphasis role="bold">Dependencies</emphasis> - other web applications, whose resources are visible to current
+ portal (via extension mechanism described later), and are searched in the specified order.
+ </para>
+
+ <example id="sect-Reference_Guide-Foundations-Configuring_portal_Container_declaration_example">
+ <title>Portal container declaration example</title>
+ <programlisting role="XML"><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
+ http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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 -->
+ <value>
+ <string>sample-ext</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+</configuration>
+ ]]>
+</programlisting>
+ </example>
+
+
+ <note>
+ <para>Dependencies are part of the extension mechanism.</para>
+ </note>
+
+ <para>
+ Every <emphasis role="bold">portal container</emphasis> is represented by a <emphasis role="bold">PortalContainer instance</emphasis>, which contains:
+ <itemizedlist>
+ <listitem>
+ <para>associated <emphasis role="bold">ExoContainerContext</emphasis>, which contains information about the portal</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">unified servlet context</emphasis>, for web-archive-relative resource loading</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">unified classloader</emphasis>, for classpath based resource loading</para>
+ </listitem>
+ <listitem>
+ <para>methods for retrieving services</para>
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ <emphasis role="bold">Unified servlet context</emphasis>, and <emphasis role="bold">unified classloader</emphasis> are part of the <emphasis role="bold">extension mechanism</emphasis> (explained in next section),
+ and provide standard API (ServletContext, ClassLoader) with specific resource loading behavior - visibility into associated web application archives,
+ configured with Dependencies property of PortalContainerDefinition. Resources from other web applications are queried in the order specified by Dependencies.
+ The later entries in the list override the previous ones.
+ </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Foundations-Extension_mechanism">
+ <title>GateIn Extension Mechanism, and Portal Extensions</title>
+
+ <para>
+ <emphasis role="bold">Extension mechanism</emphasis> is a functionality that makes it possible to override portal resources in an almost
+ plug-and-play fashion - just drop in a .war archive with the resources, and configure its position on the portal's
+ classpath.
+ This way any customizations of the portal don't have to involve unpacking and repacking the original portal
+ .war archives. Instead, you create your own .war archive with changed resources, that override the resources in
+ the original archive.
+ </para>
+
+ <para>
+ A web archive packaged in a way to be used through extension mechanism is called <emphasis role="bold">portal extension</emphasis>.
+ </para>
+ <para>
+ There are two steps necessary to create a portal extension.
+ </para>
+ <para>
+ First, declare <emphasis role="bold">PortalConfigOwner</emphasis> servlet context listener in web.xml of your web application.
+ </para>
+ <example><title>Example of a portal extension called sample-ext:</title>
+
+ <programlisting role="XML"><![CDATA[
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
+ http://java.sun.com/dtd/web-app_2_3.dtd>
+<web-app>
+
+ <display-name>sample-ext</display-name>
+
+ <listener>
+ <listener-class>org.exoplatform.container.web.PortalContainerConfigOwner</listener-class>
+ </listener>
+
+ ...
+
+</web-app>
+ ]]></programlisting>
+ </example>
+ <para>
+ Then, add the servlet context name of this web application in proper place in the list of Dependencies of the PortalContainerDefinition
+ of all the portal containers that you want to have access to its resources.
+ </para>
+ <para>
+ After this step your web archive will be on portal's unified classpath, and unified servlet context resource path.
+ The later in the Dependencies list your application is, the higher priority it has when resources are loaded by portal.
+ </para>
+
+ <note>
+ <para>See 'Configuring a portal' section for example of PortalContainerDefinition, that has sample-ext at the end of its list of Dependencies.</para>
+ </note>
+
+ </section>
+
+
+ <section id="sect-Reference_Guide-Foundations-Multiple_portals">
+ <title>Running Multiple Portals</title>
+
+ <para>
+ It is possible to run several independent portal containers - each bound to a different URL context - within
+ the same JVM instance. This kind of setup is very efficient from administration and resource consumption
+ aspect. The most elegant way to <emphasis role="bold">reuse</emphasis> configuration for different coexisting portals is by way of extension
+ mechanism - by <emphasis role="bold">inheriting</emphasis> resources and configuration from existing web archives, and just <emphasis role="bold">adding</emphasis> extra resources to it,
+ and <emphasis role="bold">overriding</emphasis> those that need to be changed by including modified copies.
+ </para>
+
+ <para>
+ In order for a portal application to correctly function when deployed in multiple portals, the application may
+ have to dynamically query the information about the current portal container. The application should not make
+ any assumptions about the name, and other information of the current portal, as there are now multiple different portals in play.
+ </para>
+
+ <para>
+ At any point during request processing, or lifecycle event processing, your application can retrieve this
+ information through <emphasis role="bold">org.exoplatform.container. ExoContainerContext</emphasis>.
+ Sometimes your application needs to make sure that the proper <emphasis role="bold">PortalContainer</emphasis>
+ - the source of <emphasis role="bold">ExoContainerContext</emphasis> - is associated with the current call.
+ </para>
+
+ <para>
+ If you ship servlets or servlet filters as part of your portal application, and if you need to access portal
+ specific resources at any time during the processing of the servlet or filter request, then you need to make
+ sure the servlet/filter is associated with the current container.
+ </para>
+ <para>
+ The proper way to do that is to make your servlet extend <emphasis role="bold">org.exoplatform.container.web. AbstractHttpServlet</emphasis>
+ class.
+ This will not only properly initialize current <emphasis role="bold">PortalContainer</emphasis> for you, but will also set the current thread's
+ context classloader to one that looks for resources in associated web applications in the order specified by
+ <emphasis role="bold">Dependencies</emphasis> configuration (as explained in Extension mechanism section).
+ </para>
+ <para>
+ Similarly for filters, make sure your filter class extends <emphasis role="bold">org.exoplatform.container.web. AbstractFilter</emphasis>.
+ Both <emphasis role="bold">AbstractHttpServlet</emphasis>, and <emphasis role="bold">AbstractFilter</emphasis> have a method <emphasis role="bold">getContainer()</emphasis>,
+ which returns the current <emphasis role="bold">PortalContainer</emphasis>.
+
+ If your servlet handles the requests by implementing a <emphasis role="bold">service()</emphasis> method, you need to rename that method to match
+ the following signature:</para>
+ <programlisting role="JAVA"><![CDATA[
+/**
+ * Use this method instead of Servlet.service()
+ */
+protected void onService(ExoContainer container, HttpServletRequest req,
+ HttpServletResponse res) throws ServletException, IOException;
+ ]]></programlisting>
+ <note>
+ <para>
+ The reason is that AbstractHttpServlet implements service() to perform its interception, and you don't want to
+ overwrite (by overriding) this functionality.
+ </para>
+ </note>
+ <para>
+ You may also need to access portal information within your <emphasis role="bold">HttpSessionListener</emphasis>. Again, make sure to extend the
+ provided abstract class - <emphasis role="bold">org.exoplatform.container.web. AbstractHttpSessionListener</emphasis>.
+ Also, modify your method signatures as follows:</para>
+ <programlisting role="JAVA"><![CDATA[
+/**
+ * Use this method instead of HttpSessionListener.sessionCreated()
+ */
+protected void onSessionCreated(ExoContainer container, HttpSessionEvent event);
+
+/**
+ * Use this method instead of HttpSessionListener.sessionDestroyed()
+ */
+protected void onSessionDestroyed(ExoContainer container, HttpSessionEvent event);
+ ]]></programlisting>
+ <para>
+ There is another method you have to implement in this case:</para>
+ <programlisting role="JAVA"><![CDATA[
+/**
+ * Method should return true if unified servlet context,
+ * and unified classloader should be made available
+ */
+protected boolean requirePortalEnvironment();
+ ]]></programlisting>
+ <para>
+ If this method returns true, current thread's context classloader is set up according to <emphasis role="bold">Dependencies</emphasis>
+ configuration, and availability of the associated web applications. If it returns false, the standard
+ application separation rules are used for resource loading (effectively turning off the
+ extension mechanism). This method exists on <emphasis role="bold">AbstractHttpServlet</emphasis> and <emphasis role="bold">AbstractFilter</emphasis> as well, where there is a
+ default implementation that automatically returns true, when it detects there is a current PortalContainer
+ present, otherwise it returns false.
+
+ </para>
+
+ <para>
+ We still have to explain how to properly perform <emphasis role="bold">ServletContextListener</emphasis> based initialization, when you need
+ access to current PortalContainer.
+ </para>
+
+ <para>
+ GateIn has no direct control over the deployment of application archives (.war, .ear files) - it is the
+ application server that performs the deployment. For <emphasis role="bold">extension mechanism</emphasis> to work properly, the applications,
+ associated with the portal via <emphasis role="bold">Dependencies</emphasis> configuration, have to be deployed before the portal, that depends
+ on them, is initialized. On the other hand, these applications may require an already initialized PortalContainer
+ to properly initialize themselves - we have a recursive dependency problem. To resolve this problem, a
+ mechanism of <emphasis role="bold">initialization tasks</emphasis>, and <emphasis role="bold">task queues</emphasis>, was put in place. Web applications that depend on current
+ PortalContainer for their initialization have to avoid performing their initialization directly in some
+ ServletContextListener executed during their deployment (before any PortalContainer was initialized). Instead,
+ a web application should package its initialization logic into an init task of appropriate type, and only use
+ ServletContextListener to insert the init task instance into the proper init tasks queue.
+ </para>
+
+ <para>An example of this is Gadgets application which registers Google gadgets with the current PortalContainer:
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[
+public class GadgetRegister implements ServletContextListener
+{
+ public void contextInitialized(ServletContextEvent event)
+ {
+ // Create a new post-init task
+ final PortalContainerPostInitTask task = new PortalContainerPostInitTask() {
+
+ public void execute(ServletContext context, PortalContainer portalContainer)
+ {
+ try
+ {
+ SourceStorage sourceStorage =
+ (SourceStorage) portalContainer.getComponentInstanceOfType(SourceStorage.class);
+ ...
+ }
+ catch (RuntimeException e)
+ {
+ throw e;
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Initialization failed: ", e);
+ }
+ }
+ };
+
+ // Add post-init task for execution on all the portal containers
+ // that depend on the given ServletContext according to
+ // PortalContainerDefinitions (via Dependencies configuration)
+ PortalContainer.addInitTask(event.getServletContext(), task);
+ }
+}
+ ]]></programlisting>
+
+ <para>
+ The above example uses <emphasis role="bold">PortalContainerPostInitTask</emphasis>, which gets executed after the portal container has been
+ initialized. In some situations you may want to execute initialization after portal container was instantiated,
+ but before it was initialized - use <emphasis role="bold">PortalContainerPreInitTask</emphasis> in that case. Or, you may want to execute
+ initialization after all the post-init tasks have been executed - use <emphasis role="bold">PortalContainerPostCreateTask</emphasis> in that case.
+ </para>
+
+ <para>
+ One more area that may need your attention are <emphasis role="bold">LoginModules</emphasis>. If you use custom LoginModules, that require
+ current ExoContainer, make sure they extend <emphasis role="bold">org.exoplatform.services.security.jaas.AbstractLoginModule</emphasis> for
+ proper initialization. AbstractLoginModule also takes care of the basic configuration - it recognizes two
+ initialization options - <emphasis role="bold">portalContainerName</emphasis>, and <emphasis role="bold">realmName</emphasis> whose values you can access via protected fields of
+ the same name.
+ </para>
+
+ </section>
+
+</section>
Deleted: portal/trunk/docs/reference-guide/en/modules/PortalDevelopment/Foundations.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/PortalDevelopment/Foundations.xml 2010-04-15 10:32:55 UTC (rev 2651)
+++ portal/trunk/docs/reference-guide/en/modules/PortalDevelopment/Foundations.xml 2010-04-15 10:43:53 UTC (rev 2652)
@@ -1,733 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
-]>
-<section id="sect-Reference_Guide-Foundations">
-
- <title>Foundations</title>
- <section id="sect-Reference_Guide-Foundations-Kernel">
- <title>GateIn Kernel</title>
- <para>
- &PRODUCT; is built as a set of services on top of a dependency injection kernel. The kernel provides configuration, lifecycle handling, component scopes, and some core services.
- </para>
- <para>
- Service components exist in two scopes. First scope is represented by <emphasis role="bold">RootContainer</emphasis> - it contains services that exist independently of any portal, and can be
- accessed by all portals.
- </para>
- <para>
- Second scope is portal-private in the form of <emphasis role="bold">PortalContainer</emphasis>. Each portal lives in an instance of PortalContainer.
- This scope contains services that are common for a set of portals, and services which should not be shared by all portals.
- </para>
- <para>
- <mediaobject>
- <imageobject role="html">
- <imagedata fileref="images/PortalDevelopment/Foundations/PortalContainers.png" format="PNG" align="center" scale="100" />
- </imageobject>
- <imageobject role="fo">
- <imagedata fileref="images/PortalDevelopment/Foundations/PortalContainers.png" format="PNG" align="center" contentwidth="150mm" />
- </imageobject>
- </mediaobject>
- </para>
- <para>
- Whenever a specific service is looked up through PortalContainer, and the service is not available, the lookup is
- delegated further up to RootContainer. We can therefore have default instance of a certain component in
- RootContainer, and portal specific instances in some or all PortalContainers, that override the default
- instance.
- </para>
- <para>
- Whenever your portal application has to be integrated more closely with GateIn services, the way to do it is by
- looking up these services through PortalContainer. Be careful though - only officially documented services
- should be accessed this way, and used according to documentation, as most of the services are an implementation
- detail of GateIn, and subject to change without notice.
- </para>
- </section>
-
- <section id="sect-Reference_Guide-Foundations-Configuring_services">
- <title>Configuring services</title>
-
- <para>GateIn Kernel uses dependency injection to create services based on <emphasis role="bold">configuration.xml</emphasis> configuration files.
- The location of the configuration files determines if services are placed into RootContainer scope, or into PortalContainer scope.
- All configuration.xml files located at <emphasis role="bold">conf/configuration.xml</emphasis> in the classpath (any directory, or any jar in the classpath) will have their
- services configured at RootContainer scope.
- All configuration.xml files located at <emphasis role="bold">conf/portal/configuration.xml</emphasis> in the classpath will have their services configured at PortalContainer scope.
- Additionally, <emphasis role="bold">portal extensions</emphasis> can contain configuration in <emphasis role="bold">WEB-INF/conf/configuration.xml</emphasis>, and will also have their services configured at PortalContainer scope.
- </para>
- <note>
- <para>Portal extensions are described later on.</para>
- </note>
-
- </section>
-
- <section id="sect-Reference_Guide-Foundations-Configuration_syntax">
- <title>Configuration syntax</title>
-
- <section id="sect-Reference_Guide-Foundations-Configuration_syntax-Component">
- <title>Components</title>
- <para>A service component is defined in <emphasis role="bold">configuration.xml</emphasis> by using <emphasis role="bold"><component></emphasis> element.</para>
- <para>There is only one required information when defining a service - the service implementation class, specified using <emphasis role="bold"><type></emphasis></para>
- <para>Every component has a <emphasis role="bold"><key></emphasis> that identifies it. If not explicitly set, a key defaults to the value of <type>.
- If key can be loaded as a class, a Class object is used as a key, otherwise a String is used.</para>
- <para>The usual approach is to specify an interface as a key.</para>
-
- <example>
- <title>Example of service component configuration:</title>
- <programlisting role="XML"><![CDATA[
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
- http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
- <component>
- <key>org.exoplatform.services.database.HibernateService</key>
- <type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
-
- ...
-
- </component>
-</configuration>
- ]]></programlisting>
- </example>
- </section>
- <section id="sect-Reference_Guide-Foundations-Configuration_syntax-External_plugins">
- <title>External Plugins</title>
- <para>GateIn Kernel supports non-component objects that can be configured, instantiated, and injected into registered components, using method calls.
- The mechanism is called 'plugins', and allows portal extensions to add additional configurations to core services.</para>
- <para>External plugin is defined by using <emphasis role="bold"><external-component-plugins></emphasis> wrapper element which contains one or more
- <emphasis role="bold"><component-plugin></emphasis> definitions. <external-component-plugins> uses <emphasis role="bold"><target-component></emphasis> to specify a target service component that will receive injected objects.</para>
- <para>Every <component-plugin> defines an implementation type, and a method on target component
- to use for injection (<emphasis role="bold"><set-method></emphasis>). </para>
- <para>A plugin implementation class has to implement <emphasis role="bold">org.exoplatform.container.component. ComponentPlugin</emphasis> interface.</para>
- <para>In the following example <emphasis role="bold">PortalContainerDefinitionPlugin</emphasis> implements ComponentPlugin:</para>
- <example>
- <title>PortalContainerDefinitionPlugin</title>
- <programlisting role="XML"><![CDATA[
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
- http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <external-component-plugins>
- <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 fully qualified name of the PortalContainerDefinitionPlugin -->
- <type>org.exoplatform.container.definition.PortalContainerDefinitionPlugin</type>
-
- ...
-
- </component-plugin>
- </external-component-plugins>
-</configuration>
- ]]></programlisting>
- </example>
- </section>
-
- <section id="sect-Reference_Guide-Foundations-Configuration_syntax-Includes">
- <title>Includes, and special URLs</title>
- <para>It is possible to break <emphasis role="bold">configuration.xml</emphasis> file into many smaller files, that are then included into a 'master' configuration file.
- The included files are complete configuration xml documents by themselves - they are not fragments of text.</para>
- <para>An example configuration.xml that 'outsources' its content into several files:</para>
- <programlisting role="XML"><![CDATA[
-<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
- http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <import>war:/conf/sample-ext/jcr/jcr-configuration.xml</import>
- <import>war:/conf/sample-ext/portal/portal-configuration.xml</import>
-
-</configuration>
- ]]></programlisting>
-
- <para>We see a special URL being used to reference another configuration file.
- URL schema <emphasis role="bold">'war:'</emphasis> means, that the path that follows is resolved relative to current PortalContainer's servlet context resource path, starting at <emphasis role="bold">WEB-INF</emphasis> as a root.</para>
- <note>
- <para>Current PortalContainer is really a newly created PortalContainer, as war: URLs only make sense for PortalContainer scoped configuration.</para>
- </note>
- <para>Also, thanks to extension mechanism, the servlet context used for resource loading is a <emphasis role="bold">unified servlet context</emphasis> (as explaned in a later section).</para>
- <para>To have include path resolved relative to current classpath (context classloader), use <emphasis role="bold">'jar:'</emphasis> URL schema.</para>
- </section>
-
- <section id="sect-Reference_Guide-Foundations-Configuration_syntax-Special_vars">
- <title>Special variables</title>
- <para>Configuration files may contain a <emphasis role="bold">special variable</emphasis> reference <emphasis>${container.name.suffix}</emphasis>. This variable resolves to the name of the current portal container, prefixed by underscore (_).
- This facilitates reuse of configuration files in situations where portal specific unique names need to be assigned to some resources
- (i.e. JNDI names, Database / DataSource names, JCR repository names, etc ...).</para>
- <para>This variable is only defined when there is a current PortalContainer available - only for PortalContainer scoped services.</para>
- <para>A good example for this is <emphasis role="bold">HibernateService</emphasis>:</para>
- <example id="sect-Reference_Guide-Foundations-Configuration_syntax-Special_vars-Example">
- <title>HibernateService using variables</title>
- <programlisting role="XML"><![CDATA[
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
- http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <component>
- <key>org.exoplatform.services.database.HibernateService</key>
- <jmx-name>database:type=HibernateService</jmx-name>
- <type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
- <init-params>
- <properties-param>
- <name>hibernate.properties</name>
- <description>Default Hibernate Service</description>
- <property name="hibernate.show_sql" value="false" />
- <property name="hibernate.cglib.use_reflection_optimizer" value="true" />
- <property name="hibernate.connection.url"
- value="jdbc:hsqldb:file:../temp/data/exodb${container.name.suffix}" />
- <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver" />
- <property name="hibernate.connection.autocommit" value="true" />
- <property name="hibernate.connection.username" value="sa" />
- <property name="hibernate.connection.password" value="" />
- <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
- <property name="hibernate.c3p0.min_size" value="5" />
- <property name="hibernate.c3p0.max_size" value="20" />
- <property name="hibernate.c3p0.timeout" value="1800" />
- <property name="hibernate.c3p0.max_statements" value="50" />
- </properties-param>
- </init-params>
- </component>
-</configuration>
- ]]></programlisting>
- </example>
-
- </section>
- </section>
-
-
- <section id="sect-Reference_Guide-Foundations-Init_params">
- <title>InitParams configuration object</title>
-
- <para>
- <literal>InitParams</literal> is a configuration object that is essentially a map of key-value pairs,
- where key is always a <literal>String</literal>, and value can be any type that can be described
- using kernel configuration xml.
- </para>
-
- <para>
- Service components that form the &PRODUCT; insfrastructure use <literal>InitParams</literal> object to configure themselves.
- A component can have one instance of InitParams injected at most. If the service component's constructor takes InitParams
- as any of the parameters it will automatically be injected at component instantiation time. The xml configuration
- for a service component that expects InitParams object must include <init-params> element (even if an empty one).
- </para>
-
- <para>
- Let's use an example to see how the kernel xml configuration syntax looks for creating <literal>InitParams</literal> instances.
- </para>
-
- <example>
- <title>InitParams - properties-param</title>
- <programlisting role="XML"><![CDATA[
-<component>
- <key>org.exoplatform.services.naming.InitialContextInitializer</key>
- <type>org.exoplatform.services.naming.InitialContextInitializer</type>
- <init-params>
- <properties-param>
- <name>default-properties</name>
- <description>Default initial context properties</description>
- <property name="java.naming.factory.initial"
- value="org.exoplatform.services.naming.SimpleContextFactory" />
- </properties-param>
- </init-params>
-</component>
- ]]></programlisting>
- </example>
-
- <para>
- InitParams object description begins with <init-params> element. It can have zero or more children elements
- each of which is one of <value-param>, <values-param>, <properties-param>, or <object-param>.
- Each of these child elements takes a <name> that serves as a map entry key, and an optional <description>.
- It also takes a type-specific value specification.
- </para>
-
- <para>
- For <properties-param> the value specification is in the form of one or more <property> elements,
- each of which specifies two strings - a property name, and a property value. Each <properties-params>
- defines one <literal>java.util.Properties</literal> instance. Also see
- <xref linkend="sect-Reference_Guide-Foundations-Configuration_syntax-Special_vars-Example"/> for an example.
- </para>
-
- <example>
- <title>InitParams - value-param</title>
- <programlisting role="XML"><![CDATA[
-<component>
- <key>org.exoplatform.services.transaction.TransactionService</key>
- <type>org.exoplatform.services.transaction.impl.jotm.TransactionServiceJotmImpl</type>
- <init-params>
- <value-param>
- <name>timeout</name>
- <value>5</value>
- </value-param>
- </init-params>
-</component>
- ]]></programlisting>
- </example>
-
- <para>
- For <value-param> the value specification is in the form of <value> element, which defines
- one <literal>String</literal> instance.
- </para>
-
- <example>
- <title>InitParams - values-param</title>
- <programlisting role="XML"><![CDATA[
-<component>
- <key>org.exoplatform.services.resources.ResourceBundleService</key>
- <type>org.exoplatform.services.resources.impl.SimpleResourceBundleService</type>
- <init-params>
- <values-param>
- <name>classpath.resources</name>
- <description>The resources that start with the following package name should be load from file system</description>
- <value>locale.portlet</value>
- </values-param>
-
- <values-param>
- <name>init.resources</name>
- <description>Store the following resources into the db for the first launch </description>
- <value>locale.test.resources.test</value>
- </values-param>
-
- <values-param>
- <name>portal.resource.names</name>
- <description>The properties files of the portal , those file will be merged
- into one ResourceBundle properties </description>
- <value>local.portal.portal</value>
- <value>local.portal.custom</value>
- </values-param>
- </init-params>
-</component>
- ]]></programlisting>
- </example>
-
- <para>
- For <values-param> the value specification is in the form of one or more <value> elements,
- each of which represents one <literal>String</literal> instance, where all the <literal>String</literal> values
- are then collected into a <literal>java.util.List</literal> instance.
- </para>
-
- <example>
- <title>InitParams - object-param</title>
- <programlisting role="XML"><![CDATA[
-<component>
- <key>org.exoplatform.services.cache.CacheService</key>
- <jmx-name>cache:type=CacheService</jmx-name>
- <type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
- <init-params>
- <object-param>
- <name>cache.config.default</name>
- <description>The default cache configuration</description>
- <object type="org.exoplatform.services.cache.ExoCacheConfig">
- <field name="name">
- <string>default</string>
- </field>
- <field name="maxSize">
- <int>300</int>
- </field>
- <field name="liveTime">
- <long>300</long>
- </field>
- <field name="distributed">
- <boolean>false</boolean>
- </field>
- <field name="implementation">
- <string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string>
- </field>
- </object>
- </object-param>
- </init-params>
-</component>
- ]]></programlisting>
- </example>
-
- <para>
- For <object-param> in our case, the value specification comes in a form of <object> element, which is
- used for POJO style object specification (you specify an implementation class - <type>, and property values - <field>).
- </para>
-
- <para>
- Also see <xref linkend="sect-Reference_Guide-Foundations-Configuring_portal_Container_declaration_example" />
- for an example of specifying a field of <literal>Collection</literal> type.
- </para>
-
- <para>
- The <literal>InitParams</literal> structure - the names and types of entries is specific for each service,
- as it is the code inside service components's class that decides what entry names to look up and what types
- it expects to find.
- </para>
- </section>
-
-
- <section id="sect-Reference_Guide-Foundations-Configuring_portal">
- <title>Configuring a portal container</title>
-
- <para>
- A <emphasis role="bold">portal container</emphasis> is defined by several attributes.
- </para>
-
- <para>
- First, there is a <emphasis role="bold">portal container name</emphasis>, which is always equal to URL context to which the current portal is bound.
- </para>
-
- <para>
- Second, there is a <emphasis role="bold">REST context name</emphasis>, which is used for REST access to portal application - every portal has
- exactly one (unique) REST context name.
- </para>
-
- <para>
- Then, there is a <emphasis role="bold">realm name</emphasis> which is the name of security realm used for authentication when users log into the
- portal.
- </para>
-
- <para>
- Finally, there is a list of <emphasis role="bold">Dependencies</emphasis> - other web applications, whose resources are visible to current
- portal (via extension mechanism described later), and are searched in the specified order.
- </para>
-
- <example id="sect-Reference_Guide-Foundations-Configuring_portal_Container_declaration_example">
- <title>Portal container declaration example</title>
- <programlisting role="XML"><![CDATA[
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
- http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.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 -->
- <value>
- <string>sample-ext</string>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-</configuration>
- ]]>
-</programlisting>
- </example>
-
-
- <note>
- <para>Dependencies are part of the extension mechanism.</para>
- </note>
-
- <para>
- Every <emphasis role="bold">portal container</emphasis> is represented by a <emphasis role="bold">PortalContainer instance</emphasis>, which contains:
- <itemizedlist>
- <listitem>
- <para>associated <emphasis role="bold">ExoContainerContext</emphasis>, which contains information about the portal</para>
- </listitem>
- <listitem>
- <para><emphasis role="bold">unified servlet context</emphasis>, for web-archive-relative resource loading</para>
- </listitem>
- <listitem>
- <para><emphasis role="bold">unified classloader</emphasis>, for classpath based resource loading</para>
- </listitem>
- <listitem>
- <para>methods for retrieving services</para>
- </listitem>
- </itemizedlist>
- </para>
-
- <para>
- <emphasis role="bold">Unified servlet context</emphasis>, and <emphasis role="bold">unified classloader</emphasis> are part of the <emphasis role="bold">extension mechanism</emphasis> (explained in next section),
- and provide standard API (ServletContext, ClassLoader) with specific resource loading behavior - visibility into associated web application archives,
- configured with Dependencies property of PortalContainerDefinition. Resources from other web applications are queried in the order specified by Dependencies.
- The later entries in the list override the previous ones.
- </para>
- </section>
-
- <section id="sect-Reference_Guide-Foundations-Extension_mechanism">
- <title>GateIn Extension Mechanism, and Portal Extensions</title>
-
- <para>
- <emphasis role="bold">Extension mechanism</emphasis> is a functionality that makes it possible to override portal resources in an almost
- plug-and-play fashion - just drop in a .war archive with the resources, and configure its position on the portal's
- classpath.
- This way any customizations of the portal don't have to involve unpacking and repacking the original portal
- .war archives. Instead, you create your own .war archive with changed resources, that override the resources in
- the original archive.
- </para>
-
- <para>
- A web archive packaged in a way to be used through extension mechanism is called <emphasis role="bold">portal extension</emphasis>.
- </para>
- <para>
- There are two steps necessary to create a portal extension.
- </para>
- <para>
- First, declare <emphasis role="bold">PortalConfigOwner</emphasis> servlet context listener in web.xml of your web application.
- </para>
- <example><title>Example of a portal extension called sample-ext:</title>
-
- <programlisting role="XML"><![CDATA[
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
- http://java.sun.com/dtd/web-app_2_3.dtd>
-<web-app>
-
- <display-name>sample-ext</display-name>
-
- <listener>
- <listener-class>org.exoplatform.container.web.PortalContainerConfigOwner</listener-class>
- </listener>
-
- ...
-
-</web-app>
- ]]></programlisting>
- </example>
- <para>
- Then, add the servlet context name of this web application in proper place in the list of Dependencies of the PortalContainerDefinition
- of all the portal containers that you want to have access to its resources.
- </para>
- <para>
- After this step your web archive will be on portal's unified classpath, and unified servlet context resource path.
- The later in the Dependencies list your application is, the higher priority it has when resources are loaded by portal.
- </para>
-
- <note>
- <para>See 'Configuring a portal' section for example of PortalContainerDefinition, that has sample-ext at the end of its list of Dependencies.</para>
- </note>
-
- </section>
-
-
- <section id="sect-Reference_Guide-Foundations-Multiple_portals">
- <title>Running Multiple Portals</title>
-
- <para>
- It is possible to run several independent portal containers - each bound to a different URL context - within
- the same JVM instance. This kind of setup is very efficient from administration and resource consumption
- aspect. The most elegant way to <emphasis role="bold">reuse</emphasis> configuration for different coexisting portals is by way of extension
- mechanism - by <emphasis role="bold">inheriting</emphasis> resources and configuration from existing web archives, and just <emphasis role="bold">adding</emphasis> extra resources to it,
- and <emphasis role="bold">overriding</emphasis> those that need to be changed by including modified copies.
- </para>
-
- <para>
- In order for a portal application to correctly function when deployed in multiple portals, the application may
- have to dynamically query the information about the current portal container. The application should not make
- any assumptions about the name, and other information of the current portal, as there are now multiple different portals in play.
- </para>
-
- <para>
- At any point during request processing, or lifecycle event processing, your application can retrieve this
- information through <emphasis role="bold">org.exoplatform.container. ExoContainerContext</emphasis>.
- Sometimes your application needs to make sure that the proper <emphasis role="bold">PortalContainer</emphasis>
- - the source of <emphasis role="bold">ExoContainerContext</emphasis> - is associated with the current call.
- </para>
-
- <para>
- If you ship servlets or servlet filters as part of your portal application, and if you need to access portal
- specific resources at any time during the processing of the servlet or filter request, then you need to make
- sure the servlet/filter is associated with the current container.
- </para>
- <para>
- The proper way to do that is to make your servlet extend <emphasis role="bold">org.exoplatform.container.web. AbstractHttpServlet</emphasis>
- class.
- This will not only properly initialize current <emphasis role="bold">PortalContainer</emphasis> for you, but will also set the current thread's
- context classloader to one that looks for resources in associated web applications in the order specified by
- <emphasis role="bold">Dependencies</emphasis> configuration (as explained in Extension mechanism section).
- </para>
- <para>
- Similarly for filters, make sure your filter class extends <emphasis role="bold">org.exoplatform.container.web. AbstractFilter</emphasis>.
- Both <emphasis role="bold">AbstractHttpServlet</emphasis>, and <emphasis role="bold">AbstractFilter</emphasis> have a method <emphasis role="bold">getContainer()</emphasis>,
- which returns the current <emphasis role="bold">PortalContainer</emphasis>.
-
- If your servlet handles the requests by implementing a <emphasis role="bold">service()</emphasis> method, you need to rename that method to match
- the following signature:</para>
- <programlisting role="JAVA"><![CDATA[
-/**
- * Use this method instead of Servlet.service()
- */
-protected void onService(ExoContainer container, HttpServletRequest req,
- HttpServletResponse res) throws ServletException, IOException;
- ]]></programlisting>
- <note>
- <para>
- The reason is that AbstractHttpServlet implements service() to perform its interception, and you don't want to
- overwrite (by overriding) this functionality.
- </para>
- </note>
- <para>
- You may also need to access portal information within your <emphasis role="bold">HttpSessionListener</emphasis>. Again, make sure to extend the
- provided abstract class - <emphasis role="bold">org.exoplatform.container.web. AbstractHttpSessionListener</emphasis>.
- Also, modify your method signatures as follows:</para>
- <programlisting role="JAVA"><![CDATA[
-/**
- * Use this method instead of HttpSessionListener.sessionCreated()
- */
-protected void onSessionCreated(ExoContainer container, HttpSessionEvent event);
-
-/**
- * Use this method instead of HttpSessionListener.sessionDestroyed()
- */
-protected void onSessionDestroyed(ExoContainer container, HttpSessionEvent event);
- ]]></programlisting>
- <para>
- There is another method you have to implement in this case:</para>
- <programlisting role="JAVA"><![CDATA[
-/**
- * Method should return true if unified servlet context,
- * and unified classloader should be made available
- */
-protected boolean requirePortalEnvironment();
- ]]></programlisting>
- <para>
- If this method returns true, current thread's context classloader is set up according to <emphasis role="bold">Dependencies</emphasis>
- configuration, and availability of the associated web applications. If it returns false, the standard
- application separation rules are used for resource loading (effectively turning off the
- extension mechanism). This method exists on <emphasis role="bold">AbstractHttpServlet</emphasis> and <emphasis role="bold">AbstractFilter</emphasis> as well, where there is a
- default implementation that automatically returns true, when it detects there is a current PortalContainer
- present, otherwise it returns false.
-
- </para>
-
- <para>
- We still have to explain how to properly perform <emphasis role="bold">ServletContextListener</emphasis> based initialization, when you need
- access to current PortalContainer.
- </para>
-
- <para>
- GateIn has no direct control over the deployment of application archives (.war, .ear files) - it is the
- application server that performs the deployment. For <emphasis role="bold">extension mechanism</emphasis> to work properly, the applications,
- associated with the portal via <emphasis role="bold">Dependencies</emphasis> configuration, have to be deployed before the portal, that depends
- on them, is initialized. On the other hand, these applications may require an already initialized PortalContainer
- to properly initialize themselves - we have a recursive dependency problem. To resolve this problem, a
- mechanism of <emphasis role="bold">initialization tasks</emphasis>, and <emphasis role="bold">task queues</emphasis>, was put in place. Web applications that depend on current
- PortalContainer for their initialization have to avoid performing their initialization directly in some
- ServletContextListener executed during their deployment (before any PortalContainer was initialized). Instead,
- a web application should package its initialization logic into an init task of appropriate type, and only use
- ServletContextListener to insert the init task instance into the proper init tasks queue.
- </para>
-
- <para>An example of this is Gadgets application which registers Google gadgets with the current PortalContainer:
- </para>
-
- <programlisting role="JAVA"><![CDATA[
-public class GadgetRegister implements ServletContextListener
-{
- public void contextInitialized(ServletContextEvent event)
- {
- // Create a new post-init task
- final PortalContainerPostInitTask task = new PortalContainerPostInitTask() {
-
- public void execute(ServletContext context, PortalContainer portalContainer)
- {
- try
- {
- SourceStorage sourceStorage =
- (SourceStorage) portalContainer.getComponentInstanceOfType(SourceStorage.class);
- ...
- }
- catch (RuntimeException e)
- {
- throw e;
- }
- catch (Exception e)
- {
- throw new RuntimeException("Initialization failed: ", e);
- }
- }
- };
-
- // Add post-init task for execution on all the portal containers
- // that depend on the given ServletContext according to
- // PortalContainerDefinitions (via Dependencies configuration)
- PortalContainer.addInitTask(event.getServletContext(), task);
- }
-}
- ]]></programlisting>
-
- <para>
- The above example uses <emphasis role="bold">PortalContainerPostInitTask</emphasis>, which gets executed after the portal container has been
- initialized. In some situations you may want to execute initialization after portal container was instantiated,
- but before it was initialized - use <emphasis role="bold">PortalContainerPreInitTask</emphasis> in that case. Or, you may want to execute
- initialization after all the post-init tasks have been executed - use <emphasis role="bold">PortalContainerPostCreateTask</emphasis> in that case.
- </para>
-
- <para>
- One more area that may need your attention are <emphasis role="bold">LoginModules</emphasis>. If you use custom LoginModules, that require
- current ExoContainer, make sure they extend <emphasis role="bold">org.exoplatform.services.security.jaas.AbstractLoginModule</emphasis> for
- proper initialization. AbstractLoginModule also takes care of the basic configuration - it recognizes two
- initialization options - <emphasis role="bold">portalContainerName</emphasis>, and <emphasis role="bold">realmName</emphasis> whose values you can access via protected fields of
- the same name.
- </para>
-
- </section>
-
-</section>
Modified: portal/trunk/docs/reference-guide/en/modules/PortalDevelopment.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/PortalDevelopment.xml 2010-04-15 10:32:55 UTC (rev 2651)
+++ portal/trunk/docs/reference-guide/en/modules/PortalDevelopment.xml 2010-04-15 10:43:53 UTC (rev 2652)
@@ -5,7 +5,6 @@
]>
<chapter id="chap-Reference_Guide-Development">
<title>Portal Development</title>
- <xi:include href="PortalDevelopment/Foundations.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="PortalDevelopment/Skinning.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="PortalDevelopment/PortalLifecycle.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="PortalDevelopment/DefaultPortalConfiguration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
16 years
gatein SVN: r2651 - in portal/trunk: web/portal/src/main/webapp/WEB-INF/classes/locale/portal and 1 other directory.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-04-15 06:32:55 -0400 (Thu, 15 Apr 2010)
New Revision: 2651
Modified:
portal/trunk/portlet/web/src/main/webapp/WEB-INF/classes/locale/portlet/web/GroovyPortlet_vi.properties
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
Log:
GTNPORTAL-1070 Translate GateIn in VNeses
Modified: portal/trunk/portlet/web/src/main/webapp/WEB-INF/classes/locale/portlet/web/GroovyPortlet_vi.properties
===================================================================
--- portal/trunk/portlet/web/src/main/webapp/WEB-INF/classes/locale/portlet/web/GroovyPortlet_vi.properties 2010-04-15 10:26:29 UTC (rev 2650)
+++ portal/trunk/portlet/web/src/main/webapp/WEB-INF/classes/locale/portlet/web/GroovyPortlet_vi.properties 2010-04-15 10:32:55 UTC (rev 2651)
@@ -20,11 +20,11 @@
#####################################################################################
# EXCEPTION MAPPINGS #
#####################################################################################
-UIGroovyPortlet.note.Text=This is Groovy Portlet (Sample Portlet) it can be developed as a web application in the future.
-UIIFrameEditMode.title=Change URL
+UIGroovyPortlet.note.Text=Đây là Groovy Portlet (Sample Portlet). Trong tương lai, nó có thể được xây dựng như một ứng dụng web hòan thiện.
+UIIFrameEditMode.title=Thay đổi URL
UIIFrameEditMode.label.iframeUrl=URL
-UIIFrameEditMode.label.editmode=Edit Mode
-UIIFrameEditMode.action.Save=Save
+UIIFrameEditMode.label.editmode=Mode chỉnh sửa
+UIIFrameEditMode.action.Save=Lưu
UIBannerPortlet.action.changeLanguage=Thay đổi ngôn ngữ
UIBannerPortlet.action.register=Đăng ký
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2010-04-15 10:26:29 UTC (rev 2650)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2010-04-15 10:32:55 UTC (rev 2651)
@@ -233,7 +233,7 @@
UILoginForm.label.Signup=Đăng nhập
UILoginForm.label.Signin=Đăng nhập
UILoginForm.label.ForAccount=Đăng kí tài khoản
-UILoginForm.label.SigninFail=Sign in failed. Wrong username or password.
+UILoginForm.label.SigninFail=Đăng nhập không thành công. Bạn đã nhập sai tên tài khỏan hoặc mật khẩu
UILoginForm.label.Copyright=Copyright © 2010. All rights Reserved, eXo Platform SAS and Red Hat, Inc.
#############################################################################
@@ -280,7 +280,7 @@
UIPortletForm.label.description=Mô tả :
UIPortletForm.label.template=Portlet mẫu:
UIPortletForm.action.Close=Từ bỏ
-UIPortletForm.action.Save=Save And Close
+UIPortletForm.action.Save=Lưu và thoát
UIPortletForm.tab.label.PortletPref=Tùy chỉnh
UIPortletForm.tab.label.PortletSetting=Cấu hình Portlet
UIPortletForm.tab.label.Renderer=Biểu hiện
@@ -289,7 +289,7 @@
UIPortletForm.tab.label.Icon=Chọn biểu tượng
UIPortletForm.tab.label.Theme=Kiểu trang trí
UIPortletForm.tab.label.EditMode=Chế độ chỉnh sửa
-UIPortletForm.tab.label.PortletPermission=Access Permission
+UIPortletForm.tab.label.PortletPermission=Phân quyền truy cập
UIPortletForm.Theme.title.Preview=Xem trước kiểu
UIPortletForm.Theme.title.SetDefault=Lấy mặc định
UIPortletForm.Icon.title.SetDefault=Lấy mặc định
@@ -321,6 +321,7 @@
UIPortalForm.action.Save=#{word.save}
UIPortalForm.action.Close=Loại bỏ
UIPortalForm.msg.sameName=Tên của portal này đang tồn tại trong hệ thống!
+UIPortalForm.msg.notExistAnymore=Portal không tồn tại hoặc có thể đã bị xóa.
UIPortalForm.label.name=Tên Portal:
UIPortalForm.label.locale=#{word.locale} :
UIPortalForm.label.date=#{word.date} :
@@ -860,7 +861,7 @@
PopupPageSelector.title.UIPageBrowser=Tìm và chọn trang
PopupPageSelector.title.SelectPage=Chọn trang
UIControWSPopupWindow.title.UIApplicationTree=Cây Ứng dụng
-EditGroup.title.UIPageNavigationForm=Add Navigation
+EditGroup.title.UIPageNavigationForm=Tạo Navigation
############################################################################
# org.exoplatform.portal.component.widget.UILogged #
@@ -909,6 +910,7 @@
UIForgetPassword.msg.user-not-exist=Tên người dùng không tồn tại.
UIForgetPassword.msg.email-not-exist=Địa chỉ thư của bạn không tồn tại trong Exo
UIForgetPassword.msg.send-mail-success=Xin vui lòng kiểm tra hòm thư của bạn!
+UIForgetPassword.msg.send-mail-fail=Không thể gửi mail của bạn
UIForgetPassword.msg.expration=Email của bạn đã hết hạn, bạn phải đưa ra một email khác còn hoạt động.
UIForgetPassword.mail.header=Cảm ơn bạn đã liên lạc với nhóm hỗ trợ Portal của eXo. Bạn đã gửi đi một yêu cầu về tên và mật khẩu người dùng của bạn.
UIForgetPassword.mail.footer=Cảm ơn, Nhóm hỗ trợ portal của eXo.
@@ -1045,9 +1047,15 @@
NavigationNodePopupMenu.event.DeleteNode=Xóa node
UIGroupManagement.msg.Edit=Bạn phải chọn một nhóm trước!
UIGroupManagement.msg.Delete=Bạn không thể xóa nhóm này vì nó đang được dùng bởi chương trình khác!
-UIGroupManagement.msg.DeleteMandatory=You can't delete this group because it (or its child) is mandatory!
+UIGroupManagement.msg.DeleteMandatory=Bạn không thể xóa nhóm này bởi vì nó (hoặc con của nó) là những thành phần không thể thiếu của hệ thống
###############################################################################
+ # org.exoplatform.portal.webui.navigation.UINavigationNodeSelector #
+ ###############################################################################
+UINavigationNodeSelector.msg.systemnode-delete=Không thể xóa một node hệ thống
+UINavigationNodeSelector.msg.systemnode-move=Không thể di chuyển một node hệ thống
+
+ ###############################################################################
# org.exoplatform.portal.webui.component.customization.UIEditCurentPage #
###############################################################################
16 years
gatein SVN: r2650 - in portal/trunk/docs/reference-guide/en/modules: AuthenticationAndIdentity and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-04-15 06:26:29 -0400 (Thu, 15 Apr 2010)
New Revision: 2650
Modified:
portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity.xml
portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity/SSO.xml
Log:
Added SPNEGO section
Modified: portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity/SSO.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity/SSO.xml 2010-04-15 10:02:11 UTC (rev 2649)
+++ portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity/SSO.xml 2010-04-15 10:26:29 UTC (rev 2650)
@@ -3,7 +3,7 @@
<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
%BOOK_ENTITIES;
]>
-<chapter id="chap-Reference_Guide-SSO_Single_Sign_On">
+<section id="chap-Reference_Guide-SSO_Single_Sign_On">
<title>SSO - Single Sign On</title>
<section id="sect-Reference_Guide-Single_Sign_On-Overview">
<title>Overview</title>
@@ -794,5 +794,233 @@
</section>
-</chapter>
+ <section id="sect-Reference_Guide-Single_Sign_On-SPNEGO">
+ <title>SPNEGO</title>
+ <para>SPNEGO (Simple and Protected GSSAPI Negotiation Mechanism) is
+ used to authenticate transparently through the web browser after the
+ user has been authenticated when logging-in his session.</para>
+ <para>A typical use case is the following:</para>
+ <procedure>
+ <step>
+ <para>Users logs into his desktop (Such as a Windows machine).</para>
+ </step>
+ <step>
+ <para>The desktop login is governed by Active Directory domain.</para>
+ </step>
+ <step>
+ <para>User then uses his browser (IE/Firefox) to access a web
+ application (that uses JBoss Negotiation) hosted on JBoss EPP.</para>
+ </step>
+ <step>
+ <para>The Browser transfers the desktop sign on information to the
+ web application.</para>
+ </step>
+ <step>
+ <para>JBoss EAP/AS uses background GSS messages with the Active
+ Directory (or any Kerberos Server) to validate the user.</para>
+ </step>
+ <step>
+ <para>The User has seamless SSO into the web application.</para>
+ </step>
+ </procedure>
+ <section>
+ <title>Configuration</title>
+ <para>GateIn uses JBoss Negotiation to enable SPNEGO based desktop
+ SSO for the Portal. Here are the steps to integrate SPNEGO with
+ GateIn.</para>
+ <procedure>
+ <step>
+ <para>
+ Activate the Host authentication
+
+ Under conf/login-config.xml, add the following host login module:
+ <programlisting><![CDATA[<!-- SPNEGO domain -->
+ <application-policy name="host">
+ <authentication>
+ <login-module code="com.sun.security.auth.module.Krb5LoginModule"
+ flag="required">
+ <module-option name="storeKey">true</module-option>
+ <module-option name="useKeyTab">true</module-option>
+ <module-option name="principal">HTTP/server.local.network(a)LOCAL.NETWORK</module-option>
+ <module-option name="keyTab">/home/user/krb5keytabs/jboss.keytab</module-option>
+ <module-option name="doNotPrompt">true</module-option>
+ <module-option name="debug">true</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+]]></programlisting>
+ the 'keyTab' value should point to the keytab file that was
+ generated by the kadmin kerberos tool. See the Setting up your
+ Kerberos Development Environment guide for more details.
+ </para>
+ </step>
+ <step>
+ <para>
+ Extend the core authentication mechanisms to support
+ SPNEGO
+
+ Under
+ deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml,
+ add 'SPNEGO' authenticators property
+
+ <programlisting><![CDATA[<property name="authenticators">
+ <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry>
+ <key>BASIC</key>
+ <value>org.apache.catalina.authenticator.BasicAuthenticator</value>
+ </entry>
+ <entry>
+ <key>CLIENT-CERT</key>
+ <value>org.apache.catalina.authenticator.SSLAuthenticator</value>
+ </entry>
+ <entry>
+ <key>DIGEST</key>
+ <value>org.apache.catalina.authenticator.DigestAuthenticator</value>
+ </entry>
+ <entry>
+ <key>FORM</key>
+ <value>org.apache.catalina.authenticator.FormAuthenticator</value>
+ </entry>
+ <entry>
+ <key>NONE</key>
+ <value>org.apache.catalina.authenticator.NonLoginAuthenticator</value>
+ </entry>
+
+ <!-- Add this entry -->
+ <entry>
+ <key>SPNEGO</key>
+ <value>org.jboss.security.negotiation.NegotiationAuthenticator</value>
+ </entry>
+ </map>
+ </property>]]></programlisting>
+
+ </para>
+ </step>
+ <step>
+ <para>Add the JBoss Negotiation binary
+
+ copy $GATEIN_SSO_HOME/spnego/jboss-negotiation-2.0.3.GA.jar to lib
+</para>
+ </step>
+ <step>
+ <para>Add the Gatein SSO module binaries
+
+ Add $GATEIN_SSO_HOME/spnego/gatein.ear/lib/sso-agent.jar, and $GATEIN_SSO_HOME/spnego/gatein.ear/lib/sso-spnego.jar to deploy/gatein.ear/lib
+</para>
+ </step>
+ <step>
+ <para>
+ Activate SPNEGO LoginModule for GateIn
+
+ Modify deploy/gatein.ear/META-INF/gatein-jboss-beans.xml, so that it
+ looks like this:
+
+ <programlisting><![CDATA[<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <application-policy xmlns="urn:jboss:security-beans:1.0" name="gatein-domain">
+ <!-- Uncomment this for Kerberos based SSO integration -->
+ <authentication>
+ <login-module
+ code="org.gatein.sso.spnego.SPNEGOLoginModule"
+ flag="requisite">
+ <module-option name="password-stacking">useFirstPass</module-option>
+ <module-option name="serverSecurityDomain">host</module-option>
+ </login-module>
+ <login-module
+ code="org.gatein.sso.agent.login.SPNEGORolesModule"
+ flag="required">
+ <module-option name="password-stacking">useFirstPass</module-option>
+ <module-option name="portalContainerName">portal</module-option>
+ <module-option name="realmName">gatein-domain</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+</deployment>]]></programlisting>
+ </para>
+ </step>
+ <step>
+ <para>
+ Integrate SPNEGO support into the Portal web archive
+
+ Switch GateIn authentication mechanism from the default "FORM"
+ based to "SPNEGO" based authentication as follows:
+
+ Modify gatein.ear/02portal.war/WEB-INF/web.xml
+
+ <programlisting><![CDATA[ <!--
+ <login-config>
+ <auth-method>FORM</auth-method>
+ <realm-name>gatein-domain</realm-name>
+ <form-login-config>
+ <form-login-page>/initiatelogin</form-login-page>
+ <form-error-page>/errorlogin</form-error-page>
+ </form-login-config>
+ </login-config>
+ -->
+ <login-config>
+ <auth-method>SPNEGO</auth-method>
+ <realm-name>SPNEGO</realm-name>
+ </login-config>]]></programlisting>
+
+
+ Integrate request pre-processing needed for SPNEGO via filters.
+ Add the following filters to the web.xml at the top of the Filter
+ chain:
+
+ <programlisting><![CDATA[ <filter>
+ <filter-name>LoginRedirectFilter</filter-name>
+ <filter-class>org.gatein.sso.agent.filter.LoginRedirectFilter</filter-class>
+ <init-param>
+ <!-- This should point to your SSO authentication server -->
+ <param-name>LOGIN_URL</param-name>
+ <param-value>/portal/private/classic</param-value>
+ </init-param>
+ </filter>
+ <filter>
+ <filter-name>SPNEGOFilter</filter-name>
+ <filter-class>org.gatein.sso.agent.filter.SPNEGOFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>LoginRedirectFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>SPNEGOFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>]]></programlisting>
+ </para>
+ </step>
+ <step>
+ <para>
+ Modify the Portal's 'Sign In' link to perform SPNEGO
+ authentication
+
+ Modify the 'Sign In' link on
+ gatein.war/web.war/groovy/groovy/webui/component/UIBannerPortlet.gtmpl
+ as follows:
+
+ <programlisting><![CDATA[<!--
+<a onclick="$signInAction"><%=_ctx.appRes("UILoginForm.label.Signin")%></a>
+-->
+<a href="/portal/sso"><%=_ctx.appRes("UILoginForm.label.Signin")%></a>]]></programlisting>
+ </para>
+ </step>
+ <step>
+ <para>
+ Start the GateIn Portal
+ <programlisting>sudo ./run.sh -Djava.security.krb5.realm=LOCAL.NETWORK -Djava.security.krb5.kdc=server.local.network -c spnego -b server.local.network</programlisting>
+ </para>
+ </step>
+ <step>
+ <para>Login to Kerberos
+ <programlisting>kinit -A demo</programlisting>
+ You should be able to click the 'Sign In' link on the GateIn Portal
+ and the 'demo' user from the GateIn portal should be automatically
+ logged in</para>
+ </step>
+ </procedure>
+ </section>
+ </section>
+</section>
+
Modified: portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity.xml 2010-04-15 10:02:11 UTC (rev 2649)
+++ portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity.xml 2010-04-15 10:26:29 UTC (rev 2650)
@@ -8,11 +8,9 @@
<xi:include href="AuthenticationAndIdentity/PredefinedUserConfiguration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="AuthenticationAndIdentity/AuthenticationTokenConfiguration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="AuthenticationAndIdentity/BackendConfiguration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <!--
- <xi:include href="AuthenticationAndIdentity/SSO.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- -->
<xi:include href="AuthenticationAndIdentity/DataInjectorConfiguration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="AuthenticationAndIdentity/OrganizationAPI.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="AuthenticationAndIdentity/AccessingUserProfile.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="AuthenticationAndIdentity/SSO.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</chapter>
16 years
gatein SVN: r2649 - in components/wsrp/trunk/producer/src: test/java/org/gatein/wsrp/producer/config and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-04-15 06:02:11 -0400 (Thu, 15 Apr 2010)
New Revision: 2649
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/policies/RegistrationPolicyWrapper.java
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerConfigurationTestCase.java
Log:
- GTNWSRP-26: Updated test case.
- Added getDelegate method on RegistrationPolicyWrapper for access to the wrapped policy if needed.
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/registration/policies/RegistrationPolicyWrapper.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/registration/policies/RegistrationPolicyWrapper.java 2010-04-15 08:11:28 UTC (rev 2648)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/registration/policies/RegistrationPolicyWrapper.java 2010-04-15 10:02:11 UTC (rev 2649)
@@ -47,6 +47,11 @@
this.delegate = delegate;
}
+ public RegistrationPolicy getDelegate()
+ {
+ return delegate;
+ }
+
public void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity)
throws IllegalArgumentException, RegistrationException
{
Modified: components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerConfigurationTestCase.java
===================================================================
--- components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerConfigurationTestCase.java 2010-04-15 08:11:28 UTC (rev 2648)
+++ components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerConfigurationTestCase.java 2010-04-15 10:02:11 UTC (rev 2649)
@@ -1,25 +1,25 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * 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. *
- ******************************************************************************/
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * 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.
+ */
package org.gatein.wsrp.producer.config;
@@ -27,6 +27,7 @@
import org.gatein.registration.RegistrationPolicy;
import org.gatein.registration.policies.DefaultRegistrationPolicy;
import org.gatein.registration.policies.DefaultRegistrationPropertyValidator;
+import org.gatein.registration.policies.RegistrationPolicyWrapper;
import org.gatein.registration.policies.RegistrationPropertyValidator;
import org.gatein.wsrp.WSRPConstants;
import org.gatein.wsrp.producer.config.impl.ProducerConfigurationImpl;
@@ -93,7 +94,13 @@
ProducerRegistrationRequirements requirements = producerConfiguration.getRegistrationRequirements();
assertNotNull(requirements);
RegistrationPolicy policy = requirements.getPolicy();
- assertTrue(policy instanceof TestRegistrationPolicy);
+
+ // check that the policy is properly wrapped
+ assertTrue(policy instanceof RegistrationPolicyWrapper);
+
+ // and that the delegate is indeed the expected policy
+ RegistrationPolicyWrapper wrapper = (RegistrationPolicyWrapper)policy;
+ assertTrue(wrapper.getDelegate() instanceof TestRegistrationPolicy);
}
public void testExtendedUnmarshalling() throws Exception
16 years
gatein SVN: r2648 - in portal/trunk: web/portal/src/main/webapp/WEB-INF and 4 other directories.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-04-15 04:11:28 -0400 (Thu, 15 Apr 2010)
New Revision: 2648
Added:
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/RequestFailure.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/concurrent/
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/concurrent/PortalConcurrencyMonitorLifecycle.java
Modified:
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/ApplicationLifecycle.java
portal/trunk/web/portal/src/main/webapp/WEB-INF/webui-configuration.xml
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/MonitorApplicationLifecycle.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/portlet/PortletApplicationLifecycle.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalApplicationLifecycle.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStatisticLifecycle.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortletStatisticLifecycle.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/UserProfileLifecycle.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/UserSiteLifeCycle.java
Log:
GTNPORTAL-558: Issue when editing resources concurrently
Modified: portal/trunk/component/web/src/main/java/org/exoplatform/web/application/ApplicationLifecycle.java
===================================================================
--- portal/trunk/component/web/src/main/java/org/exoplatform/web/application/ApplicationLifecycle.java 2010-04-15 06:28:24 UTC (rev 2647)
+++ portal/trunk/component/web/src/main/java/org/exoplatform/web/application/ApplicationLifecycle.java 2010-04-15 08:11:28 UTC (rev 2648)
@@ -32,8 +32,10 @@
public void onStartRequest(Application app, E context) throws Exception;
+ public void onFailRequest(Application app, E context, RequestFailure failureType) throws Exception;
+
public void onEndRequest(Application app, E context) throws Exception;
-
+
public void onDestroy(Application app) throws Exception;
}
Added: portal/trunk/component/web/src/main/java/org/exoplatform/web/application/RequestFailure.java
===================================================================
--- portal/trunk/component/web/src/main/java/org/exoplatform/web/application/RequestFailure.java (rev 0)
+++ portal/trunk/component/web/src/main/java/org/exoplatform/web/application/RequestFailure.java 2010-04-15 08:11:28 UTC (rev 2648)
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+package org.exoplatform.web.application;
+
+/**
+ * @author <a href="mailto:hoang281283@gmail.com">Minh Hoang TO</a>
+ * @version $Id$
+ *
+ */
+public enum RequestFailure {
+
+ IO_FAILURE, CONCURRENCY_FAILURE
+}
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/webui-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/webui-configuration.xml 2010-04-15 06:28:24 UTC (rev 2647)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/webui-configuration.xml 2010-04-15 08:11:28 UTC (rev 2648)
@@ -37,6 +37,7 @@
<listener>org.exoplatform.portal.application.PortalApplicationLifecycle</listener>
<listener>org.exoplatform.webui.application.MonitorApplicationLifecycle</listener>
<listener>org.exoplatform.portal.application.UserProfileLifecycle</listener>
+ <listener>org.exoplatform.portal.application.concurrent.PortalConcurrencyMonitorLifecycle</listener>
</application-lifecycle-listeners>
<events>
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/MonitorApplicationLifecycle.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/MonitorApplicationLifecycle.java 2010-04-15 06:28:24 UTC (rev 2647)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/MonitorApplicationLifecycle.java 2010-04-15 08:11:28 UTC (rev 2648)
@@ -21,6 +21,7 @@
import org.exoplatform.web.application.Application;
import org.exoplatform.web.application.ApplicationLifecycle;
+import org.exoplatform.web.application.RequestFailure;
import org.exoplatform.webui.event.MonitorEvent;
/**
@@ -58,6 +59,12 @@
event.setStartExecutionTime(System.currentTimeMillis());
rcontext.setAttribute(MonitorEvent.PORTAL_EXECUTION_LIFECYCLE_EVENT, event);
}
+
+ @SuppressWarnings("unchecked")
+ public void onFailRequest(Application app, WebuiRequestContext rcontext, RequestFailure failureType) throws Exception
+ {
+
+ }
@SuppressWarnings("unchecked")
public void onEndRequest(Application app, WebuiRequestContext rcontext) throws Exception
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/portlet/PortletApplicationLifecycle.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/portlet/PortletApplicationLifecycle.java 2010-04-15 06:28:24 UTC (rev 2647)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/portlet/PortletApplicationLifecycle.java 2010-04-15 08:11:28 UTC (rev 2648)
@@ -21,6 +21,7 @@
import org.exoplatform.web.application.Application;
import org.exoplatform.web.application.ApplicationLifecycle;
+import org.exoplatform.web.application.RequestFailure;
import org.exoplatform.webui.application.WebuiRequestContext;
public class PortletApplicationLifecycle implements ApplicationLifecycle<WebuiRequestContext>
@@ -39,6 +40,12 @@
}
@SuppressWarnings("unused")
+ public void onFailRequest(Application app, WebuiRequestContext rcontext, RequestFailure failureType) throws Exception
+ {
+
+ }
+
+ @SuppressWarnings("unused")
public void onEndRequest(Application app, WebuiRequestContext context) throws Exception
{
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalApplicationLifecycle.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalApplicationLifecycle.java 2010-04-15 06:28:24 UTC (rev 2647)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalApplicationLifecycle.java 2010-04-15 08:11:28 UTC (rev 2648)
@@ -25,6 +25,7 @@
import org.exoplatform.container.SessionManagerContainer;
import org.exoplatform.web.application.Application;
import org.exoplatform.web.application.ApplicationLifecycle;
+import org.exoplatform.web.application.RequestFailure;
import org.exoplatform.webui.application.WebuiRequestContext;
public class PortalApplicationLifecycle implements ApplicationLifecycle<WebuiRequestContext>
@@ -42,6 +43,12 @@
SessionContainer.setInstance(((SessionManagerContainer)pcontainer).getSessionManager().getSessionContainer(
rcontext.getSessionId()));
}
+
+ @SuppressWarnings("unused")
+ public void onFailRequest(Application app, WebuiRequestContext rontext, RequestFailure failureType) throws Exception
+ {
+
+ }
@SuppressWarnings("unused")
public void onEndRequest(Application app, WebuiRequestContext rcontext) throws Exception
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java 2010-04-15 06:28:24 UTC (rev 2647)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java 2010-04-15 08:11:28 UTC (rev 2648)
@@ -20,11 +20,13 @@
package org.exoplatform.portal.application;
import org.exoplatform.commons.utils.Safe;
+import org.exoplatform.portal.config.StaleModelException;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.exoplatform.web.WebAppController;
import org.exoplatform.web.WebRequestHandler;
import org.exoplatform.web.application.ApplicationLifecycle;
+import org.exoplatform.web.application.RequestFailure;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.core.UIApplication;
@@ -114,10 +116,20 @@
// Store ui root
app.getStateManager().storeUIRootComponent(context);
}
- catch (Exception ex)
+ catch (StaleModelException staleModelEx)
{
- log.error("Error while handling request", ex);
+ // Minh Hoang TO:
+ //At the moment, this catch block is never reached, as the StaleModelException is intercepted temporarily
+ //in UI-related code
+ for(ApplicationLifecycle lifecycle : lifecycles)
+ {
+ lifecycle.onFailRequest(app, context, RequestFailure.CONCURRENCY_FAILURE);
+ }
}
+ catch (Exception NonStaleModelEx)
+ {
+ log.error("Error while handling request", NonStaleModelEx);
+ }
finally
{
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStatisticLifecycle.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStatisticLifecycle.java 2010-04-15 06:28:24 UTC (rev 2647)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStatisticLifecycle.java 2010-04-15 08:11:28 UTC (rev 2648)
@@ -22,6 +22,7 @@
import org.exoplatform.container.PortalContainer;
import org.exoplatform.web.application.Application;
import org.exoplatform.web.application.ApplicationLifecycle;
+import org.exoplatform.web.application.RequestFailure;
import org.exoplatform.webui.application.WebuiRequestContext;
public class PortalStatisticLifecycle implements ApplicationLifecycle<WebuiRequestContext>
@@ -41,6 +42,12 @@
}
@SuppressWarnings("unused")
+ public void onFailRequest(Application app, WebuiRequestContext rcontext, RequestFailure failureType) throws Exception
+ {
+
+ }
+
+ @SuppressWarnings("unused")
public void onEndRequest(Application app, WebuiRequestContext rcontext) throws Exception
{
PortalStatisticService service =
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortletStatisticLifecycle.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortletStatisticLifecycle.java 2010-04-15 06:28:24 UTC (rev 2647)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortletStatisticLifecycle.java 2010-04-15 08:11:28 UTC (rev 2648)
@@ -21,6 +21,7 @@
import org.exoplatform.web.application.Application;
import org.exoplatform.web.application.ApplicationLifecycle;
+import org.exoplatform.web.application.RequestFailure;
import org.exoplatform.webui.application.WebuiRequestContext;
public class PortletStatisticLifecycle implements ApplicationLifecycle<WebuiRequestContext>
@@ -41,6 +42,12 @@
}
@SuppressWarnings("unused")
+ public void onFailRequest(Application app, WebuiRequestContext context, RequestFailure failureType) throws Exception
+ {
+
+ }
+
+ @SuppressWarnings("unused")
public void onEndRequest(Application app, WebuiRequestContext context) throws Exception
{
ApplicationStatisticService service =
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/UserProfileLifecycle.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/UserProfileLifecycle.java 2010-04-15 06:28:24 UTC (rev 2647)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/UserProfileLifecycle.java 2010-04-15 08:11:28 UTC (rev 2648)
@@ -24,6 +24,7 @@
import org.exoplatform.services.organization.UserProfile;
import org.exoplatform.web.application.Application;
import org.exoplatform.web.application.ApplicationLifecycle;
+import org.exoplatform.web.application.RequestFailure;
import org.exoplatform.webui.application.WebuiRequestContext;
public class UserProfileLifecycle implements ApplicationLifecycle<WebuiRequestContext>
@@ -58,6 +59,12 @@
currentUserProfile.set(userProfile);
context.setAttribute(this.USER_PROFILE_ATTRIBUTE_NAME, userProfile);
}
+
+ @SuppressWarnings("unused")
+ public void onFailRequest(Application app, WebuiRequestContext context, RequestFailure failureType) throws Exception
+ {
+
+ }
@SuppressWarnings("unused")
public void onEndRequest(Application app, WebuiRequestContext context) throws Exception
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/UserSiteLifeCycle.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/UserSiteLifeCycle.java 2010-04-15 06:28:24 UTC (rev 2647)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/UserSiteLifeCycle.java 2010-04-15 08:11:28 UTC (rev 2648)
@@ -25,6 +25,7 @@
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.web.application.Application;
import org.exoplatform.web.application.ApplicationLifecycle;
+import org.exoplatform.web.application.RequestFailure;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
@@ -59,6 +60,10 @@
}
}
}
+
+ public void onFailRequest(Application app, PortalRequestContext context, RequestFailure failureType) throws Exception
+ {
+ }
public void onEndRequest(Application app, PortalRequestContext context) throws Exception
{
Added: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/concurrent/PortalConcurrencyMonitorLifecycle.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/concurrent/PortalConcurrencyMonitorLifecycle.java (rev 0)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/concurrent/PortalConcurrencyMonitorLifecycle.java 2010-04-15 08:11:28 UTC (rev 2648)
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+package org.exoplatform.portal.application.concurrent;
+
+import org.exoplatform.portal.application.PortalRequestContext;
+import org.exoplatform.portal.config.DataStorage;
+import org.exoplatform.portal.config.UserPortalConfig;
+import org.exoplatform.portal.config.model.PortalConfig;
+import org.exoplatform.portal.webui.page.UISiteBody;
+import org.exoplatform.portal.webui.portal.PageNodeEvent;
+import org.exoplatform.portal.webui.portal.UIPortal;
+import org.exoplatform.portal.webui.util.PortalDataMapper;
+import org.exoplatform.portal.webui.util.Util;
+import org.exoplatform.portal.webui.workspace.UIEditInlineWorkspace;
+import org.exoplatform.portal.webui.workspace.UIPortalApplication;
+import org.exoplatform.portal.webui.workspace.UIWorkingWorkspace;
+import org.exoplatform.web.application.Application;
+import org.exoplatform.web.application.ApplicationLifecycle;
+import org.exoplatform.web.application.JavascriptManager;
+import org.exoplatform.web.application.RequestFailure;
+import org.exoplatform.webui.event.Event;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+
+/**
+ * @author <a href="mailto:hoang281283@gmail.com">Minh Hoang TO</a>
+ * @version $Id$
+ *
+ */
+public class PortalConcurrencyMonitorLifecycle implements ApplicationLifecycle<PortalRequestContext>
+{
+
+ private final Logger log = LoggerFactory.getLogger(PortalConcurrencyMonitorLifecycle.class);
+
+ /**
+ * @see org.exoplatform.web.application.ApplicationLifecycle#onDestroy(org.exoplatform.web.application.Application)
+ */
+ public void onDestroy(Application app) throws Exception
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * @see org.exoplatform.web.application.ApplicationLifecycle#onEndRequest(org.exoplatform.web.application.Application, org.exoplatform.web.application.RequestContext)
+ */
+ public void onEndRequest(Application app, PortalRequestContext context) throws Exception
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * @see org.exoplatform.web.application.ApplicationLifecycle#onFailRequest(org.exoplatform.web.application.Application, org.exoplatform.web.application.RequestContext, org.exoplatform.web.application.RequestFailure)
+ */
+ public void onFailRequest(Application app, PortalRequestContext context, RequestFailure failureType) throws Exception
+ {
+ if(failureType == RequestFailure.CONCURRENCY_FAILURE)
+ {
+ //Concurrency-related handling should be put here in the future
+ log.error("Error in editing resources concurrently: " + context.getRequestURI().toString());
+ }
+ }
+
+ /**
+ * @see org.exoplatform.web.application.ApplicationLifecycle#onInit(org.exoplatform.web.application.Application)
+ */
+ public void onInit(Application app) throws Exception
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * @see org.exoplatform.web.application.ApplicationLifecycle#onStartRequest(org.exoplatform.web.application.Application, org.exoplatform.web.application.RequestContext)
+ */
+ public void onStartRequest(Application app, PortalRequestContext context) throws Exception
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+}
16 years
gatein SVN: r2647 - in portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US: modules and 3 other directories.
by do-not-reply@jboss.org
Author: smumford
Date: 2010-04-15 02:28:24 -0400 (Thu, 15 Apr 2010)
New Revision: 2647
Modified:
portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/images/SkinSet1.png
portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/Introduction.xml
portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/portal/Manage_Portals.xml
portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/portletsUser/Dashboard_Portlet.xml
portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/portletsUser/Interface_Portlets.xml
portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/terms/Navigation_concept.xml
portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/terms/Portlet_concept.xml
Log:
Minor changes from QE feedback
Modified: portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/images/SkinSet1.png
===================================================================
(Binary files differ)
Modified: portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/Introduction.xml
===================================================================
--- portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/Introduction.xml 2010-04-15 04:23:40 UTC (rev 2646)
+++ portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/Introduction.xml 2010-04-15 06:28:24 UTC (rev 2647)
@@ -6,7 +6,7 @@
<chapter id="chap-User_Guide-Introduction">
<title>Introduction</title>
<para>
- &PRODUCT; is the merge of two mature Java projects; JBoss Portal and eXo Portal. This new community project takes the best of both offerings and incorporates them into a single j2ee deployment archive. The aim is to provide an intuitive user-friendly portal and a framework to address the needs of today's Web 2.0 applications.
+ &PRODUCT; is the merge of two mature Java projects; JBoss Portal and eXo Portal. This new community project takes the best of both offerings and incorporates them into a single J2EE deployment archive. The aim is to provide an intuitive user-friendly portal and a framework to address the needs of today's Web 2.0 applications.
</para>
<mediaobject>
<imageobject role="html">
@@ -27,7 +27,7 @@
<term>Tecnical documentation</term>
<listitem>
<para>
- Other technical documentation, including a Reference Guide and component specific documents, can be found at <ulink type="http" url="www.redhat.com/docs">www.redhat.com/docs</ulink>
+ Other technical documentation, including an <emphasis role="bold">Installation Guide</emphasis>, a <emphasis role="bold">Reference Guide</emphasis> and component specific documentation, can be found at <ulink type="http" url="http://www.redhat.com/docs">www.redhat.com/docs</ulink>
</para>
</listitem>
</varlistentry>
Modified: portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/portal/Manage_Portals.xml
===================================================================
--- portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/portal/Manage_Portals.xml 2010-04-15 04:23:40 UTC (rev 2646)
+++ portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/portal/Manage_Portals.xml 2010-04-15 06:28:24 UTC (rev 2647)
@@ -120,7 +120,7 @@
<section id="sect-User_Guide-Manage_Portals-Edit_a_Portal">
<title>Edit a Portal</title>
<para>
- An administrator can chagne many aspects of a portal:
+ An administrator can change many aspects of a portal:
</para>
<para>
Click <emphasis role="bold">Site</emphasis> on the Toolbar. A list of active portals will appear:
Modified: portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/portletsUser/Dashboard_Portlet.xml
===================================================================
--- portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/portletsUser/Dashboard_Portlet.xml 2010-04-15 04:23:40 UTC (rev 2646)
+++ portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/portletsUser/Dashboard_Portlet.xml 2010-04-15 06:28:24 UTC (rev 2647)
@@ -61,6 +61,9 @@
<para>
The Dashboard Workspace lists all available gadgets. Four gadgets are provided by default with &PRODUCT;, however you can add many more.
</para>
+ <para>
+ To use one of the default gadgets, simply drag it from the <emphasis role="bold">Dashboard Workspace</emphasis> onto your Dashboard as illustrated below:
+ </para>
<mediaobject>
<imageobject role="html">
<imagedata fileref="images/Dash2.png" format="PNG" align="center" scale="100"/>
Modified: portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/portletsUser/Interface_Portlets.xml
===================================================================
--- portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/portletsUser/Interface_Portlets.xml 2010-04-15 04:23:40 UTC (rev 2646)
+++ portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/portletsUser/Interface_Portlets.xml 2010-04-15 06:28:24 UTC (rev 2647)
@@ -10,34 +10,34 @@
</para>
<variablelist>
- <varlistentry>
- <term><emphasis role="bold">Banner Portlet</emphasis></term>
+ <varlistentry>
+ <term><emphasis role="bold">HomePage Portlet</emphasis></term>
<listitem>
+ <para>
+ This Portlet is the home page for a portal. The home page is the first page displayed when you visit the site.
+ </para>
<mediaobject>
<imageobject role="html">
- <imagedata fileref="images/BannerPortlet.png" format="PNG" align="center" scale="100"/>
+ <imagedata fileref="images/Frontpage.png" format="PNG" align="center" scale="130"/>
</imageobject>
<imageobject role="fo">
- <imagedata fileref="images/BannerPortlet.png" format="PNG" align="center" scalefit="1" contentwidth="150mm"/>
+ <imagedata fileref="images/Frontpage.png" format="PNG" align="center" scalefit="1" contentwidth="150mm" />
</imageobject>
</mediaobject>
- <para>
- This Portlet contains the organization's slogan, logo, and icons.
- </para>
</listitem>
</varlistentry>
- <varlistentry>
- <term><emphasis role="bold">HomePage Portlet</emphasis></term>
+ <varlistentry>
+ <term><emphasis role="bold">Banner Portlet</emphasis></term>
<listitem>
<para>
- This Portlet is the home page for a portal. The home page is the first page displayed when you visit the site.
+ This Portlet contains the organization's slogan, logo, and icons.
</para>
<mediaobject>
<imageobject role="html">
- <imagedata fileref="images/Frontpage.png" format="PNG" align="center" scale="130"/>
+ <imagedata fileref="images/BannerPortlet.png" format="PNG" align="center" scale="100"/>
</imageobject>
<imageobject role="fo">
- <imagedata fileref="images/Frontpage.png" format="PNG" align="center" scalefit="1" contentwidth="150mm" />
+ <imagedata fileref="images/BannerPortlet.png" format="PNG" align="center" scalefit="1" contentwidth="150mm"/>
</imageobject>
</mediaobject>
</listitem>
@@ -123,10 +123,10 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><emphasis role="bold">Iframe Portlet</emphasis></term>
+ <term><emphasis role="bold">IFrame Portlet</emphasis></term>
<listitem>
<para>
- This Portlet is used to create inline frames (IFrame) elements for a site. An Iframe is a HTML element which can embed another document into a parent HTML document. By using IFrames, embedded data is displayed inside a sub-window of browser.
+ This Portlet is used to create inline frames (IFrame) elements for a site. An IFrame is an HTML element which can embed another document into a parent HTML document. By using IFrames, embedded data is displayed inside a sub-window of browser.
</para>
<!-- <mediaobject>
<imageobject>
Modified: portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/terms/Navigation_concept.xml
===================================================================
--- portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/terms/Navigation_concept.xml 2010-04-15 04:23:40 UTC (rev 2646)
+++ portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/terms/Navigation_concept.xml 2010-04-15 06:28:24 UTC (rev 2647)
@@ -32,7 +32,7 @@
<itemizedlist>
<listitem>
<para>
- If a user account in in effect, this navigation holds personal links set up by that user.
+ If a user account is active, this navigation holds personal links set up by that user.
</para>
</listitem>
<listitem>
@@ -42,7 +42,7 @@
</listitem>
<listitem>
<para>
- In an administrator account the navigation adds further management abilities such as Internationalization and community management.
+ In an administrator account the navigation adds further management abilities, such as community and application management.
</para>
</listitem>
</itemizedlist>
Modified: portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/terms/Portlet_concept.xml
===================================================================
--- portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/terms/Portlet_concept.xml 2010-04-15 04:23:40 UTC (rev 2646)
+++ portal/branches/EPP_5_0_0_Branch_Docs/Enterprise_Portal_Platform_User_Guide/en-US/modules/terms/Portlet_concept.xml 2010-04-15 06:28:24 UTC (rev 2647)
@@ -9,7 +9,7 @@
A portlet is a small, self-contained web application. Portlets are managed and displayed within a Portal. Typically, a <emphasis>portal</emphasis> page is displayed as a collection of non-overlapping <emphasis>portlet</emphasis> windows, with each portlet window displaying a different portlet. Hence a portlet (or collection of portlets) resembles a web-based application hosted in a portal.
</para>
<para>
- Portlets can be configured to generated differing content and &PRODUCT; has a number of default portlets that can be used in any portal built in the application.
+ Portlets can be configured with differing content and &PRODUCT; has a number of default portlets that can be used in any portal built in the application.
</para>
</section>
16 years
gatein SVN: r2646 - in portal/trunk/web/portal/src/main/webapp/groovy/portal/webui: container and 1 other directory.
by do-not-reply@jboss.org
Author: thuy.nguyen
Date: 2010-04-15 00:23:40 -0400 (Thu, 15 Apr 2010)
New Revision: 2646
Modified:
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITabContainer.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl
Log:
GTNPORTAL-491: Possition of Edit/Delete icon of portlet is not correct when create new page in Manage page
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl 2010-04-15 03:23:36 UTC (rev 2645)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl 2010-04-15 04:23:40 UTC (rev 2646)
@@ -293,8 +293,8 @@
%>
<div class="PortletIcon $portletIcon"><%=hasPermission ? title : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
+ <a href="<%=uicomponent.event("EditPortlet","$uicomponent.id")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditPortletPropertiesIcon" title="<%=_ctx.appRes("UIPortlet.tooltip.editPortlet");%>"></a>
<a href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>" class="DeletePortletIcon" title="<%=_ctx.appRes("UIPortlet.tooltip.deletePortlet");%>"></a>
- <a href="<%=uicomponent.event("EditPortlet","$uicomponent.id")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditPortletPropertiesIcon" title="<%=_ctx.appRes("UIPortlet.tooltip.editPortlet");%>"></a>
<%}%>
</div>
</div>
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl 2010-04-15 03:23:36 UTC (rev 2645)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl 2010-04-15 04:23:40 UTC (rev 2646)
@@ -63,7 +63,7 @@
<div class="LeftBar">
<div class="RightBar">
<div class="MiddleBar">
- <div class="FixHeight">
+ <div class="FixHeight ClearFix">
<div class="DragControlArea" title="<%=_ctx.appRes("UIContainer.title.DragControlArea")%>" onmousedown="eXo.portal.PortalDragDrop.init.call(this,event);"><span></span></div>
<%
String strTitle = uicomponent.getTitle() != null ?
@@ -72,10 +72,10 @@
%>
<div class="ContainerIcon"><%=hasPermission ? strTitle : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
+ <a href="<%=uicomponent.event("EditContainer")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
<a href="<%=uicomponent.event("DeleteComponent")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
- <a href="<%=uicomponent.event("EditContainer")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
<%}%>
- <div class="ClearBoth"><span></span></div>
+
</div>
</div>
</div>
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITabContainer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITabContainer.gtmpl 2010-04-15 03:23:36 UTC (rev 2645)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITabContainer.gtmpl 2010-04-15 04:23:40 UTC (rev 2646)
@@ -57,15 +57,15 @@
<div class="<%=status%>">
<div class="LeftTab">
<div class="RightTab">
- <div class="MiddleTab">
<%
if(uiChild.isShowEditControl()){
String actionLink = uicomponent.event("EditContainer", "$uiChild.id") - "javascript:";
%>
+ <div class="MiddleTab ClearFix">
<div class="TabLabel FloatLeft" onclick="eXo.webui.UIHorizontalTabs.changeTabForUITabPane(this,'$id', '$tabId' );<%= selectTab %>"><%=title%></div>
<div class="EditIcon" onclick="<%=actionLink%>"></div>
- <div class="ClearLeft"><span></span></div>
<%} else {%>
+ <div class="MiddleTab">
<a class="TabLabel" onclick="eXo.webui.UIHorizontalTabs.changeTabForUITabPane(this,'$id', '$tabId' );<%= selectTab %>"><%=title%></a>
<%} %>
</div>
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl 2010-04-15 03:23:36 UTC (rev 2645)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl 2010-04-15 04:23:40 UTC (rev 2646)
@@ -64,7 +64,7 @@
<div class="LeftBar">
<div class="RightBar">
<div class="MiddleBar">
- <div class="FixHeight">
+ <div class="FixHeight ClearFix">
<div class="DragControlArea" title="<%=_ctx.appRes("UIContainer.tooltip.drag")%>" onmousedown="eXo.portal.PortalDragDrop.init.call(this,event);"><span></span></div>
<%
String strTitle = uicomponent.getTitle() != null ?
@@ -73,10 +73,9 @@
%>
<div class="ContainerIcon DefaultContainer16x16Icon"><%=hasPermission ? strTitle : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
<a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+ <a href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
<%}%>
- <div class="ClearBoth"><span></span></div>
</div>
</div>
</div>
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl 2010-04-15 03:23:36 UTC (rev 2645)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl 2010-04-15 04:23:40 UTC (rev 2646)
@@ -61,7 +61,7 @@
<div class="LeftBar">
<div class="RightBar">
<div class="MiddleBar">
- <div class="FixHeight">
+ <div class="FixHeight ClearFix">
<div class="DragControlArea" title="<%=_ctx.appRes("UIContainer.tooltip.drag")%>" onmousedown="eXo.portal.PortalDragDrop.init.call(this,event);"><span></span></div>
<%
String strTitle = uicomponent.getTitle() != null ?
@@ -70,10 +70,9 @@
%>
<div class="ContainerIcon DefaultContainer16x16Icon"><%=hasPermission ? strTitle : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
<a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+ <a href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
<%}%>
- <div class="ClearBoth"><span></span></div>
</div>
</div>
</div>
16 years
gatein SVN: r2645 - portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2010-04-14 23:23:36 -0400 (Wed, 14 Apr 2010)
New Revision: 2645
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java
Log:
GTNPORTAL-1069 Refresh the UIPage in UIPortal
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java 2010-04-15 03:02:07 UTC (rev 2644)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java 2010-04-15 03:23:36 UTC (rev 2645)
@@ -300,6 +300,7 @@
editPortal.setSelectedNode(uiPortal.getSelectedNode());
editPortal.setSelectedNavigation(uiPortal.getSelectedNavigation());
editPortal.setSelectedPath(uiPortal.getSelectedPath());
+ editPortal.refreshUIPage();
UISiteBody siteBody = uiWorkingWS.findFirstComponentOfType(UISiteBody.class);
siteBody.setUIComponent(null);
}
16 years