gatein SVN: r7506 - epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application.
by do-not-reply@jboss.org
Author: mwringe
Date: 2011-09-26 15:58:35 -0400 (Mon, 26 Sep 2011)
New Revision: 7506
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java
Log:
JBEPP-1164: update LegacyRequestHandler to redirect to the login page for users who don't have permission to access the current page.
Modified: epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java 2011-09-26 19:11:35 UTC (rev 7505)
+++ epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java 2011-09-26 19:58:35 UTC (rev 7506)
@@ -19,8 +19,11 @@
package org.exoplatform.portal.application;
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.config.UserPortalConfig;
import org.exoplatform.portal.config.UserPortalConfigService;
+import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.user.UserNavigation;
import org.exoplatform.portal.mop.user.UserNode;
@@ -91,6 +94,29 @@
// Resolve the user node
UserPortalConfig cfg = userPortalService.getUserPortalConfig(requestSiteName, context.getRequest().getRemoteUser(), userPortalContext);
+
+ if (cfg == null)
+ {
+ HttpServletRequest req = context.getRequest();
+ DataStorage storage = (DataStorage)PortalContainer.getComponent(DataStorage.class);
+ PortalConfig persistentPortalConfig = storage.getPortalConfig(requestSiteName);
+ if (persistentPortalConfig == null)
+ {
+ return false;
+ }
+ if(req.getRemoteUser() == null)
+ {
+ String doLoginPath = req.getContextPath() + "/" + "dologin" + "?initialURI=" + req.getRequestURI();
+ context.getResponse().sendRedirect(doLoginPath);
+ }
+ else
+ {
+ context.getResponse().sendError(HttpServletResponse.SC_FORBIDDEN);
+ }
+ return true;
+ }
+
+
UserPortal userPortal = cfg.getUserPortal();
UserNodeFilterConfig.Builder builder = UserNodeFilterConfig.builder().withAuthMode(UserNodeFilterConfig.AUTH_READ);
UserNode userNode = userPortal.resolvePath(builder.build(), requestPath);
13 years, 3 months
gatein SVN: r7505 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application.
by do-not-reply@jboss.org
Author: mwringe
Date: 2011-09-26 15:11:35 -0400 (Mon, 26 Sep 2011)
New Revision: 7505
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java
Log:
GTNPORTAL-2126: Update LegacyRequestHandler to handle situations where the current user doesn't have permission to access the portal or the portal doesn't exist.
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java 2011-09-26 11:29:58 UTC (rev 7504)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java 2011-09-26 19:11:35 UTC (rev 7505)
@@ -19,8 +19,11 @@
package org.exoplatform.portal.application;
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.config.UserPortalConfig;
import org.exoplatform.portal.config.UserPortalConfigService;
+import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.user.UserNavigation;
import org.exoplatform.portal.mop.user.UserNode;
@@ -91,6 +94,29 @@
// Resolve the user node
UserPortalConfig cfg = userPortalService.getUserPortalConfig(requestSiteName, context.getRequest().getRemoteUser(), userPortalContext);
+
+ if (cfg == null)
+ {
+ HttpServletRequest req = context.getRequest();
+ DataStorage storage = (DataStorage)PortalContainer.getComponent(DataStorage.class);
+ PortalConfig persistentPortalConfig = storage.getPortalConfig(requestSiteName);
+ if (persistentPortalConfig == null)
+ {
+ return false;
+ }
+ if(req.getRemoteUser() == null)
+ {
+ String doLoginPath = req.getContextPath() + "/" + "dologin" + "?initialURI=" + req.getRequestURI();
+ context.getResponse().sendRedirect(doLoginPath);
+ }
+ else
+ {
+ context.getResponse().sendError(HttpServletResponse.SC_FORBIDDEN);
+ }
+ return true;
+ }
+
+
UserPortal userPortal = cfg.getUserPortal();
UserNodeFilterConfig.Builder builder = UserNodeFilterConfig.builder().withAuthMode(UserNodeFilterConfig.AUTH_READ);
UserNode userNode = userPortal.resolvePath(builder.build(), requestPath);
13 years, 3 months
gatein SVN: r7502 - sandbox/as7_support.
by do-not-reply@jboss.org
Author: mstruk
Date: 2011-09-25 18:49:58 -0400 (Sun, 25 Sep 2011)
New Revision: 7502
Added:
sandbox/as7_support/exo.kernel.container/
Log:
Patched up exo.kernel.container
13 years, 3 months
gatein SVN: r7501 - components/wsrp/trunk/wsrp-producer-war.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-09-23 09:56:17 -0400 (Fri, 23 Sep 2011)
New Revision: 7501
Modified:
components/wsrp/trunk/wsrp-producer-war/pom.xml
Log:
- Upgrading to Staxnav 0.9.6 for upcoming changes in PC
Modified: components/wsrp/trunk/wsrp-producer-war/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/pom.xml 2011-09-23 11:44:57 UTC (rev 7500)
+++ components/wsrp/trunk/wsrp-producer-war/pom.xml 2011-09-23 13:56:17 UTC (rev 7501)
@@ -333,7 +333,7 @@
<dependency>
<groupId>org.staxnav</groupId>
<artifactId>staxnav.core</artifactId>
- <version>0.9.4</version>
+ <version>0.9.6</version>
<scope>test</scope>
</dependency>
13 years, 3 months
gatein SVN: r7500 - in portal/trunk/component/portal/src: test/java/org/exoplatform/portal/config and 9 other directories.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2011-09-23 07:44:57 -0400 (Fri, 23 Sep 2011)
New Revision: 7500
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/site1-conf/group/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/site1-conf/group/platform/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/site1-conf/group/platform/administrators/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/site1-conf/group/platform/administrators/group.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/site2-conf/group/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/site2-conf/group/platform/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/site2-conf/group/platform/administrators/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/site2-conf/group/platform/administrators/pages.xml
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractSiteDataImportTest.java
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport1-configuration.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport2-configuration.xml
Log:
GTNPORTAL-2124 [Data Import] It does not work properly with PortalConfig in extension
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java 2011-09-23 11:26:13 UTC (rev 7499)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java 2011-09-23 11:44:57 UTC (rev 7500)
@@ -495,16 +495,25 @@
String type = config.getOwnerType();
UnmarshalledObject<PortalConfig> obj = getConfig(config, owner, type, PortalConfig.class);
- ImportMode importMode = getRightMode(config.getImportMode());
-
- PortalConfig pConfig = (obj != null) ? obj.getObject() : null;
- if (pConfig == null)
+ PortalConfig pConfig;
+ if (obj == null)
{
- pConfig = new PortalConfig(type);
- pConfig.setPortalLayout(new Container());
- pConfig.setName(owner);
+ if (dataStorage_.getPortalConfig(type, owner) != null)
+ {
+ return true;
+ }
+ else
+ {
+ pConfig = new PortalConfig(type, owner);
+ }
}
+ else
+ {
+ pConfig = obj.getObject();
+ }
+ ImportMode importMode = getRightMode(config.getImportMode());
+
PortalConfigImporter portalImporter = new PortalConfigImporter(importMode, pConfig, dataStorage_);
try
{
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractSiteDataImportTest.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractSiteDataImportTest.java 2011-09-23 11:26:13 UTC (rev 7499)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractSiteDataImportTest.java 2011-09-23 11:44:57 UTC (rev 7500)
@@ -6,6 +6,7 @@
import org.exoplatform.portal.config.model.Container;
import org.exoplatform.portal.config.model.Page;
import org.exoplatform.portal.config.model.PortalConfig;
+import org.exoplatform.portal.mop.SiteType;
import org.exoplatform.portal.mop.importer.Imported;
import org.exoplatform.portal.pom.config.POMSessionManager;
import org.exoplatform.portal.pom.spi.portlet.Portlet;
@@ -39,7 +40,7 @@
Workspace workspace = mgr.getSession().getWorkspace();
assertTrue(workspace.isAdapted(Imported.class));
- //
+ // Test portal
DataStorage dataStorage = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
PortalConfig portal = dataStorage.getPortalConfig("classic");
Container layout = portal.getPortalLayout();
@@ -47,19 +48,30 @@
Application<Portlet> layoutPortlet = (Application<Portlet>)layout.getChildren().get(0);
assertEquals("site2/layout", dataStorage.getId(layoutPortlet.getState()));
- //
- Page home = dataStorage.getPage("portal::classic::home");
- assertNotNull(home);
- assertEquals("site 1", home.getTitle());
+ Page page = dataStorage.getPage("portal::classic::home");
+ assertNotNull(page);
+ assertEquals("site 1", page.getTitle());
+
+ page = dataStorage.getPage("portal::classic::page1");
+ assertNotNull(page);
+ assertEquals("site 2", page.getTitle());
+
+ page = dataStorage.getPage("portal::classic::page2");
+ assertNotNull(page);
+ assertEquals("site 2", page.getTitle());
- Page page1 = dataStorage.getPage("portal::classic::page1");
- assertNotNull(page1);
- assertEquals("site 2", page1.getTitle());
+ // Test group
+ portal = dataStorage.getPortalConfig(SiteType.GROUP.getName(), "/platform/administrators");
+ layout = portal.getPortalLayout();
+ assertEquals(1, layout.getChildren().size());
+ layoutPortlet = (Application<Portlet>)layout.getChildren().get(0);
+ assertEquals("site1/layout", dataStorage.getId(layoutPortlet.getState()));
- Page page2 = dataStorage.getPage("portal::classic::page2");
- assertNotNull(page2);
- assertEquals("site 2", page2.getTitle());
+ page = dataStorage.getPage("group::/platform/administrators::page1");
+ assertNotNull(page);
+ assertEquals("site 2", page.getTitle());
+ // Test user
Page dashboard1 = dataStorage.getPage("user::root::dashboard1");
assertNotNull(dashboard1);
assertEquals("site 2", dashboard1.getTitle());
@@ -76,7 +88,7 @@
Workspace workspace = mgr.getSession().getWorkspace();
assertTrue(workspace.isAdapted(Imported.class));
- //
+ // Test portal
DataStorage dataStorage = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
PortalConfig portal = dataStorage.getPortalConfig("classic");
Container layout = portal.getPortalLayout();
@@ -84,18 +96,28 @@
Application<Portlet> layoutPortlet = (Application<Portlet>)layout.getChildren().get(0);
assertEquals("site1/layout", dataStorage.getId(layoutPortlet.getState()));
- //
- Page home = dataStorage.getPage("portal::classic::home");
- assertNotNull(home);
- assertEquals("site 1", home.getTitle());
+ Page page = dataStorage.getPage("portal::classic::home");
+ assertNotNull(page);
+ assertEquals("site 1", page.getTitle());
+
+ page = dataStorage.getPage("portal::classic::page1");
+ assertNotNull(page);
+ assertEquals("site 1", page.getTitle());
+
+ page = dataStorage.getPage("portal::classic::page2");
+ assertNull(page);
- Page page1 = dataStorage.getPage("portal::classic::page1");
- assertNotNull(page1);
- assertEquals("site 1", page1.getTitle());
+ // Test group
+ portal = dataStorage.getPortalConfig(SiteType.GROUP.getName(), "/platform/administrators");
+ layout = portal.getPortalLayout();
+ assertEquals(1, layout.getChildren().size());
+ layoutPortlet = (Application<Portlet>)layout.getChildren().get(0);
+ assertEquals("site1/layout", dataStorage.getId(layoutPortlet.getState()));
- Page page2 = dataStorage.getPage("portal::classic::page2");
- assertNull(page2);
+ page = dataStorage.getPage("group::/platform/administrators::page1");
+ assertNull(page);
+ // Test user
Page dashboard1 = dataStorage.getPage("user::root::dashboard1");
assertNull(dashboard1);
Modified: portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport1-configuration.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport1-configuration.xml 2011-09-23 11:26:13 UTC (rev 7499)
+++ portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport1-configuration.xml 2011-09-23 11:44:57 UTC (rev 7500)
@@ -59,6 +59,28 @@
</object>
</object-param>
<object-param>
+ <name>group.configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>/platform/administrators</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>group</string>
+ </field>
+ <field name="templateLocation">
+ <string>classpath:/org/exoplatform/portal/config/${import.portal.1}-conf</string>
+ </field>
+ <field name="importMode">
+ <string>${import.mode.1}</string>
+ </field>
+ </object>
+ </object-param>
+ <object-param>
<name>user.configuration</name>
<description>description</description>
<object type="org.exoplatform.portal.config.NewPortalConfig">
Modified: portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport2-configuration.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport2-configuration.xml 2011-09-23 11:26:13 UTC (rev 7499)
+++ portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport2-configuration.xml 2011-09-23 11:44:57 UTC (rev 7500)
@@ -18,9 +18,8 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd http://www.exoplaform.org/xml/ns/kernel_1_2.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd">
+<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd http://www.exoplaform.org/xml/ns/kernel_1_2.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd">
<external-component-plugins>
<target-component>org.exoplatform.portal.config.UserPortalConfigService</target-component>
@@ -60,6 +59,28 @@
</object>
</object-param>
<object-param>
+ <name>group.configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>/platform/administrators</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>group</string>
+ </field>
+ <field name="templateLocation">
+ <string>classpath:/org/exoplatform/portal/config/${import.portal_2}-conf</string>
+ </field>
+ <field name="importMode">
+ <string>${import.mode_2}</string>
+ </field>
+ </object>
+ </object-param>
+ <object-param>
<name>user.configuration</name>
<description>description</description>
<object type="org.exoplatform.portal.config.NewPortalConfig">
Added: portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/site1-conf/group/platform/administrators/group.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/site1-conf/group/platform/administrators/group.xml (rev 0)
+++ portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/site1-conf/group/platform/administrators/group.xml 2011-09-23 11:44:57 UTC (rev 7500)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (C) 2011 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.
+
+-->
+
+<portal-config
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_2 http://www.gatein.org/xml/ns/gatein_objects_1_2"
+ xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_2">
+ <portal-name>exo</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/exo</edit-permission>
+ <portal-layout>
+ <portlet-application>
+ <portlet>
+ <application-ref>site1</application-ref>
+ <portlet-ref>layout</portlet-ref>
+ </portlet>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>true</show-info-bar>
+ </portlet-application>
+ </portal-layout>
+</portal-config>
Added: portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/site2-conf/group/platform/administrators/pages.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/site2-conf/group/platform/administrators/pages.xml (rev 0)
+++ portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/site2-conf/group/platform/administrators/pages.xml 2011-09-23 11:44:57 UTC (rev 7500)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
+
+<page-set
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_2 http://www.gatein.org/xml/ns/gatein_objects_1_2"
+ xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_2">
+
+ <page>
+ <name>page1</name>
+ <title>site 2</title>
+ <portlet-application>
+ <portlet>
+ <application-ref>site2</application-ref>
+ <portlet-ref>page1</portlet-ref>
+ </portlet>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>true</show-info-bar>
+ </portlet-application>
+ </page>
+</page-set>
13 years, 3 months
gatein SVN: r7499 - in portal/branches/xss: component/web/server/src/main/java/org/exoplatform/web/handler and 1 other directories.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2011-09-23 07:26:13 -0400 (Fri, 23 Sep 2011)
New Revision: 7499
Modified:
portal/branches/xss/component/web/server/src/main/java/org/exoplatform/upload/UploadService.java
portal/branches/xss/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java
portal/branches/xss/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIUpload.js
Log:
GTNPORTAL-2116 Broken form layout after upload a file which has special name
Modified: portal/branches/xss/component/web/server/src/main/java/org/exoplatform/upload/UploadService.java
===================================================================
--- portal/branches/xss/component/web/server/src/main/java/org/exoplatform/upload/UploadService.java 2011-09-23 10:00:16 UTC (rev 7498)
+++ portal/branches/xss/component/web/server/src/main/java/org/exoplatform/upload/UploadService.java 2011-09-23 11:26:13 UTC (rev 7499)
@@ -39,6 +39,7 @@
import org.exoplatform.container.xml.PortalContainerInfo;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
+import org.gatein.common.text.EntityEncoder;
public class UploadService
{
@@ -75,7 +76,6 @@
* the webapp's {@link javax.servlet.http.HttpServletRequest}
* @throws FileUploadException
*/
- @SuppressWarnings("unchecked")
public void createUploadResource(HttpServletRequest request) throws FileUploadException
{
String uploadId = request.getParameter("uploadId");
@@ -112,8 +112,10 @@
if (fileName == null)
fileName = uploadId;
fileName = fileName.substring(fileName.lastIndexOf('\\') + 1);
+ fileName = EntityEncoder.FULL.encode(fileName);
String storeLocation = uploadLocation_ + "/" + uploadId + "." + fileName;
+
// commons-fileupload will store the temp file with name *.tmp
// we need to rename it to our desired name
fileItem.getStoreLocation().renameTo(new File(storeLocation));
Modified: portal/branches/xss/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java
===================================================================
--- portal/branches/xss/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java 2011-09-23 10:00:16 UTC (rev 7498)
+++ portal/branches/xss/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java 2011-09-23 11:26:13 UTC (rev 7499)
@@ -27,6 +27,7 @@
import org.exoplatform.web.ControllerContext;
import org.exoplatform.web.WebAppController;
import org.exoplatform.web.WebRequestHandler;
+import org.gatein.common.text.EntityEncoder;
import java.io.Writer;
import java.net.URLEncoder;
@@ -85,7 +86,6 @@
continue;
if (upResource.getStatus() == UploadResource.FAILED_STATUS)
{
-
int limitMB = service.getUploadLimitsMB().get(uploadIds[i]).intValue();
value.append("\n \"").append(uploadIds[i]).append("\": {");
value.append("\n \"status\":").append('\"').append("failed").append("\",");
Modified: portal/branches/xss/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIUpload.js
===================================================================
--- portal/branches/xss/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIUpload.js 2011-09-23 10:00:16 UTC (rev 7498)
+++ portal/branches/xss/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIUpload.js 2011-09-23 11:26:13 UTC (rev 7499)
@@ -43,7 +43,7 @@
//eXo.webui.UIUpload.listLimitMB.push();
this.createUploadEntry(uploadId, isAutoUpload);
} else if(response.upload[uploadId].percent == 100) {
- this.showUploaded(uploadId, decodeURIComponent(response.upload[uploadId].fileName));
+ this.showUploaded(uploadId, (response.upload[uploadId].fileName));
}
};
@@ -97,11 +97,10 @@
if(list.length < 1) return;
var url = eXo.env.server.context + "/upload?" ;
url += "action=progress" ;
-// var url = eXo.env.server.context + "/upload?action=progress";
+// var url = eXo.env.server.context + "/upload?action=progress";
for(var i = 0; i < list.length; i++){
url = url + "&uploadId=" + list[i];
}
-
var responseText = ajaxAsyncGetRequest(url, false);
if(list.length > 0) {
setTimeout("eXo.webui.UIUpload.refeshProgress('" + elementId + "');", 1000);
@@ -111,16 +110,15 @@
try {
eval("response = "+responseText);
}catch(err) {
- return;
+ return;
}
-
+
+
for(id in response.upload) {
var container = parent.document.getElementById(elementId);
if (response.upload[id].status == "failed") {
this.abortUpload(id);
var message = eXo.core.DOMUtil.findFirstChildByClass(container, "div", "LimitMessage").innerHTML ;
- alert(message.replace("{0}", response.upload[id].size)) ;
-// alert(response.upload[id].message);
continue;
}
var element = document.getElementById(id+"ProgressIframe");
@@ -129,9 +127,11 @@
var blueProgressBar = eXo.core.DOMUtil.findFirstChildByClass(progressBarMiddle, "div", "BlueProgressBar") ;
var progressBarLabel = eXo.core.DOMUtil.findFirstChildByClass(blueProgressBar, "div", "ProgressBarLabel") ;
blueProgressBar.style.width = percent + "%" ;
+
progressBarLabel.innerHTML = percent + "%" ;
-
- if(percent == 100) this.showUploaded(id, "");
+ if(percent == 100) {
+ this.showUploaded(id, response.upload[id].fileName);
+ }
}
if(eXo.webui.UIUpload.listUpload.length < 1) return;
@@ -160,7 +160,7 @@
var selectFileFrame = eXo.core.DOMUtil.findFirstDescendantByClass(container, "div", "SelectFileFrame") ;
selectFileFrame.style.display = "block" ;
var fileNameLabel = eXo.core.DOMUtil.findFirstDescendantByClass(selectFileFrame, "div", "FileNameLabel") ;
- if(fileName != null) fileNameLabel.innerHTML += " " + fileName;
+ if(fileName != null) fileNameLabel.innerHTML = decodeURIComponent(fileName);
var progressBarFrame = eXo.core.DOMUtil.findFirstDescendantByClass(container, "div", "ProgressBarFrame") ;
progressBarFrame.style.display = "none" ;
var tmp = element.parentNode;
@@ -246,19 +246,7 @@
var file = DOMUtil.findDescendantById(form, "file");
if(file.value == null || file.value == '') return;
- var infoUploaded = eXo.core.DOMUtil.findFirstDescendantByClass(container, "div", "FileNameLabel") ;
- var temp = file.value;
- if (temp.indexOf('/') != -1) {
- temp = temp.substr((temp.lastIndexOf('/') + 1), temp.length - 1) ;
- }
-
- if (temp.indexOf('\\') != -1) {
- temp = temp.substr((temp.lastIndexOf('\\') + 1), temp.length - 1) ;
- }
-
- infoUploaded.innerHTML = temp ;
-
var progressBarFrame = DOMUtil.findFirstDescendantByClass(container, "div", "ProgressBarFrame") ;
progressBarFrame.style.display = "block" ;
var progressBarMiddle = DOMUtil.findFirstDescendantByClass(container, "div", "ProgressBarMiddle") ;
13 years, 3 months
gatein SVN: r7498 - in components/wsrp/trunk/admin-gui/src/main: webapp/jsf/producer and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-09-23 06:00:16 -0400 (Fri, 23 Sep 2011)
New Revision: 7498
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml
Log:
- GTNWSRP-244: Retrieve the property name from the selected object directly instead of using a parameter which value is set *before* the name of the property is actually set.
Modified: components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java 2011-09-23 09:45:45 UTC (rev 7497)
+++ components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java 2011-09-23 10:00:16 UTC (rev 7498)
@@ -32,10 +32,13 @@
import org.gatein.wsrp.producer.config.impl.ProducerRegistrationRequirementsImpl;
import org.gatein.wsrp.registration.RegistrationPropertyDescription;
+import javax.faces.component.UIComponent;
+import javax.faces.component.html.HtmlDataTable;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
+import javax.xml.namespace.QName;
import java.io.Serializable;
import java.util.Collections;
import java.util.LinkedList;
@@ -250,9 +253,28 @@
public void selectProperty(ActionEvent event)
{
- selectedProp = beanContext.getParameter("propName");
+ // Retrieve parent table from event
+ HtmlDataTable table = getParentDataTable((UIComponent)event.getSource());
+
+ // Get selected prop
+ RegistrationPropertyDescription prop = (RegistrationPropertyDescription)table.getRowData();
+
+ selectedProp = prop.getNameAsString();
}
+ private HtmlDataTable getParentDataTable(UIComponent component)
+ {
+ if (component == null)
+ {
+ return null;
+ }
+ if (component instanceof HtmlDataTable)
+ {
+ return (HtmlDataTable)component;
+ }
+ return getParentDataTable(component.getParent());
+ }
+
protected String getObjectTypeName()
{
return null; // default implementation as not used
@@ -295,7 +317,7 @@
{
this.registrationRequirements = new ProducerRegistrationRequirementsImpl(registrationRequirements);
- Map descriptions = registrationRequirements.getRegistrationProperties();
+ Map<QName, RegistrationPropertyDescription> descriptions = registrationRequirements.getRegistrationProperties();
registrationProperties = new LinkedList<RegistrationPropertyDescription>(descriptions.values());
Collections.sort(registrationProperties);
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml 2011-09-23 09:45:45 UTC (rev 7497)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml 2011-09-23 10:00:16 UTC (rev 7498)
@@ -132,9 +132,7 @@
<h:commandLink id="confirm-delete" action="confirmPropDeletion"
value="#{i18n.producer_config_reg_prop_remove}"
styleClass="actionDelete"
- actionListener="#{producer.selectProperty}">
- <f:param name="propName" value="#{property.nameAsString}"/>
- </h:commandLink>
+ actionListener="#{producer.selectProperty}"/>
</h:column>
</h:dataTable>
</f:subview>
13 years, 3 months
gatein SVN: r7497 - in portal/trunk: component/portal/src/main/java/org/exoplatform/portal/mop/user and 23 other directories.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2011-09-23 05:45:45 -0400 (Fri, 23 Sep 2011)
New Revision: 7497
Added:
portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/portal/
portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/portal/RefreshCurrentUserPortal.java
portal/trunk/component/web/controller/src/test/java/org/exoplatform/web/portal/
portal/trunk/component/web/controller/src/test/java/org/exoplatform/web/portal/TestRefreshCurrentUserPortal.java
portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/
portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/configuration.xml
portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/group/
portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/group/platform/
portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/group/platform/group.xml
portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/group/platform/pages.xml
portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/portal/
portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/portal/classic/
portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/portal/classic/navigation.xml
portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/portal/classic/pages.xml
portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/portal/classic/portal.xml
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfig.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNavigation.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortal.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/SimpleUserPortalContext.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java
portal/trunk/component/web/controller/pom.xml
portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/RequestContext.java
portal/trunk/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/BasePartialUpdateToolbar.java
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNavigationForm.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNodeSelector.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java
Log:
GTNPORTAL-2120: Cache UserPortal instance in request scope and provide invalidation infrastructure
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfig.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfig.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfig.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -40,6 +40,8 @@
/** . */
private UserPortalContext userPortalContext;
+ private UserPortal userPortal;
+
public UserPortalConfig()
{
this.portal = null;
@@ -60,8 +62,17 @@
public UserPortal getUserPortal()
{
- return new UserPortalImpl(service, portalName, portal, accessUser, userPortalContext);
+ return getUserPortal(false);
}
+
+ public UserPortal getUserPortal(boolean isNewlyCreated)
+ {
+ if (isNewlyCreated || userPortal == null)
+ {
+ userPortal = new UserPortalImpl(service, portalName, portal, accessUser, userPortalContext);
+ }
+ return userPortal;
+ }
public PortalConfig getPortalConfig()
{
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNavigation.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNavigation.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNavigation.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -89,4 +89,10 @@
{
return modifiable;
}
+
+ @Override
+ public String toString()
+ {
+ return "UserNavigation[key=" + navigation.getKey() + "]";
+ }
}
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortal.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortal.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortal.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -65,6 +65,11 @@
UserNavigation getNavigation(SiteKey key)
throws NullPointerException, UserPortalException, NavigationServiceException;
+ /**
+ * Refresh the current user portal.
+ */
+ void refresh();
+
/**
* Load a user node from a specified user navigation with a custom scope.
* The returned node is the root node of the navigation.
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -194,7 +194,12 @@
return null;
}
- public UserNode getNode(
+ public void refresh()
+ {
+ navigations = null;
+ }
+
+ public UserNode getNode(
UserNavigation userNavigation,
Scope scope,
UserNodeFilterConfig filterConfig,
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/SimpleUserPortalContext.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/SimpleUserPortalContext.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/SimpleUserPortalContext.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -31,7 +31,7 @@
*
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
*/
-class SimpleUserPortalContext implements UserPortalContext
+public class SimpleUserPortalContext implements UserPortalContext
{
/** . */
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -32,6 +32,9 @@
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.Visibility;
+import org.exoplatform.portal.mop.navigation.NavigationContext;
+import org.exoplatform.portal.mop.navigation.NavigationServiceImpl;
+import org.exoplatform.portal.mop.navigation.NavigationState;
import org.exoplatform.portal.mop.navigation.Scope;
import org.exoplatform.portal.mop.user.UserNodeFilterConfig.Builder;
import org.exoplatform.portal.pom.config.POMDataStorage;
@@ -226,6 +229,40 @@
test.execute();
}
+ public void testRefreshNavigations()
+ {
+ UnitTest test = new UnitTest()
+ {
+ public void doExecute() throws Exception
+ {
+
+ //
+ UserPortalConfig userPortalCfg = userPortalConfigSer_.getUserPortalConfig("classic", getUserId());
+ UserPortal portal = userPortalCfg.getUserPortal();
+
+ //
+ NavigationServiceImpl service = new NavigationServiceImpl(mgr);
+ SiteKey navKey = SiteKey.group("/organization/management");
+ NavigationContext nav = new NavigationContext(navKey, new NavigationState(1));
+
+ //
+ NavigationContext got = service.loadNavigation(navKey);
+ assertEquals(null, got);
+ assertEquals(null, portal.getNavigation(navKey));
+
+ //
+ service.saveNavigation(nav);
+ assertEquals(null, portal.getNavigation(navKey));
+ portal.refresh();
+ assertNotNull(portal.getNavigation(navKey));
+
+ }
+ };
+
+ //
+ test.execute("root");
+ }
+
public void testFilterWithVisibility()
{
class Test extends UnitTest
Modified: portal/trunk/component/web/controller/pom.xml
===================================================================
--- portal/trunk/component/web/controller/pom.xml 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/component/web/controller/pom.xml 2011-09-23 09:45:45 UTC (rev 7497)
@@ -75,6 +75,32 @@
</dependency>
<dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.test.jcr</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.identity</artifactId>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.portal</artifactId>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.chromattic</groupId>
+ <artifactId>chromattic.core</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
<groupId>net.sourceforge.jregex</groupId>
<artifactId>jregex</artifactId>
<version>1.2_01</version>
Modified: portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/RequestContext.java
===================================================================
--- portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/RequestContext.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/RequestContext.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -19,6 +19,8 @@
package org.exoplatform.web.application;
+import org.exoplatform.portal.config.UserPortalConfig;
+import org.exoplatform.portal.mop.user.UserPortal;
import org.exoplatform.services.resources.Orientation;
import org.exoplatform.web.url.URLFactory;
import org.exoplatform.web.url.PortalURL;
@@ -191,6 +193,8 @@
return parentAppRequestContext_;
}
+ public abstract UserPortal getUserPortal();
+
@SuppressWarnings("unchecked")
public static <T extends RequestContext> T getCurrentInstance()
{
Added: portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/portal/RefreshCurrentUserPortal.java
===================================================================
--- portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/portal/RefreshCurrentUserPortal.java (rev 0)
+++ portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/portal/RefreshCurrentUserPortal.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2011 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.portal;
+
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.navigation.NavigationService;
+import org.exoplatform.portal.mop.user.UserPortal;
+import org.exoplatform.services.listener.Event;
+import org.exoplatform.services.listener.Listener;
+import org.exoplatform.web.application.RequestContext;
+
+/**
+ * This listener attempts to find the {@link UserPortal} associated with the current request
+ * and invalidate it when the navigation service emits an event for a navigation modification.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ */
+public class RefreshCurrentUserPortal extends Listener<NavigationService, SiteKey>
+{
+
+ @Override
+ public void onEvent(Event<NavigationService, SiteKey> event) throws Exception
+ {
+ RequestContext ctx = RequestContext.getCurrentInstance();
+ if (ctx != null)
+ {
+ UserPortal userPortal = ctx.getUserPortal();
+ if (userPortal != null)
+ {
+ userPortal.refresh();
+ }
+ }
+ }
+}
Added: portal/trunk/component/web/controller/src/test/java/org/exoplatform/web/portal/TestRefreshCurrentUserPortal.java
===================================================================
--- portal/trunk/component/web/controller/src/test/java/org/exoplatform/web/portal/TestRefreshCurrentUserPortal.java (rev 0)
+++ portal/trunk/component/web/controller/src/test/java/org/exoplatform/web/portal/TestRefreshCurrentUserPortal.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -0,0 +1,183 @@
+/*
+ * Copyright (C) 2011 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.portal;
+
+import org.exoplatform.component.test.ConfigurationUnit;
+import org.exoplatform.component.test.ConfiguredBy;
+import org.exoplatform.component.test.ContainerScope;
+import org.exoplatform.portal.AbstractPortalTest;
+import org.exoplatform.portal.config.DataStorage;
+import org.exoplatform.portal.config.UserPortalConfig;
+import org.exoplatform.portal.config.UserPortalConfigService;
+import org.exoplatform.portal.config.model.PortalConfig;
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.navigation.NavigationContext;
+import org.exoplatform.portal.mop.navigation.NavigationService;
+import org.exoplatform.portal.mop.navigation.NavigationState;
+import org.exoplatform.portal.mop.navigation.NodeContext;
+import org.exoplatform.portal.mop.navigation.NodeModel;
+import org.exoplatform.portal.mop.navigation.Scope;
+import org.exoplatform.portal.mop.user.SimpleUserPortalContext;
+import org.exoplatform.portal.mop.user.UserNavigation;
+import org.exoplatform.portal.mop.user.UserPortal;
+import org.exoplatform.services.resources.Orientation;
+import org.exoplatform.web.application.RequestContext;
+import org.exoplatform.web.application.URLBuilder;
+import org.exoplatform.web.url.PortalURL;
+import org.exoplatform.web.url.ResourceType;
+import org.exoplatform.web.url.URLFactory;
+
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ */
+@ConfiguredBy({
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.test.jcr-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.identity-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.portal-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "org/exoplatform/web/portal/configuration.xml")
+})
+public class TestRefreshCurrentUserPortal extends AbstractPortalTest
+{
+
+ /** . */
+ private RequestContext requestContext;
+
+ /** . */
+ private UserPortal userPortal;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ begin();
+
+ UserPortalConfigService upcs = (UserPortalConfigService)getContainer().getComponentInstanceOfType(UserPortalConfigService.class);
+ UserPortalConfig upc = upcs.getUserPortalConfig("classic", "root", new SimpleUserPortalContext(Locale.ENGLISH));
+ final UserPortal userPortal = upc.getUserPortal();
+
+ //
+ RequestContext requestContext = new RequestContext(null)
+ {
+ @Override
+ public URLFactory getURLFactory()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public <R, U extends PortalURL<R, U>> U newURL(ResourceType<R, U> resourceType, URLFactory urlFactory)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Orientation getOrientation()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public String getRequestParameter(String name)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public String[] getRequestParameterValues(String name)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public URLBuilder<?> getURLBuilder()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean useAjax()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public UserPortal getUserPortal()
+ {
+ return userPortal;
+ }
+ };
+
+ //
+ this.userPortal = userPortal;
+ this.requestContext = requestContext;
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ end();
+ }
+
+ public void testCreate() throws Exception
+ {
+ List<UserNavigation> navs = userPortal.getNavigations();
+ assertEquals(2, navs.size());
+ RequestContext.setCurrentInstance(requestContext);
+ NavigationService ns = (NavigationService)getContainer().getComponentInstanceOfType(NavigationService.class);
+ ns.saveNavigation(new NavigationContext(SiteKey.group("/platform"), new NavigationState(1)));
+ navs = userPortal.getNavigations();
+ assertEquals(3, navs.size());
+ RequestContext.setCurrentInstance(null);
+ }
+
+ public void testUpdate() throws Exception
+ {
+ List<UserNavigation> navs = userPortal.getNavigations();
+ assertEquals(2, navs.size());
+ NavigationService ns = (NavigationService)getContainer().getComponentInstanceOfType(NavigationService.class);
+ NavigationContext nav = new NavigationContext(SiteKey.group("/platform"), new NavigationState(1));
+ ns.saveNavigation(nav);
+ navs = userPortal.getNavigations();
+ assertEquals(2, navs.size());
+ RequestContext.setCurrentInstance(requestContext);
+ NodeContext root = ns.loadNode(NodeModel.SELF_MODEL, nav, Scope.ALL, null);
+ root.add(null, "foo");
+ ns.saveNode(root, null);
+ navs = userPortal.getNavigations();
+ assertEquals(3, navs.size());
+ RequestContext.setCurrentInstance(null);
+ }
+
+ public void testDestroy() throws Exception
+ {
+ NavigationService ns = (NavigationService)getContainer().getComponentInstanceOfType(NavigationService.class);
+ NavigationContext nav = new NavigationContext(SiteKey.group("/platform"), new NavigationState(1));
+ ns.saveNavigation(nav);
+ List<UserNavigation> navs = userPortal.getNavigations();
+ assertEquals(3, navs.size());
+ RequestContext.setCurrentInstance(requestContext);
+ ns.destroyNavigation(nav);
+ navs = userPortal.getNavigations();
+ assertEquals(2, navs.size());
+ RequestContext.setCurrentInstance(null);
+ }
+}
Added: portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/configuration.xml
===================================================================
--- portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/configuration.xml (rev 0)
+++ portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/configuration.xml 2011-09-23 09:45:45 UTC (rev 7497)
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 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.
+ -->
+
+<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.portal.config.UserPortalConfigService</target-component>
+ <component-plugin>
+ <name>new.portal.config.user.listener</name>
+ <set-method>initListener</set-method>
+ <type>org.exoplatform.portal.config.NewPortalConfigListener</type>
+ <init-params>
+ <value-param>
+ <name>default.portal</name>
+ <value>classic</value>
+ </value-param>
+ <value-param>
+ <name>initializing.failure.ignore</name>
+ <value>true</value>
+ </value-param>
+ <object-param>
+ <name>portal.configuration</name>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>classic</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>portal</string>
+ </field>
+ <field name="templateLocation">
+ <string>classpath:/org/exoplatform/web/portal</string>
+ </field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>group.configuration</name>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>/platform</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>group</string>
+ </field>
+ <field name="templateLocation">
+ <string>classpath:/org/exoplatform/web/portal</string>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.organization.OrganizationService</target-component>
+ <component-plugin>
+ <name>init.service.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.services.organization.OrganizationDatabaseInitializer</type>
+ <init-params>
+ <value-param>
+ <name>checkDatabaseAlgorithm</name>
+ <value>entry</value>
+ </value-param>
+ <value-param>
+ <name>printInformation</name>
+ <value>true</value>
+ </value-param>
+ <object-param>
+ <name>configuration</name>
+ <object type="org.exoplatform.services.organization.OrganizationConfig">
+ <field name="membershipType">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
+ <field name="type"><string>member</string></field>
+ <field name="description"><string>member membership type</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+
+ <field name="group">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name"><string>platform</string></field>
+ <field name="parentId"><string></string></field>
+ <field name="description"><string>the /platform group</string></field>
+ <field name="label"><string>Platform</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+
+ <field name="user">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field name="userName"><string>root</string></field>
+ <field name="password"><string>gtn</string></field>
+ <field name="firstName"><string>Root</string></field>
+ <field name="lastName"><string>Root</string></field>
+ <field name="email"><string>root@localhost</string></field>
+ <field name="groups"><string>member:/platform</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+
+ </external-component-plugins>
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.listener.ListenerService</target-component>
+ <component-plugin>
+ <name>org.exoplatform.portal.mop.navigation.navigation_created</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.web.portal.RefreshCurrentUserPortal</type>
+ </component-plugin>
+ <component-plugin>
+ <name>org.exoplatform.portal.mop.navigation.navigation_updated</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.web.portal.RefreshCurrentUserPortal</type>
+ </component-plugin>
+ <component-plugin>
+ <name>org.exoplatform.portal.mop.navigation.navigation_destroyed</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.web.portal.RefreshCurrentUserPortal</type>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
Added: portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/group/platform/group.xml
===================================================================
--- portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/group/platform/group.xml (rev 0)
+++ portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/group/platform/group.xml 2011-09-23 09:45:45 UTC (rev 7497)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 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.
+ -->
+
+<portal-config>
+ <portal-name>platform</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <label>Foo</label>
+ <description>This is platform portal for testing</description>
+ <portal-layout>
+ </portal-layout>
+</portal-config>
Added: portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/group/platform/pages.xml
===================================================================
--- portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/group/platform/pages.xml (rev 0)
+++ portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/group/platform/pages.xml 2011-09-23 09:45:45 UTC (rev 7497)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 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.
+ -->
+
+<page-set>
+</page-set>
Added: portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/portal/classic/navigation.xml
===================================================================
--- portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/portal/classic/navigation.xml (rev 0)
+++ portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/portal/classic/navigation.xml 2011-09-23 09:45:45 UTC (rev 7497)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2011 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.
+ -->
+
+<node-navigation>
+</node-navigation>
Added: portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/portal/classic/pages.xml
===================================================================
--- portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/portal/classic/pages.xml (rev 0)
+++ portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/portal/classic/pages.xml 2011-09-23 09:45:45 UTC (rev 7497)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 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.
+ -->
+
+<page-set>
+</page-set>
Added: portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/portal/classic/portal.xml
===================================================================
--- portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/portal/classic/portal.xml (rev 0)
+++ portal/trunk/component/web/controller/src/test/resources/org/exoplatform/web/portal/portal/classic/portal.xml 2011-09-23 09:45:45 UTC (rev 7497)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 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.
+ -->
+
+<portal-config>
+ <portal-name>classic</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <label>Classic</label>
+ <description>This is classic portal for testing</description>
+ <portal-layout>
+ </portal-layout>
+</portal-config>
Modified: portal/trunk/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
===================================================================
--- portal/trunk/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -182,8 +182,8 @@
private UserPortal getUserPortal()
{
- UIPortalApplication uiApp = Util.getUIPortalApplication();
- return uiApp.getUserPortalConfig().getUserPortal();
+ PortalRequestContext prc = Util.getPortalRequestContext();
+ return prc.getUserPortalConfig().getUserPortal();
}
/**
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -97,7 +97,7 @@
public void loadNavigations() throws Exception
{
- UserPortal userPortal = Util.getUIPortalApplication().getUserPortalConfig().getUserPortal();
+ UserPortal userPortal = Util.getPortalRequestContext().getUserPortalConfig().getUserPortal();
List<UserNavigation> allNavs = userPortal.getNavigations();
List<UserNavigation> groupNav = new ArrayList<UserNavigation>();
@@ -154,7 +154,7 @@
{
public void execute(Event<UIGroupNavigationManagement> event) throws Exception
{
- UserPortal userPortal = Util.getUIPortalApplication().getUserPortalConfig().getUserPortal();
+ UserPortal userPortal = Util.getPortalRequestContext().getUserPortalConfig().getUserPortal();
UIGroupNavigationManagement uicomp = event.getSource();
WebuiRequestContext context = event.getRequestContext();
UIApplication uiApplication = context.getUIApplication();
@@ -192,7 +192,7 @@
@Override
protected void doEdit(UserNavigation nav, Event<UIGroupNavigationManagement> event) throws Exception
{
- UserPortal userPortal = Util.getUIPortalApplication().getUserPortalConfig().getUserPortal();
+ UserPortal userPortal = Util.getPortalRequestContext().getUserPortalConfig().getUserPortal();
UIGroupNavigationManagement uicomp = event.getSource();
SiteKey siteKey = nav.getKey();
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/BasePartialUpdateToolbar.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/BasePartialUpdateToolbar.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/BasePartialUpdateToolbar.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -28,6 +28,7 @@
import javax.portlet.ResourceRequest;
import javax.portlet.ResourceURL;
+import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.navigation.GenericScope;
import org.exoplatform.portal.mop.navigation.NodeChange;
@@ -193,8 +194,8 @@
protected UserPortal getUserPortal()
{
- UIPortalApplication uiApp = Util.getUIPortalApplication();
- return uiApp.getUserPortalConfig().getUserPortal();
+ PortalRequestContext prc = Util.getPortalRequestContext();
+ return prc.getUserPortalConfig().getUserPortal();
}
protected UserNode getSelectedNode() throws Exception
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml 2011-09-23 09:45:45 UTC (rev 7497)
@@ -470,4 +470,23 @@
</component-plugin>
</external-component-plugins>
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.listener.ListenerService</target-component>
+ <component-plugin>
+ <name>org.exoplatform.portal.mop.navigation.navigation_created</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.web.portal.RefreshCurrentUserPortal</type>
+ </component-plugin>
+ <component-plugin>
+ <name>org.exoplatform.portal.mop.navigation.navigation_updated</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.web.portal.RefreshCurrentUserPortal</type>
+ </component-plugin>
+ <component-plugin>
+ <name>org.exoplatform.portal.mop.navigation.navigation_destroyed</name>
+ <set-method>addListener</set-method>
+ <type>org.exoplatform.web.portal.RefreshCurrentUserPortal</type>
+ </component-plugin>
+ </external-component-plugins>
+
</configuration>
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -33,6 +33,7 @@
import org.exoplatform.portal.mop.SiteType;
import org.exoplatform.portal.mop.user.UserNavigation;
import org.exoplatform.portal.mop.user.UserNode;
+import org.exoplatform.portal.mop.user.UserPortal;
import org.exoplatform.portal.mop.user.UserPortalContext;
import org.exoplatform.web.url.navigation.NodeURL;
import org.exoplatform.web.url.navigation.NavigationResource;
@@ -266,6 +267,19 @@
return url;
}
+ public UserPortal getUserPortal()
+ {
+ UserPortalConfig upc = getUserPortalConfig();
+ if (upc != null)
+ {
+ return upc.getUserPortal();
+ }
+ else
+ {
+ return null;
+ }
+ }
+
public UserPortalConfig getUserPortalConfig()
{
if (userPortalConfig == null)
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNavigationForm.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNavigationForm.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNavigationForm.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -147,7 +147,7 @@
// Check existed
PortalRequestContext prContext = Util.getPortalRequestContext();
- UserPortal userPortal = Util.getUIPortalApplication().getUserPortalConfig().getUserPortal();
+ UserPortal userPortal = prContext.getUserPortalConfig().getUserPortal();
userNav = userPortal.getNavigation(userNav.getKey());
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNodeSelector.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNodeSelector.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNodeSelector.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -55,7 +55,7 @@
uiTree.setBeanIconField("icon");
uiTree.setBeanChildCountField("childrenCount");
- userPortal = Util.getUIPortalApplication().getUserPortalConfig().getUserPortal();
+ userPortal = Util.getPortalRequestContext().getUserPortalConfig().getUserPortal();
}
public void configure(UserNode node) throws Exception
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -19,11 +19,6 @@
package org.exoplatform.portal.webui.navigation;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.SiteType;
import org.exoplatform.portal.mop.Visibility;
import org.exoplatform.portal.mop.navigation.NodeChange;
@@ -33,16 +28,17 @@
import org.exoplatform.portal.mop.user.UserNode;
import org.exoplatform.portal.mop.user.UserNodeFilterConfig;
import org.exoplatform.portal.mop.user.UserPortal;
-import org.exoplatform.portal.webui.portal.PageNodeEvent;
import org.exoplatform.portal.webui.portal.UIPortal;
import org.exoplatform.portal.webui.util.Util;
-import org.exoplatform.portal.webui.workspace.UIPortalApplication;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
/**
* Created by The eXo Platform SARL Author : Dang Van Minh minhdv81(a)yahoo.com
@@ -134,7 +130,7 @@
}
else
{
- UserPortal userPortal = Util.getUIPortalApplication().getUserPortalConfig().getUserPortal();
+ UserPortal userPortal = Util.getPortalRequestContext().getUserPortalConfig().getUserPortal();
List<UserNavigation> navigations = userPortal.getNavigations();
for (UserNavigation userNav : navigations)
{
@@ -157,7 +153,7 @@
{
treeNode_ = new TreeNode();
- UserPortal userPortal = Util.getUIPortalApplication().getUserPortalConfig().getUserPortal();
+ UserPortal userPortal = Util.getPortalRequestContext().getUserPortalConfig().getUserPortal();
List<UserNavigation> listNavigations = userPortal.getNavigations();
List<UserNode> childNodes = new LinkedList<UserNode>();
@@ -186,7 +182,7 @@
public UserNode resolvePath(String path) throws Exception
{
WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
- UserPortal userPortal = Util.getUIPortalApplication().getUserPortalConfig().getUserPortal();
+ UserPortal userPortal = Util.getPortalRequestContext().getUserPortalConfig().getUserPortal();
UserNode node;
if (context.getRemoteUser() != null)
@@ -212,7 +208,7 @@
{
return null;
}
- UserPortal userPortal = Util.getUIPortalApplication().getUserPortalConfig().getUserPortal();
+ UserPortal userPortal = Util.getPortalRequestContext().getUserPortalConfig().getUserPortal();
NodeChangeQueue<UserNode> queue = new NodeChangeQueue<UserNode>();
userPortal.updateNode(node, navigationScope, queue);
for (NodeChange<UserNode> change : queue)
@@ -300,7 +296,7 @@
private UserNode getCurrentNavigation() throws Exception
{
- UserPortal userPortal = Util.getUIPortalApplication().getUserPortalConfig().getUserPortal();
+ UserPortal userPortal = Util.getPortalRequestContext().getUserPortalConfig().getUserPortal();
UserNavigation userNavigation = Util.getUIPortal().getUserNavigation();
try
{
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -59,10 +59,10 @@
{
public void execute(Event<UIPortalApplication> event) throws Exception
{
+ PortalRequestContext pcontext = PortalRequestContext.getCurrentInstance();
+ UserPortal userPortal = pcontext.getUserPortalConfig().getUserPortal();
UIPortalApplication uiPortalApp = event.getSource();
- UserPortal userPortal = uiPortalApp.getUserPortalConfig().getUserPortal();
UIPortal showedUIPortal = uiPortalApp.getCurrentSite();
- PortalRequestContext pcontext = PortalRequestContext.getCurrentInstance();
UserNodeFilterConfig.Builder builder = UserNodeFilterConfig.builder();
builder.withReadCheck();
@@ -144,14 +144,14 @@
DataStorage storageService = uiPortalApp.getApplicationComponent(DataStorage.class);
PortalConfig associatedPortalConfig = storageService.getPortalConfig(targetNav.getKey().getTypeName(), targetNav.getKey().getName());
- UserPortalConfig userPortalConfig = uiPortalApp.getUserPortalConfig();
+ UserPortalConfig userPortalConfig = pcontext.getUserPortalConfig();
//Update layout-related data on UserPortalConfig
userPortalConfig.setPortalConfig(associatedPortalConfig);
}
else
{
- showedUIPortal = buildUIPortal(targetNav.getKey(), uiPortalApp, uiPortalApp.getUserPortalConfig());
+ showedUIPortal = buildUIPortal(targetNav.getKey(), uiPortalApp, pcontext.getUserPortalConfig());
if(showedUIPortal == null)
{
return;
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -341,8 +341,8 @@
*/
private void removePageNode(Page page, Event<UIPageBrowser> event) throws Exception
{
- UIPortalApplication portalApplication = Util.getUIPortalApplication();
- UserPortal userPortal = portalApplication.getUserPortalConfig().getUserPortal();
+ PortalRequestContext prc = Util.getPortalRequestContext();
+ UserPortal userPortal = prc.getUserPortalConfig().getUserPortal();
UserNavigation userNav = userPortal.getNavigation(SiteKey.user(event.getRequestContext().getRemoteUser()));
UserNode rootNode = userPortal.getNode(userNav, Scope.CHILDREN, null, null);
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -111,7 +111,7 @@
DataStorage dataService = getApplicationComponent(DataStorage.class);
dataService.create(page);
- UserPortal userPortal = Util.getUIPortalApplication().getUserPortalConfig().getUserPortal();
+ UserPortal userPortal = Util.getPortalRequestContext().getUserPortalConfig().getUserPortal();
userPortal.saveNode(selectedNode, null);
DescriptionService descriptionService = getApplicationComponent(DescriptionService.class);
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -168,8 +168,8 @@
{
if (navPath == null)
{
- UIPortalApplication uiApp = Util.getUIPortalApplication();
- navPath = uiApp.getUserPortalConfig().getUserPortal().getDefaultPath(null);
+ PortalRequestContext prc = Util.getPortalRequestContext();
+ navPath = prc.getUserPortalConfig().getUserPortal().getDefaultPath(null);
}
return navPath;
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -212,7 +212,7 @@
//caught in the ApplicationLifecycle
rebuildUIPortal(uiPortalApp, editPortal, dataStorage);
}
- uiPortalApp.getUserPortalConfig().setPortalConfig(portalConfig);
+ prContext.getUserPortalConfig().setPortalConfig(portalConfig);
PortalConfig pConfig = dataStorage.getPortalConfig(portalName);
if (pConfig != null)
{
@@ -254,7 +254,7 @@
private void rebuildUIPortal(UIPortalApplication uiPortalApp, UIPortal uiPortal, DataStorage storage) throws Exception
{
PortalConfig portalConfig = storage.getPortalConfig(uiPortal.getSiteType().getName(), uiPortal.getName());
- UserPortalConfig userPortalConfig = uiPortalApp.getUserPortalConfig();
+ UserPortalConfig userPortalConfig = Util.getPortalRequestContext().getUserPortalConfig();
userPortalConfig.setPortalConfig(portalConfig);
uiPortal.getChildren().clear();
PortalDataMapper.toUIPortal(uiPortal, userPortalConfig.getPortalConfig());
@@ -479,10 +479,10 @@
storage.getPortalConfig(uiPortal.getSiteKey().getTypeName(), uiPortal.getSiteKey().getName());
if (pConfig != null)
{
- uiPortalApp.getUserPortalConfig().setPortalConfig(pConfig);
+ prContext.getUserPortalConfig().setPortalConfig(pConfig);
}
uiPortal.getChildren().clear();
- PortalDataMapper.toUIPortal(uiPortal, uiPortalApp.getUserPortalConfig().getPortalConfig());
+ PortalDataMapper.toUIPortal(uiPortal, prContext.getUserPortalConfig().getPortalConfig());
//Update the cache of UIPortal from UIPortalApplication
uiPortalApp.putCachedUIPortal(uiPortal);
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -331,7 +331,7 @@
UserPortalConfigService service = uiForm.getApplicationComponent(UserPortalConfigService.class);
if (prContext.getPortalOwner().equals(uiForm.getPortalOwner()))
{
- uiPortalApp.setUserPortalConfig(service.getUserPortalConfig(uiForm.getPortalOwner(), prContext.getRemoteUser(), PortalRequestContext.USER_PORTAL_CONTEXT));
+ prContext.setUserPortalConfig(service.getUserPortalConfig(uiForm.getPortalOwner(), prContext.getRemoteUser(), PortalRequestContext.USER_PORTAL_CONTEXT));
uiPortalApp.reloadPortalProperties();
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -169,7 +169,7 @@
private UserNode resolveNode(UserNode selectedNode, UserNodeFilterConfig filterConfig) throws Exception
{
UserNavigation currNav = selectedNode.getNavigation();
- UserPortal userPortal = Util.getUIPortalApplication().getUserPortalConfig().getUserPortal();
+ UserPortal userPortal = Util.getPortalRequestContext().getUserPortalConfig().getUserPortal();
if (currNav.getKey().getType().equals(SiteType.USER))
{
return userPortal.getNode(currNav, Scope.CHILDREN, filterConfig, null);
Modified: portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java
===================================================================
--- portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java 2011-09-23 09:21:37 UTC (rev 7496)
+++ portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java 2011-09-23 09:45:45 UTC (rev 7497)
@@ -20,6 +20,7 @@
package org.exoplatform.webui.application.portlet;
import org.exoplatform.commons.utils.WriterPrinter;
+import org.exoplatform.portal.mop.user.UserPortal;
import org.exoplatform.services.resources.Orientation;
import org.exoplatform.web.application.RequestContext;
import org.exoplatform.web.application.URLBuilder;
@@ -211,6 +212,12 @@
((ActionResponse)response_).sendRedirect(url);
}
+ @Override
+ public UserPortal getUserPortal()
+ {
+ return getParentAppRequestContext().getUserPortal();
+ }
+
public boolean hasProcessAction()
{
return hasProcessAction_;
13 years, 3 months
gatein SVN: r7496 - in components/pc/trunk/portlet/src: main/resources and 1 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-09-23 05:21:37 -0400 (Fri, 23 Sep 2011)
New Revision: 7496
Removed:
components/pc/trunk/portlet/src/main/resources/portlet-app_1_0.xsd
components/pc/trunk/portlet/src/test/resources/metadata/portlet-app_1_0.xsd
components/pc/trunk/portlet/src/test/resources/metadata/portlet-app_2_0.xsd
Modified:
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/xml/XSD.java
Log:
remove useless xsd files
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/xml/XSD.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/xml/XSD.java 2011-09-23 08:35:39 UTC (rev 7495)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/xml/XSD.java 2011-09-23 09:21:37 UTC (rev 7496)
@@ -24,7 +24,6 @@
import org.w3c.dom.bootstrap.DOMImplementationRegistry;
import org.w3c.dom.ls.DOMImplementationLS;
import org.w3c.dom.ls.LSInput;
-import org.w3c.dom.ls.LSParser;
import org.w3c.dom.ls.LSResourceResolver;
import org.xml.sax.SAXException;
@@ -35,7 +34,6 @@
import javax.xml.validation.Validator;
import java.io.IOException;
import java.io.InputStream;
-import java.io.Reader;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
Deleted: components/pc/trunk/portlet/src/main/resources/portlet-app_1_0.xsd
===================================================================
--- components/pc/trunk/portlet/src/main/resources/portlet-app_1_0.xsd 2011-09-23 08:35:39 UTC (rev 7495)
+++ components/pc/trunk/portlet/src/main/resources/portlet-app_1_0.xsd 2011-09-23 09:21:37 UTC (rev 7496)
@@ -1,632 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema targetNamespace="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:portlet="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0" xml:lang="en">
- <annotation>
- <documentation>
- This is the XML Schema for the Portlet 1.0 deployment descriptor.
- </documentation>
- </annotation>
- <annotation>
- <documentation>
- The following conventions apply to all J2EE
- deployment descriptor elements unless indicated otherwise.
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
- </documentation>
- </annotation>
- <!-- *********************************************************** -->
- <import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
- <element name="portlet-app" type="portlet:portlet-appType">
- <annotation>
- <documentation>
- The portlet-app element is the root of the deployment descriptor
- for a portlet application. This element has a required attribute version
- to specify to which version of the schema the deployment descriptor
- conforms.
- </documentation>
- </annotation>
- <unique name="portlet-name-uniqueness">
- <annotation>
- <documentation>
- The portlet element contains the name of a portlet.
- This name must be unique within the portlet application.
- </documentation>
- </annotation>
- <selector xpath="portlet:portlet"/>
- <field xpath="portlet:portlet-name"/>
- </unique>
- <unique name="custom-portlet-mode-uniqueness">
- <annotation>
- <documentation>
- The custom-portlet-mode element contains the portlet-mode.
- This portlet mode must be unique within the portlet application.
- </documentation>
- </annotation>
- <selector xpath="portlet:custom-portlet-mode"/>
- <field xpath="portlet:portlet-mode"/>
- </unique>
- <unique name="custom-window-state-uniqueness">
- <annotation>
- <documentation>
- The custom-window-state element contains the window-state.
- This window state must be unique within the portlet application.
- </documentation>
- </annotation>
- <selector xpath="portlet:custom-window-state"/>
- <field xpath="portlet:window-state"/>
- </unique>
- <unique name="user-attribute-name-uniqueness">
- <annotation>
- <documentation>
- The user-attribute element contains the name the attribute.
- This name must be unique within the portlet application.
- </documentation>
- </annotation>
- <selector xpath="portlet:user-attribute"/>
- <field xpath="portlet:name"/>
- </unique>
- </element>
- <complexType name="portlet-appType">
- <sequence>
- <element name="portlet" type="portlet:portletType" minOccurs="0" maxOccurs="unbounded">
- <unique name="init-param-name-uniqueness">
- <annotation>
- <documentation>
- The init-param element contains the name the attribute.
- This name must be unique within the portlet.
- </documentation>
- </annotation>
- <selector xpath="portlet:init-param"/>
- <field xpath="portlet:name"/>
- </unique>
- <unique name="supports-mime-type-uniqueness">
- <annotation>
- <documentation>
- The supports element contains the supported mime-type.
- This mime type must be unique within the portlet.
- </documentation>
- </annotation>
- <selector xpath="portlet:supports"/>
- <field xpath="mime-type"/>
- </unique>
- <unique name="preference-name-uniqueness">
- <annotation>
- <documentation>
- The preference element contains the name the preference.
- This name must be unique within the portlet.
- </documentation>
- </annotation>
- <selector xpath="portlet:portlet-preferences/portlet:preference"/>
- <field xpath="portlet:name"/>
- </unique>
- <unique name="security-role-ref-name-uniqueness">
- <annotation>
- <documentation>
- The security-role-ref element contains the role-name.
- This role name must be unique within the portlet.
- </documentation>
- </annotation>
- <selector xpath="portlet:security-role-ref"/>
- <field xpath="portlet:role-name"/>
- </unique>
- </element>
- <element name="custom-portlet-mode" type="portlet:custom-portlet-modeType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="custom-window-state" type="portlet:custom-window-stateType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="user-attribute" type="portlet:user-attributeType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="security-constraint" type="portlet:security-constraintType" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="version" type="string" use="required"/>
- <attribute name="id" type="string" use="optional"/>
- </complexType>
- <complexType name="custom-portlet-modeType">
- <annotation>
- <documentation>
- A custom portlet mode that one or more portlets in
- this portlet application supports.
- Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="portlet-mode" type="portlet:portlet-modeType"/>
- </sequence>
- <attribute name="id" type="string" use="optional"/>
- </complexType>
- <complexType name="custom-window-stateType">
- <annotation>
- <documentation>
- A custom window state that one or more portlets in this
- portlet application supports.
- Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="window-state" type="portlet:window-stateType"/>
- </sequence>
- <attribute name="id" type="string" use="optional"/>
- </complexType>
- <complexType name="expiration-cacheType">
- <annotation>
- <documentation>
- Expriation-cache defines expiration-based caching for this
- portlet. The parameter indicates
- the time in seconds after which the portlet output expires.
- -1 indicates that the output never expires.
- Used in: portlet
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="int"/>
- </simpleContent>
- </complexType>
- <complexType name="init-paramType">
- <annotation>
- <documentation>
- The init-param element contains a name/value pair as an
- initialization param of the portlet
- Used in:portlet
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="name" type="portlet:nameType"/>
- <element name="value" type="portlet:valueType"/>
- </sequence>
- <attribute name="id" type="string" use="optional"/>
- </complexType>
- <complexType name="keywordsType">
- <annotation>
- <documentation>
- Locale specific keywords associated with this portlet.
- The kewords are separated by commas.
- Used in: portlet-info
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string"/>
- </simpleContent>
- </complexType>
- <complexType name="mime-typeType">
- <annotation>
- <documentation>
- MIME type name, e.g. "text/html".
- The MIME type may also contain the wildcard
- character '*', like "text/*" or "*/*".
- Used in: supports
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string"/>
- </simpleContent>
- </complexType>
- <complexType name="nameType">
- <annotation>
- <documentation>
- The name element contains the name of a parameter.
- Used in: init-param, ...
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string"/>
- </simpleContent>
- </complexType>
- <complexType name="portletType">
- <annotation>
- <documentation>
- The portlet element contains the declarative data of a portlet.
- Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="portlet-name" type="portlet:portlet-nameType"/>
- <element name="display-name" type="portlet:display-nameType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="portlet-class" type="portlet:portlet-classType"/>
- <element name="init-param" type="portlet:init-paramType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="expiration-cache" type="portlet:expiration-cacheType" minOccurs="0"/>
- <element name="supports" type="portlet:supportsType" maxOccurs="unbounded"/>
- <element name="supported-locale" type="portlet:supported-localeType" minOccurs="0" maxOccurs="unbounded"/>
- <choice>
- <sequence>
- <element name="resource-bundle" type="portlet:resource-bundleType"/>
- <element name="portlet-info" type="portlet:portlet-infoType" minOccurs="0"/>
- </sequence>
- <element name="portlet-info" type="portlet:portlet-infoType"/>
- </choice>
- <element name="portlet-preferences" type="portlet:portlet-preferencesType" minOccurs="0"/>
- <element name="security-role-ref" type="portlet:security-role-refType" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="id" type="string" use="optional"/>
- </complexType>
- <simpleType name="portlet-classType">
- <annotation>
- <documentation>
- The portlet-class element contains the fully
- qualified class name of the portlet.
- Used in: portlet
- </documentation>
- </annotation>
- <restriction base="portlet:fully-qualified-classType"/>
- </simpleType>
- <complexType name="portlet-collectionType">
- <annotation>
- <documentation>
- The portlet-collectionType is used to identify a subset
- of portlets within a portlet application to which a
- security constraint applies.
- Used in: security-constraint
- </documentation>
- </annotation>
- <sequence>
- <element name="portlet-name" type="portlet:portlet-nameType" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- <complexType name="portlet-infoType">
- <sequence>
- <element name="title" type="portlet:titleType"/>
- <element name="short-title" type="portlet:short-titleType" minOccurs="0"/>
- <element name="keywords" type="portlet:keywordsType" minOccurs="0"/>
- </sequence>
- <attribute name="id" type="string" use="optional"/>
- </complexType>
- <complexType name="portlet-modeType">
- <annotation>
- <documentation>
- Portlet modes. The specification pre-defines the following values
- as valid portlet mode constants:
- "edit", "help", "view".
- Portlet mode names are not case sensitive.
- Used in: custom-portlet-mode, supports
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string"/>
- </simpleContent>
- </complexType>
- <complexType name="portlet-nameType">
- <annotation>
- <documentation>
- The portlet-name element contains the canonical name of the
- portlet. Each portlet name is unique within the portlet
- application.
- Used in: portlet, portlet-mapping
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string"/>
- </simpleContent>
- </complexType>
- <complexType name="portlet-preferencesType">
- <annotation>
- <documentation>
- Portlet persistent preference store.
- Used in: portlet
- </documentation>
- </annotation>
- <sequence>
- <element name="preference" type="portlet:preferenceType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="preferences-validator" type="portlet:preferences-validatorType" minOccurs="0"/>
- </sequence>
- <attribute name="id" type="string" use="optional"/>
- </complexType>
- <complexType name="preferenceType">
- <annotation>
- <documentation>
- Persistent preference values that may be used for customization
- and personalization by the portlet.
- Used in: portlet-preferences
- </documentation>
- </annotation>
- <sequence>
- <element name="name" type="portlet:nameType"/>
- <element name="value" type="portlet:valueType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="read-only" type="portlet:read-onlyType" minOccurs="0"/>
- </sequence>
- <attribute name="id" type="string" use="optional"/>
- </complexType>
- <simpleType name="preferences-validatorType">
- <annotation>
- <documentation>
- The class specified under preferences-validator implements
- the PreferencesValidator interface to validate the
- preferences settings.
- Used in: portlet-preferences
- </documentation>
- </annotation>
- <restriction base="portlet:fully-qualified-classType"/>
- </simpleType>
- <simpleType name="read-onlyType">
- <annotation>
- <documentation>
- read-only indicates that a setting cannot
- be changed in any of the standard portlet modes
- ("view","edit" or "help").
- Per default all preferences are modifiable.
- Valid values are:
- - true for read-only
- - false for modifiable
- Used in: preferences
- </documentation>
- </annotation>
- <restriction base="portlet:string">
- <enumeration value="true"/>
- <enumeration value="false"/>
- </restriction>
- </simpleType>
- <complexType name="resource-bundleType">
- <annotation>
- <documentation>
- Filename of the resource bundle containing the language specific
- portlet informations in different languages.
- Used in: portlet-info
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string"/>
- </simpleContent>
- </complexType>
- <complexType name="role-linkType">
- <annotation>
- <documentation>
- The role-link element is a reference to a defined security role.
- The role-link element must contain the name of one of the
- security roles defined in the security-role elements.
- Used in: security-role-ref
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string"/>
- </simpleContent>
- </complexType>
- <complexType name="security-constraintType">
- <annotation>
- <documentation>
- The security-constraintType is used to associate
- intended security constraints with one or more portlets.
- Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="display-name" type="portlet:display-nameType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="portlet-collection" type="portlet:portlet-collectionType"/>
- <element name="user-data-constraint" type="portlet:user-data-constraintType"/>
- </sequence>
- <attribute name="id" type="string" use="optional"/>
- </complexType>
- <complexType name="security-role-refType">
- <annotation>
- <documentation>
- The security-role-ref element contains the declaration of a
- security role reference in the code of the web application. The
- declaration consists of an optional description, the security
- role name used in the code, and an optional link to a security
- role. If the security role is not specified, the Deployer must
- choose an appropriate security role.
- The value of the role name element must be the String used
- as the parameter to the
- EJBContext.isCallerInRole(String roleName) method
- or the HttpServletRequest.isUserInRole(String role) method.
- Used in: portlet
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="role-name" type="portlet:role-nameType"/>
- <element name="role-link" type="portlet:role-linkType" minOccurs="0"/>
- </sequence>
- <attribute name="id" type="string" use="optional"/>
- </complexType>
- <complexType name="short-titleType">
- <annotation>
- <documentation>
- Locale specific short version of the static title.
- Used in: portlet-info
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string"/>
- </simpleContent>
- </complexType>
- <complexType name="supportsType">
- <annotation>
- <documentation>
- Supports indicates the portlet modes a
- portlet supports for a specific content type. All portlets must
- support the view mode.
- Used in: portlet
- </documentation>
- </annotation>
- <sequence>
- <element name="mime-type" type="portlet:mime-typeType"/>
- <element name="portlet-mode" type="portlet:portlet-modeType" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="id" type="string" use="optional"/>
- </complexType>
- <complexType name="supported-localeType">
- <annotation>
- <documentation>
- Indicated the locales the portlet supports.
- Used in: portlet
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string"/>
- </simpleContent>
- </complexType>
- <complexType name="titleType">
- <annotation>
- <documentation>
- Locale specific static title for this portlet.
- Used in: portlet-info
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string"/>
- </simpleContent>
- </complexType>
- <simpleType name="transport-guaranteeType">
- <annotation>
- <documentation>
- The transport-guaranteeType specifies that
- the communication between client and portlet should
- be NONE, INTEGRAL, or CONFIDENTIAL.
- NONE means that the portlet does not
- require any transport guarantees. A value of
- INTEGRAL means that the portlet requires that the
- data sent between the client and portlet be sent in
- such a way that it can't be changed in transit.
- CONFIDENTIAL means that the portlet requires
- that the data be transmitted in a fashion that
- prevents other entities from observing the contents
- of the transmission.
- In most cases, the presence of the INTEGRAL or
- CONFIDENTIAL flag will indicate that the use
- of SSL is required.
- Used in: user-data-constraint
- </documentation>
- </annotation>
- <restriction base="portlet:string">
- <enumeration value="NONE"/>
- <enumeration value="INTEGRAL"/>
- <enumeration value="CONFIDENTIAL"/>
- </restriction>
- </simpleType>
- <complexType name="user-attributeType">
- <annotation>
- <documentation>
- User attribute defines a user specific attribute that the
- portlet application needs. The portlet within this application
- can access this attribute via the request parameter USER_INFO
- map.
- Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="name" type="portlet:nameType"/>
- </sequence>
- <attribute name="id" type="string" use="optional"/>
- </complexType>
- <complexType name="user-data-constraintType">
- <annotation>
- <documentation>
- The user-data-constraintType is used to indicate how
- data communicated between the client and portlet should be
- protected.
- Used in: security-constraint
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="transport-guarantee" type="portlet:transport-guaranteeType"/>
- </sequence>
- <attribute name="id" type="string" use="optional"/>
- </complexType>
- <complexType name="valueType">
- <annotation>
- <documentation>
- The value element contains the value of a parameter.
- Used in: init-param
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string"/>
- </simpleContent>
- </complexType>
- <complexType name="window-stateType">
- <annotation>
- <documentation>
- Portlet window state. Window state names are not case sensitive.
- Used in: custom-window-state
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string"/>
- </simpleContent>
- </complexType>
- <!--- everything below is copied from j2ee_1_4.xsd -->
- <complexType name="descriptionType">
- <annotation>
- <documentation>
- The description element is used to provide text describing the
- parent element. The description element should include any
- information that the portlet application war file producer wants
- to provide to the consumer of the portlet application war file
- (i.e., to the Deployer). Typically, the tools used by the
- portlet application war file consumer will display the
- description when processing the parent element that contains the
- description. It has an optional attribute xml:lang to indicate
- which language is used in the description according to
- RFC 1766 (http://www.ietf.org/rfc/rfc1766.txt). The default
- value of this attribute is English(“en”).
- Used in: init-param, portlet, portlet-app, security-role
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string">
- <attribute ref="xml:lang"/>
- </extension>
- </simpleContent>
- </complexType>
- <complexType name="display-nameType">
- <annotation>
- <documentation>
- The display-name type contains a short name that is intended
- to be displayed by tools. It is used by display-name
- elements. The display name need not be unique.
- Example:
- ...
- <display-name xml:lang="en">Employee Self Service</display-name>
-
- It has an optional attribute xml:lang to indicate
- which language is used in the description according to
- RFC 1766 (http://www.ietf.org/rfc/rfc1766.txt). The default
- value of this attribute is English(“en”).
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="portlet:string">
- <attribute ref="xml:lang"/>
- </extension>
- </simpleContent>
- </complexType>
- <simpleType name="fully-qualified-classType">
- <annotation>
- <documentation>
- The elements that use this type designate the name of a
- Java class or interface.
- </documentation>
- </annotation>
- <restriction base="portlet:string"/>
- </simpleType>
- <simpleType name="role-nameType">
- <annotation>
- <documentation>
- The role-nameType designates the name of a security role.
-
- The name must conform to the lexical rules for an NMTOKEN.
- </documentation>
- </annotation>
- <restriction base="NMTOKEN"/>
- </simpleType>
- <simpleType name="string">
- <annotation>
- <documentation>
- This is a special string datatype that is defined by J2EE
- as a base type for defining collapsed strings. When
- schemas require trailing/leading space elimination as
- well as collapsing the existing whitespace, this base
- type may be used.
- </documentation>
- </annotation>
- <restriction base="string">
- <whiteSpace value="collapse"/>
- </restriction>
- </simpleType>
-</schema>
Deleted: components/pc/trunk/portlet/src/test/resources/metadata/portlet-app_1_0.xsd
===================================================================
--- components/pc/trunk/portlet/src/test/resources/metadata/portlet-app_1_0.xsd 2011-09-23 08:35:39 UTC (rev 7495)
+++ components/pc/trunk/portlet/src/test/resources/metadata/portlet-app_1_0.xsd 2011-09-23 09:21:37 UTC (rev 7496)
@@ -1,682 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema
- targetNamespace="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
- xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:portlet="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified" attributeFormDefault="unqualified"
- version="1.0" xml:lang="en">
- <annotation>
- <documentation>
- This is the XML Schema for the Portlet 1.0 deployment
- descriptor.
- </documentation>
- </annotation>
- <annotation>
- <documentation>
- The following conventions apply to all J2EE deployment
- descriptor elements unless indicated otherwise. - In
- elements that specify a pathname to a file within the same
- JAR file, relative filenames (i.e., those not starting with
- "/") are considered relative to the root of the JAR file's
- namespace. Absolute filenames (i.e., those starting with
- "/") also specify names in the root of the JAR file's
- namespace. In general, relative names are preferred. The
- exception is .war files where absolute names are preferred
- for consistency with the Servlet API.
- </documentation>
- </annotation>
- <!-- *********************************************************** -->
- <import namespace="http://www.w3.org/XML/1998/namespace"
- schemaLocation="http://www.w3.org/2001/xml.xsd" />
- <element name="portlet-app" type="portlet:portlet-appType">
- <annotation>
- <documentation>
- The portlet-app element is the root of the deployment
- descriptor for a portlet application. This element has a
- required attribute version to specify to which version
- of the schema the deployment descriptor conforms.
- </documentation>
- </annotation>
- <unique name="portlet-name-uniqueness">
- <annotation>
- <documentation>
- The portlet element contains the name of a portlet.
- This name must be unique within the portlet
- application.
- </documentation>
- </annotation>
- <selector xpath="portlet:portlet" />
- <field xpath="portlet:portlet-name" />
- </unique>
- <unique name="custom-portlet-mode-uniqueness">
- <annotation>
- <documentation>
- The custom-portlet-mode element contains the
- portlet-mode. This portlet mode must be unique
- within the portlet application.
- </documentation>
- </annotation>
- <selector xpath="portlet:custom-portlet-mode" />
- <field xpath="portlet:portlet-mode" />
- </unique>
- <unique name="custom-window-state-uniqueness">
- <annotation>
- <documentation>
- The custom-window-state element contains the
- window-state. This window state must be unique
- within the portlet application.
- </documentation>
- </annotation>
- <selector xpath="portlet:custom-window-state" />
- <field xpath="portlet:window-state" />
- </unique>
- <unique name="user-attribute-name-uniqueness">
- <annotation>
- <documentation>
- The user-attribute element contains the name the
- attribute. This name must be unique within the
- portlet application.
- </documentation>
- </annotation>
- <selector xpath="portlet:user-attribute" />
- <field xpath="portlet:name" />
- </unique>
- </element>
- <complexType name="portlet-appType">
- <sequence>
- <element name="portlet" type="portlet:portletType"
- minOccurs="0" maxOccurs="unbounded">
- <unique name="init-param-name-uniqueness">
- <annotation>
- <documentation>
- The init-param element contains the name the
- attribute. This name must be unique within
- the portlet.
- </documentation>
- </annotation>
- <selector xpath="portlet:init-param" />
- <field xpath="portlet:name" />
- </unique>
- <unique name="supports-mime-type-uniqueness">
- <annotation>
- <documentation>
- The supports element contains the supported
- mime-type. This mime type must be unique
- within the portlet.
- </documentation>
- </annotation>
- <selector xpath="portlet:supports" />
- <field xpath="mime-type" />
- </unique>
- <unique name="preference-name-uniqueness">
- <annotation>
- <documentation>
- The preference element contains the name the
- preference. This name must be unique within
- the portlet.
- </documentation>
- </annotation>
- <selector
- xpath="portlet:portlet-preferences/portlet:preference" />
- <field xpath="portlet:name" />
- </unique>
- <unique name="security-role-ref-name-uniqueness">
- <annotation>
- <documentation>
- The security-role-ref element contains the
- role-name. This role name must be unique
- within the portlet.
- </documentation>
- </annotation>
- <selector xpath="portlet:security-role-ref" />
- <field xpath="portlet:role-name" />
- </unique>
- </element>
- <element name="custom-portlet-mode"
- type="portlet:custom-portlet-modeType" minOccurs="0"
- maxOccurs="unbounded" />
- <element name="custom-window-state"
- type="portlet:custom-window-stateType" minOccurs="0"
- maxOccurs="unbounded" />
- <element name="user-attribute"
- type="portlet:user-attributeType" minOccurs="0"
- maxOccurs="unbounded" />
- <element name="security-constraint"
- type="portlet:security-constraintType" minOccurs="0"
- maxOccurs="unbounded" />
- </sequence>
- <attribute name="version" type="string" use="required" />
- <attribute name="id" type="string" use="optional" />
- </complexType>
- <complexType name="custom-portlet-modeType">
- <annotation>
- <documentation>
- A custom portlet mode that one or more portlets in this
- portlet application supports. Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType"
- minOccurs="0" maxOccurs="unbounded" />
- <element name="portlet-mode"
- type="portlet:portlet-modeType" />
- </sequence>
- <attribute name="id" type="string" use="optional" />
- </complexType>
- <complexType name="custom-window-stateType">
- <annotation>
- <documentation>
- A custom window state that one or more portlets in this
- portlet application supports. Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType"
- minOccurs="0" maxOccurs="unbounded" />
- <element name="window-state"
- type="portlet:window-stateType" />
- </sequence>
- <attribute name="id" type="string" use="optional" />
- </complexType>
- <complexType name="expiration-cacheType">
- <annotation>
- <documentation>
- Expriation-cache defines expiration-based caching for
- this portlet. The parameter indicates the time in
- seconds after which the portlet output expires. -1
- indicates that the output never expires. Used in:
- portlet
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="int" />
- </simpleContent>
- </complexType>
- <complexType name="init-paramType">
- <annotation>
- <documentation>
- The init-param element contains a name/value pair as an
- initialization param of the portlet Used in:portlet
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType"
- minOccurs="0" maxOccurs="unbounded" />
- <element name="name" type="portlet:nameType" />
- <element name="value" type="portlet:valueType" />
- </sequence>
- <attribute name="id" type="string" use="optional" />
- </complexType>
- <complexType name="keywordsType">
- <annotation>
- <documentation>
- Locale specific keywords associated with this portlet.
- The kewords are separated by commas. Used in:
- portlet-info
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string" />
- </simpleContent>
- </complexType>
- <complexType name="mime-typeType">
- <annotation>
- <documentation>
- MIME type name, e.g. "text/html". The MIME type may also
- contain the wildcard character '*', like "text/*" or
- "*/*". Used in: supports
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string" />
- </simpleContent>
- </complexType>
- <complexType name="nameType">
- <annotation>
- <documentation>
- The name element contains the name of a parameter. Used
- in: init-param, ...
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string" />
- </simpleContent>
- </complexType>
- <complexType name="portletType">
- <annotation>
- <documentation>
- The portlet element contains the declarative data of a
- portlet. Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType"
- minOccurs="0" maxOccurs="unbounded" />
- <element name="portlet-name"
- type="portlet:portlet-nameType" />
- <element name="display-name" type="portlet:display-nameType"
- minOccurs="0" maxOccurs="unbounded" />
- <element name="portlet-class"
- type="portlet:portlet-classType" />
- <element name="init-param" type="portlet:init-paramType"
- minOccurs="0" maxOccurs="unbounded" />
- <element name="expiration-cache"
- type="portlet:expiration-cacheType" minOccurs="0" />
- <element name="supports" type="portlet:supportsType"
- maxOccurs="unbounded" />
- <element name="supported-locale"
- type="portlet:supported-localeType" minOccurs="0"
- maxOccurs="unbounded" />
- <choice>
- <sequence>
- <element name="resource-bundle"
- type="portlet:resource-bundleType" />
- <element name="portlet-info"
- type="portlet:portlet-infoType" minOccurs="0" />
- </sequence>
- <element name="portlet-info"
- type="portlet:portlet-infoType" />
- </choice>
- <element name="portlet-preferences"
- type="portlet:portlet-preferencesType" minOccurs="0" />
- <element name="security-role-ref"
- type="portlet:security-role-refType" minOccurs="0"
- maxOccurs="unbounded" />
- </sequence>
- <attribute name="id" type="string" use="optional" />
- </complexType>
- <simpleType name="portlet-classType">
- <annotation>
- <documentation>
- The portlet-class element contains the fully qualified
- class name of the portlet. Used in: portlet
- </documentation>
- </annotation>
- <restriction base="portlet:fully-qualified-classType" />
- </simpleType>
- <complexType name="portlet-collectionType">
- <annotation>
- <documentation>
- The portlet-collectionType is used to identify a subset
- of portlets within a portlet application to which a
- security constraint applies. Used in:
- security-constraint
- </documentation>
- </annotation>
- <sequence>
- <element name="portlet-name" type="portlet:portlet-nameType"
- maxOccurs="unbounded" />
- </sequence>
- </complexType>
- <complexType name="portlet-infoType">
- <sequence>
- <element name="title" type="portlet:titleType" />
- <element name="short-title" type="portlet:short-titleType"
- minOccurs="0" />
- <element name="keywords" type="portlet:keywordsType"
- minOccurs="0" />
- </sequence>
- <attribute name="id" type="string" use="optional" />
- </complexType>
- <complexType name="portlet-modeType">
- <annotation>
- <documentation>
- Portlet modes. The specification pre-defines the
- following values as valid portlet mode constants:
- "edit", "help", "view". Portlet mode names are not case
- sensitive. Used in: custom-portlet-mode, supports
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string" />
- </simpleContent>
- </complexType>
- <complexType name="portlet-nameType">
- <annotation>
- <documentation>
- The portlet-name element contains the canonical name of
- the portlet. Each portlet name is unique within the
- portlet application. Used in: portlet, portlet-mapping
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string" />
- </simpleContent>
- </complexType>
- <complexType name="portlet-preferencesType">
- <annotation>
- <documentation>
- Portlet persistent preference store. Used in: portlet
- </documentation>
- </annotation>
- <sequence>
- <element name="preference" type="portlet:preferenceType"
- minOccurs="0" maxOccurs="unbounded" />
- <element name="preferences-validator"
- type="portlet:preferences-validatorType" minOccurs="0" />
- </sequence>
- <attribute name="id" type="string" use="optional" />
- </complexType>
- <complexType name="preferenceType">
- <annotation>
- <documentation>
- Persistent preference values that may be used for
- customization and personalization by the portlet. Used
- in: portlet-preferences
- </documentation>
- </annotation>
- <sequence>
- <element name="name" type="portlet:nameType" />
- <element name="value" type="portlet:valueType" minOccurs="0"
- maxOccurs="unbounded" />
- <element name="read-only" type="portlet:read-onlyType"
- minOccurs="0" />
- </sequence>
- <attribute name="id" type="string" use="optional" />
- </complexType>
- <simpleType name="preferences-validatorType">
- <annotation>
- <documentation>
- The class specified under preferences-validator
- implements the PreferencesValidator interface to
- validate the preferences settings. Used in:
- portlet-preferences
- </documentation>
- </annotation>
- <restriction base="portlet:fully-qualified-classType" />
- </simpleType>
- <simpleType name="read-onlyType">
- <annotation>
- <documentation>
- read-only indicates that a setting cannot be changed in
- any of the standard portlet modes ("view","edit" or
- "help"). Per default all preferences are modifiable.
- Valid values are: - true for read-only - false for
- modifiable Used in: preferences
- </documentation>
- </annotation>
- <restriction base="portlet:string">
- <enumeration value="true" />
- <enumeration value="false" />
- </restriction>
- </simpleType>
- <complexType name="resource-bundleType">
- <annotation>
- <documentation>
- Filename of the resource bundle containing the language
- specific portlet informations in different languages.
- Used in: portlet-info
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string" />
- </simpleContent>
- </complexType>
- <complexType name="role-linkType">
- <annotation>
- <documentation>
- The role-link element is a reference to a defined
- security role. The role-link element must contain the
- name of one of the security roles defined in the
- security-role elements. Used in: security-role-ref
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string" />
- </simpleContent>
- </complexType>
- <complexType name="security-constraintType">
- <annotation>
- <documentation>
- The security-constraintType is used to associate
- intended security constraints with one or more portlets.
- Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="display-name" type="portlet:display-nameType"
- minOccurs="0" maxOccurs="unbounded" />
- <element name="portlet-collection"
- type="portlet:portlet-collectionType" />
- <element name="user-data-constraint"
- type="portlet:user-data-constraintType" />
- </sequence>
- <attribute name="id" type="string" use="optional" />
- </complexType>
- <complexType name="security-role-refType">
- <annotation>
- <documentation>
- The security-role-ref element contains the declaration
- of a security role reference in the code of the web
- application. The declaration consists of an optional
- description, the security role name used in the code,
- and an optional link to a security role. If the security
- role is not specified, the Deployer must choose an
- appropriate security role. The value of the role name
- element must be the String used as the parameter to the
- EJBContext.isCallerInRole(String roleName) method or the
- HttpServletRequest.isUserInRole(String role) method.
- Used in: portlet
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType"
- minOccurs="0" maxOccurs="unbounded" />
- <element name="role-name" type="portlet:role-nameType" />
- <element name="role-link" type="portlet:role-linkType"
- minOccurs="0" />
- </sequence>
- <attribute name="id" type="string" use="optional" />
- </complexType>
- <complexType name="short-titleType">
- <annotation>
- <documentation>
- Locale specific short version of the static title. Used
- in: portlet-info
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string" />
- </simpleContent>
- </complexType>
- <complexType name="supportsType">
- <annotation>
- <documentation>
- Supports indicates the portlet modes a portlet supports
- for a specific content type. All portlets must support
- the view mode. Used in: portlet
- </documentation>
- </annotation>
- <sequence>
- <element name="mime-type" type="portlet:mime-typeType" />
- <element name="portlet-mode" type="portlet:portlet-modeType"
- minOccurs="0" maxOccurs="unbounded" />
- </sequence>
- <attribute name="id" type="string" use="optional" />
- </complexType>
- <complexType name="supported-localeType">
- <annotation>
- <documentation>
- Indicated the locales the portlet supports. Used in:
- portlet
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string" />
- </simpleContent>
- </complexType>
- <complexType name="titleType">
- <annotation>
- <documentation>
- Locale specific static title for this portlet. Used in:
- portlet-info
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string" />
- </simpleContent>
- </complexType>
- <simpleType name="transport-guaranteeType">
- <annotation>
- <documentation>
- The transport-guaranteeType specifies that the
- communication between client and portlet should be NONE,
- INTEGRAL, or CONFIDENTIAL. NONE means that the portlet
- does not require any transport guarantees. A value of
- INTEGRAL means that the portlet requires that the data
- sent between the client and portlet be sent in such a
- way that it can't be changed in transit. CONFIDENTIAL
- means that the portlet requires that the data be
- transmitted in a fashion that prevents other entities
- from observing the contents of the transmission. In most
- cases, the presence of the INTEGRAL or CONFIDENTIAL flag
- will indicate that the use of SSL is required. Used in:
- user-data-constraint
- </documentation>
- </annotation>
- <restriction base="portlet:string">
- <enumeration value="NONE" />
- <enumeration value="INTEGRAL" />
- <enumeration value="CONFIDENTIAL" />
- </restriction>
- </simpleType>
- <complexType name="user-attributeType">
- <annotation>
- <documentation>
- User attribute defines a user specific attribute that
- the portlet application needs. The portlet within this
- application can access this attribute via the request
- parameter USER_INFO map. Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType"
- minOccurs="0" maxOccurs="unbounded" />
- <element name="name" type="portlet:nameType" />
- </sequence>
- <attribute name="id" type="string" use="optional" />
- </complexType>
- <complexType name="user-data-constraintType">
- <annotation>
- <documentation>
- The user-data-constraintType is used to indicate how
- data communicated between the client and portlet should
- be protected. Used in: security-constraint
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType"
- minOccurs="0" maxOccurs="unbounded" />
- <element name="transport-guarantee"
- type="portlet:transport-guaranteeType" />
- </sequence>
- <attribute name="id" type="string" use="optional" />
- </complexType>
- <complexType name="valueType">
- <annotation>
- <documentation>
- The value element contains the value of a parameter.
- Used in: init-param
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string" />
- </simpleContent>
- </complexType>
- <complexType name="window-stateType">
- <annotation>
- <documentation>
- Portlet window state. Window state names are not case
- sensitive. Used in: custom-window-state
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string" />
- </simpleContent>
- </complexType>
- <!--- everything below is copied from j2ee_1_4.xsd -->
- <complexType name="descriptionType">
- <annotation>
- <documentation>
- The description element is used to provide text
- describing the parent element. The description element
- should include any information that the portlet
- application war file producer wants to provide to the
- consumer of the portlet application war file (i.e., to
- the Deployer). Typically, the tools used by the portlet
- application war file consumer will display the
- description when processing the parent element that
- contains the description. It has an optional attribute
- xml:lang to indicate which language is used in the
- description according to RFC 1766
- (http://www.ietf.org/rfc/rfc1766.txt). The default value
- of this attribute is English(“en”). Used in: init-param,
- portlet, portlet-app, security-role
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="string">
- <attribute ref="xml:lang" />
- </extension>
- </simpleContent>
- </complexType>
- <complexType name="display-nameType">
- <annotation>
- <documentation>
- The display-name type contains a short name that is
- intended to be displayed by tools. It is used by
- display-name elements. The display name need not be
- unique. Example: ...
- <display-name xml:lang="en">
- Employee Self Service
- </display-name>
-
- It has an optional attribute xml:lang to indicate which
- language is used in the description according to RFC
- 1766 (http://www.ietf.org/rfc/rfc1766.txt). The default
- value of this attribute is English(“en”).
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="portlet:string">
- <attribute ref="xml:lang" />
- </extension>
- </simpleContent>
- </complexType>
- <simpleType name="fully-qualified-classType">
- <annotation>
- <documentation>
- The elements that use this type designate the name of a
- Java class or interface.
- </documentation>
- </annotation>
- <restriction base="portlet:string" />
- </simpleType>
- <simpleType name="role-nameType">
- <annotation>
- <documentation>
- The role-nameType designates the name of a security
- role.
-
- The name must conform to the lexical rules for an
- NMTOKEN.
- </documentation>
- </annotation>
- <restriction base="NMTOKEN" />
- </simpleType>
- <simpleType name="string">
- <annotation>
- <documentation>
- This is a special string datatype that is defined by
- J2EE as a base type for defining collapsed strings. When
- schemas require trailing/leading space elimination as
- well as collapsing the existing whitespace, this base
- type may be used.
- </documentation>
- </annotation>
- <restriction base="string">
- <whiteSpace value="collapse" />
- </restriction>
- </simpleType>
-</schema>
Deleted: components/pc/trunk/portlet/src/test/resources/metadata/portlet-app_2_0.xsd
===================================================================
--- components/pc/trunk/portlet/src/test/resources/metadata/portlet-app_2_0.xsd 2011-09-23 08:35:39 UTC (rev 7495)
+++ components/pc/trunk/portlet/src/test/resources/metadata/portlet-app_2_0.xsd 2011-09-23 09:21:37 UTC (rev 7496)
@@ -1,830 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:portlet="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0" xml:lang="en">
- <annotation>
- <documentation>
- This is the XML Schema for the Portlet 2.0 deployment descriptor.
- </documentation>
- </annotation>
- <annotation>
- <documentation>
- The following conventions apply to all J2EE
- deployment descriptor elements unless indicated otherwise.
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
- </documentation>
- </annotation>
- <!-- *********************************************************** -->
- <import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
- <element name="portlet-app" type="portlet:portlet-appType">
- <annotation>
- <documentation>
- The portlet-app element is the root of the deployment descriptor
- for a portlet application. This element has a required attribute version
- to specify to which version of the schema the deployment descriptor
- conforms. In order to be a valid JSR 286 portlet application the version
- must have the value "2.0".
- </documentation>
- </annotation>
- <unique name="portlet-name-uniqueness">
- <annotation>
- <documentation>
- The portlet element contains the name of a portlet.
- This name must be unique within the portlet application.
- </documentation>
- </annotation>
- <selector xpath="portlet:portlet"/>
- <field xpath="portlet:portlet-name"/>
- </unique>
- <unique name="custom-portlet-mode-uniqueness">
- <annotation>
- <documentation>
- The custom-portlet-mode element contains the portlet-mode.
- This portlet mode must be unique within the portlet application.
- </documentation>
- </annotation>
- <selector xpath="portlet:custom-portlet-mode"/>
- <field xpath="portlet:portlet-mode"/>
- </unique>
- <unique name="custom-window-state-uniqueness">
- <annotation>
- <documentation>
- The custom-window-state element contains the window-state.
- This window state must be unique within the portlet application.
- </documentation>
- </annotation>
- <selector xpath="portlet:custom-window-state"/>
- <field xpath="portlet:window-state"/>
- </unique>
- <unique name="user-attribute-name-uniqueness">
- <annotation>
- <documentation>
- The user-attribute element contains the name the attribute.
- This name must be unique within the portlet application.
- </documentation>
- </annotation>
- <selector xpath="portlet:user-attribute"/>
- <field xpath="portlet:name"/>
- </unique>
- <unique name="filter-name-uniqueness">
- <annotation>
- <documentation>
- The filter element contains the name of a filter.
- The name must be unique within the portlet application.
- </documentation>
- </annotation>
- <selector xpath="portlet:filter"/>
- <field xpath="portlet:filter-name"/>
- </unique>
- </element>
- <complexType name="portlet-appType">
- <sequence>
- <element name="portlet" type="portlet:portletType" minOccurs="0" maxOccurs="unbounded">
- <unique name="init-param-name-uniqueness">
- <annotation>
- <documentation>
- The init-param element contains the name the attribute.
- This name must be unique within the portlet.
- </documentation>
- </annotation>
- <selector xpath="portlet:init-param"/>
- <field xpath="portlet:name"/>
- </unique>
- <unique name="supports-mime-type-uniqueness">
- <annotation>
- <documentation>
- The supports element contains the supported mime-type.
- This mime type must be unique within the portlet.
- </documentation>
- </annotation>
- <selector xpath="portlet:supports"/>
- <field xpath="mime-type"/>
- </unique>
- <unique name="preference-name-uniqueness">
- <annotation>
- <documentation>
- The preference element contains the name the preference.
- This name must be unique within the portlet.
- </documentation>
- </annotation>
- <selector xpath="portlet:portlet-preferences/portlet:preference"/>
- <field xpath="portlet:name"/>
- </unique>
- <unique name="security-role-ref-name-uniqueness">
- <annotation>
- <documentation>
- The security-role-ref element contains the role-name.
- This role name must be unique within the portlet.
- </documentation>
- </annotation>
- <selector xpath="portlet:security-role-ref"/>
- <field xpath="portlet:role-name"/>
- </unique>
- </element>
- <element name="custom-portlet-mode" type="portlet:custom-portlet-modeType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="custom-window-state" type="portlet:custom-window-stateType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="user-attribute" type="portlet:user-attributeType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="security-constraint" type="portlet:security-constraintType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="resource-bundle" type="portlet:resource-bundleType" minOccurs="0"/>
- <element name="filter" type="portlet:filterType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="filter-mapping" type="portlet:filter-mappingType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="default-namespace" type="xs:anyURI" minOccurs="0"/>
- <element name="event-definition" type="portlet:event-definitionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="public-render-parameter" type="portlet:public-render-parameterType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="listener" type="portlet:listenerType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="container-runtime-option" type="portlet:container-runtime-optionType" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="version" type="portlet:string" use="required"/>
- <attribute name="id" type="portlet:string" use="optional"/>
- </complexType>
- <complexType name="cache-scopeType">
- <annotation>
- <documentation>
- Caching scope, allowed values are "private" indicating that the content should not be shared
- across users and "public" indicating that the content may be shared across users.
- The default value if not present is "private".
- Used in: portlet
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="portlet:string"/>
- </simpleContent>
- </complexType>
- <complexType name="custom-portlet-modeType">
- <annotation>
- <documentation>
- A custom portlet mode that one or more portlets in
- this portlet application supports.
- If the portal does not need to provide some management functionality
- for this portlet mode, the portal-managed element needs to be set
- to "false", otherwise to "true". Default is "true".
- Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="portlet-mode" type="portlet:portlet-modeType"/>
- <element name="portal-managed" type="portlet:portal-managedType" minOccurs="0"/>
- </sequence>
- <attribute name="id" type="portlet:string" use="optional"/>
- </complexType>
- <complexType name="custom-window-stateType">
- <annotation>
- <documentation>
- A custom window state that one or more portlets in this
- portlet application supports.
- Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="window-state" type="portlet:window-stateType"/>
- </sequence>
- <attribute name="id" type="portlet:string" use="optional"/>
- </complexType>
- <complexType name="expiration-cacheType">
- <annotation>
- <documentation>
- Expiration-time defines the time in seconds after which the portlet output expires.
- -1 indicates that the output never expires.
- Used in: portlet
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="int"/>
- </simpleContent>
- </complexType>
- <complexType name="init-paramType">
- <annotation>
- <documentation>
- The init-param element contains a name/value pair as an
- initialization param of the portlet
- Used in:portlet
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="name" type="portlet:nameType"/>
- <element name="value" type="portlet:valueType"/>
- </sequence>
- <attribute name="id" type="portlet:string" use="optional"/>
- </complexType>
- <complexType name="keywordsType">
- <annotation>
- <documentation>
- Locale specific keywords associated with this portlet.
- The kewords are separated by commas.
- Used in: portlet-info
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="portlet:string"/>
- </simpleContent>
- </complexType>
- <complexType name="mime-typeType">
- <annotation>
- <documentation>
- MIME type name, e.g. "text/html".
- The MIME type may also contain the wildcard
- character '*', like "text/*" or "*/*".
- Used in: supports
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="portlet:string"/>
- </simpleContent>
- </complexType>
- <complexType name="nameType">
- <annotation>
- <documentation>
- The name element contains the name of a parameter.
- Used in: init-param, ...
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="portlet:string"/>
- </simpleContent>
- </complexType>
- <complexType name="portletType">
- <annotation>
- <documentation>
- The portlet element contains the declarative data of a portlet.
- Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="portlet-name" type="portlet:portlet-nameType"/>
- <element name="display-name" type="portlet:display-nameType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="portlet-class" type="portlet:portlet-classType"/>
- <element name="init-param" type="portlet:init-paramType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="expiration-cache" type="portlet:expiration-cacheType" minOccurs="0"/>
- <element name="cache-scope" type="portlet:cache-scopeType" minOccurs="0"/>
- <element name="supports" type="portlet:supportsType" maxOccurs="unbounded"/>
- <element name="supported-locale" type="portlet:supported-localeType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="resource-bundle" type="portlet:resource-bundleType" minOccurs="0"/>
- <element name="portlet-info" type="portlet:portlet-infoType" minOccurs="0"/>
- <element name="portlet-preferences" type="portlet:portlet-preferencesType" minOccurs="0"/>
- <element name="security-role-ref" type="portlet:security-role-refType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="supported-processing-event" type="portlet:event-definition-referenceType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="supported-publishing-event" type="portlet:event-definition-referenceType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="supported-public-render-parameter" type="portlet:string" minOccurs="0" maxOccurs="unbounded"/>
- <element name="container-runtime-option" type="portlet:container-runtime-optionType" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="id" type="portlet:string" use="optional"/>
- </complexType>
- <simpleType name="portlet-classType">
- <annotation>
- <documentation>
- The portlet-class element contains the fully
- qualified class name of the portlet.
- Used in: portlet
- </documentation>
- </annotation>
- <restriction base="portlet:fully-qualified-classType"/>
- </simpleType>
- <complexType name="container-runtime-optionType">
- <annotation>
- <documentation>
- The container-runtime-option element contains settings
- for the portlet container that the portlet expects to be honored
- at runtime. These settings may re-define default portlet container
- behavior, like the javax.portlet.escapeXml setting that disables
- XML encoding of URLs produced by the portlet tag library as
- default.
- Names with the javax.portlet prefix are reserved for the Java
- Portlet Specification.
- Used in: portlet-app, portlet
- </documentation>
- </annotation>
- <sequence>
- <element name="name" type="portlet:nameType"/>
- <element name="value" type="portlet:valueType" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- <complexType name="filter-mappingType">
- <annotation>
- <documentation>
- Declaration of the filter mappings in this portlet
- application is done by using filter-mappingType.
- The container uses the filter-mapping
- declarations to decide which filters to apply to a request,
- and in what order. To determine which filters to
- apply it matches filter-mapping declarations on the
- portlet-name and the lifecyle phase defined in the
- filter element. The order in which filters are invoked
- is the order in which filter-mapping declarations
- that match appear in the list of filter-mapping elements.
- Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="filter-name" type="portlet:filter-nameType"/>
- <element name="portlet-name" type="portlet:portlet-nameType" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- <complexType name="filterType">
- <annotation>
- <documentation>
- The filter element specifies a filter that can transform the
- content of portlet requests and portlet responses.
- Filters can access the initialization parameters declared in
- the deployment descriptor at runtime via the FilterConfig
- interface.
- A filter can be restricted to one or more lifecycle phases
- of the portlet. Valid entries for lifecycle are:
- ACTION_PHASE, EVENT_PHASE, RENDER_PHASE,
- RESOURCE_PHASE
- Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="display-name" type="portlet:display-nameType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="filter-name" type="portlet:filter-nameType"/>
- <element name="filter-class" type="portlet:fully-qualified-classType"/>
- <element name="lifecycle" type="portlet:string" maxOccurs="unbounded"/>
- <element name="init-param" type="portlet:init-paramType" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- <complexType name="portlet-collectionType">
- <annotation>
- <documentation>
- The portlet-collectionType is used to identify a subset
- of portlets within a portlet application to which a
- security constraint applies.
- Used in: security-constraint
- </documentation>
- </annotation>
- <sequence>
- <element name="portlet-name" type="portlet:portlet-nameType" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- <complexType name="event-definitionType">
- <annotation>
- <documentation>
- The event-definitionType is used to declare events the portlet can either
- receive or emit.
- The name must be unique and must be the one the
- portlet is using in its code for referencing this event.
- Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <choice>
- <element name="qname" type="xs:QName"/>
- <element name="name" type="xs:NCName"/>
- </choice>
- <element name="alias" type="xs:QName" minOccurs="0" maxOccurs="unbounded"/>
- <element name="value-type" type="portlet:fully-qualified-classType" minOccurs="0"/>
- </sequence>
- <attribute name="id" type="portlet:string" use="optional"/>
- </complexType>
- <complexType name="event-definition-referenceType">
- <annotation>
- <documentation>
- The event-definition-referenceType is used to reference events
- declared with the event-definition element at application level.
- Used in: portlet
- </documentation>
- </annotation>
- <choice>
- <element name="qname" type="xs:QName"/>
- <element name="name" type="xs:NCName"/>
- </choice>
- <attribute name="id" type="portlet:string" use="optional"/>
- </complexType>
- <complexType name="listenerType">
- <annotation>
- <documentation>
- The listenerType is used to declare listeners for this portlet application.
- Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="display-name" type="portlet:display-nameType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="listener-class" type="portlet:fully-qualified-classType"/>
- </sequence>
- <attribute name="id" type="portlet:string" use="optional"/>
- </complexType>
- <complexType name="portlet-infoType">
- <sequence>
- <element name="title" type="portlet:titleType" minOccurs="0"/>
- <element name="short-title" type="portlet:short-titleType" minOccurs="0"/>
- <element name="keywords" type="portlet:keywordsType" minOccurs="0"/>
- </sequence>
- <attribute name="id" type="portlet:string" use="optional"/>
- </complexType>
- <simpleType name="portal-managedType">
- <annotation>
- <documentation>
- portal-managed indicates if a custom portlet mode
- needs to be managed by the portal or not.
- Per default all custom portlet modes are portal managed.
- Valid values are:
- - true for portal-managed
- - false for not portal managed
- Used in: custom-portlet-modes
- </documentation>
- </annotation>
- <restriction base="portlet:string">
- <enumeration value="true"/>
- <enumeration value="false"/>
- </restriction>
- </simpleType>
- <complexType name="portlet-modeType">
- <annotation>
- <documentation>
- Portlet modes. The specification pre-defines the following values
- as valid portlet mode constants:
- "edit", "help", "view".
- Portlet mode names are not case sensitive.
- Used in: custom-portlet-mode, supports
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="portlet:string"/>
- </simpleContent>
- </complexType>
- <complexType name="portlet-nameType">
- <annotation>
- <documentation>
- The portlet-name element contains the canonical name of the
- portlet. Each portlet name is unique within the portlet
- application.
- Used in: portlet, filter-mapping
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="portlet:string"/>
- </simpleContent>
- </complexType>
- <complexType name="portlet-preferencesType">
- <annotation>
- <documentation>
- Portlet persistent preference store.
- Used in: portlet
- </documentation>
- </annotation>
- <sequence>
- <element name="preference" type="portlet:preferenceType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="preferences-validator" type="portlet:preferences-validatorType" minOccurs="0"/>
- </sequence>
- <attribute name="id" type="portlet:string" use="optional"/>
- </complexType>
- <complexType name="preferenceType">
- <annotation>
- <documentation>
- Persistent preference values that may be used for customization
- and personalization by the portlet.
- Used in: portlet-preferences
- </documentation>
- </annotation>
- <sequence>
- <element name="name" type="portlet:nameType"/>
- <element name="value" type="portlet:valueType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="read-only" type="portlet:read-onlyType" minOccurs="0"/>
- </sequence>
- <attribute name="id" type="portlet:string" use="optional"/>
- </complexType>
- <simpleType name="preferences-validatorType">
- <annotation>
- <documentation>
- The class specified under preferences-validator implements
- the PreferencesValidator interface to validate the
- preferences settings.
- Used in: portlet-preferences
- </documentation>
- </annotation>
- <restriction base="portlet:fully-qualified-classType"/>
- </simpleType>
- <simpleType name="read-onlyType">
- <annotation>
- <documentation>
- read-only indicates that a setting cannot
- be changed in any of the standard portlet modes
- ("view","edit" or "help").
- Per default all preferences are modifiable.
- Valid values are:
- - true for read-only
- - false for modifiable
- Used in: preferences
- </documentation>
- </annotation>
- <restriction base="portlet:string">
- <enumeration value="true"/>
- <enumeration value="false"/>
- </restriction>
- </simpleType>
- <complexType name="resource-bundleType">
- <annotation>
- <documentation>
- Name of the resource bundle containing the language specific
- portlet informations in different languages (Filename without
- the language specific part (e.g. _en) and the ending (.properties).
- Used in: portlet-info
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="portlet:string"/>
- </simpleContent>
- </complexType>
- <complexType name="role-linkType">
- <annotation>
- <documentation>
- The role-link element is a reference to a defined security role.
- The role-link element must contain the name of one of the
- security roles defined in the security-role elements.
- Used in: security-role-ref
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="portlet:string"/>
- </simpleContent>
- </complexType>
- <complexType name="security-constraintType">
- <annotation>
- <documentation>
- The security-constraintType is used to associate
- intended security constraints with one or more portlets.
- Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="display-name" type="portlet:display-nameType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="portlet-collection" type="portlet:portlet-collectionType"/>
- <element name="user-data-constraint" type="portlet:user-data-constraintType"/>
- </sequence>
- <attribute name="id" type="portlet:string" use="optional"/>
- </complexType>
- <complexType name="security-role-refType">
- <annotation>
- <documentation>
- The security-role-ref element contains the declaration of a
- security role reference in the code of the web application. The
- declaration consists of an optional description, the security
- role name used in the code, and an optional link to a security
- role. If the security role is not specified, the Deployer must
- choose an appropriate security role.
- The value of the role name element must be the String used
- as the parameter to the
- EJBContext.isCallerInRole(String roleName) method
- or the HttpServletRequest.isUserInRole(String role) method.
- Used in: portlet
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="role-name" type="portlet:role-nameType"/>
- <element name="role-link" type="portlet:role-linkType" minOccurs="0"/>
- </sequence>
- <attribute name="id" type="portlet:string" use="optional"/>
- </complexType>
- <complexType name="public-render-parameterType">
- <annotation>
- <documentation>
- The public-render-parameters defines a render parameter that is allowed to be public
- and thus be shared with other portlets.
- The identifier must be used for referencing this public render parameter in the portlet code.
- Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="identifier" type="portlet:string"/>
- <choice>
- <element name="qname" type="xs:QName"/>
- <element name="name" type="xs:NCName"/>
- </choice>
- <element name="alias" type="xs:QName" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="id" type="portlet:string" use="optional"/>
- </complexType>
- <complexType name="short-titleType">
- <annotation>
- <documentation>
- Locale specific short version of the static title.
- Used in: portlet-info
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="portlet:string"/>
- </simpleContent>
- </complexType>
- <complexType name="supportsType">
- <annotation>
- <documentation>
- Supports indicates the portlet modes a
- portlet supports for a specific content type. All portlets must
- support the view mode.
- Used in: portlet
- </documentation>
- </annotation>
- <sequence>
- <element name="mime-type" type="portlet:mime-typeType"/>
- <element name="portlet-mode" type="portlet:portlet-modeType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="window-state" type="portlet:window-stateType" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="id" type="portlet:string" use="optional"/>
- </complexType>
- <complexType name="supported-localeType">
- <annotation>
- <documentation>
- Indicated the locales the portlet supports.
- Used in: portlet
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="portlet:string"/>
- </simpleContent>
- </complexType>
- <complexType name="titleType">
- <annotation>
- <documentation>
- Locale specific static title for this portlet.
- Used in: portlet-info
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="portlet:string"/>
- </simpleContent>
- </complexType>
- <simpleType name="transport-guaranteeType">
- <annotation>
- <documentation>
- The transport-guaranteeType specifies that
- the communication between client and portlet should
- be NONE, INTEGRAL, or CONFIDENTIAL.
- NONE means that the portlet does not
- require any transport guarantees. A value of
- INTEGRAL means that the portlet requires that the
- data sent between the client and portlet be sent in
- such a way that it can't be changed in transit.
- CONFIDENTIAL means that the portlet requires
- that the data be transmitted in a fashion that
- prevents other entities from observing the contents
- of the transmission.
- In most cases, the presence of the INTEGRAL or
- CONFIDENTIAL flag will indicate that the use
- of SSL is required.
- Used in: user-data-constraint
- </documentation>
- </annotation>
- <restriction base="portlet:string">
- <enumeration value="NONE"/>
- <enumeration value="INTEGRAL"/>
- <enumeration value="CONFIDENTIAL"/>
- </restriction>
- </simpleType>
- <complexType name="user-attributeType">
- <annotation>
- <documentation>
- User attribute defines a user specific attribute that the
- portlet application needs. The portlet within this application
- can access this attribute via the request parameter USER_INFO
- map.
- Used in: portlet-app
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="name" type="portlet:nameType"/>
- </sequence>
- <attribute name="id" type="portlet:string" use="optional"/>
- </complexType>
- <complexType name="user-data-constraintType">
- <annotation>
- <documentation>
- The user-data-constraintType is used to indicate how
- data communicated between the client and portlet should be
- protected.
- Used in: security-constraint
- </documentation>
- </annotation>
- <sequence>
- <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="transport-guarantee" type="portlet:transport-guaranteeType"/>
- </sequence>
- <attribute name="id" type="portlet:string" use="optional"/>
- </complexType>
- <complexType name="valueType">
- <annotation>
- <documentation>
- The value element contains the value of a parameter.
- Used in: init-param
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="portlet:string"/>
- </simpleContent>
- </complexType>
- <complexType name="window-stateType">
- <annotation>
- <documentation>
- Portlet window state. Window state names are not case sensitive.
- Used in: custom-window-state
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="portlet:string"/>
- </simpleContent>
- </complexType>
- <!--- everything below is copied from j2ee_1_4.xsd -->
- <complexType name="descriptionType">
- <annotation>
- <documentation>
- The description element is used to provide text describing the
- parent element. The description element should include any
- information that the portlet application war file producer wants
- to provide to the consumer of the portlet application war file
- (i.e., to the Deployer). Typically, the tools used by the
- portlet application war file consumer will display the
- description when processing the parent element that contains the
- description. It has an optional attribute xml:lang to indicate
- which language is used in the description according to
- RFC 1766 (http://www.ietf.org/rfc/rfc1766.txt). The default
- value of this attribute is English(“en”).
- Used in: init-param, portlet, portlet-app, security-role
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="portlet:string">
- <attribute ref="xml:lang"/>
- </extension>
- </simpleContent>
- </complexType>
- <complexType name="display-nameType">
- <annotation>
- <documentation>
- The display-name type contains a short name that is intended
- to be displayed by tools. It is used by display-name
- elements. The display name need not be unique.
- Example:
- ...
- <display-name xml:lang="en">Employee Self Service</display-name>
-
- It has an optional attribute xml:lang to indicate
- which language is used in the description according to
- RFC 1766 (http://www.ietf.org/rfc/rfc1766.txt). The default
- value of this attribute is English(“en”).
- </documentation>
- </annotation>
- <simpleContent>
- <extension base="portlet:string">
- <attribute ref="xml:lang"/>
- </extension>
- </simpleContent>
- </complexType>
- <simpleType name="fully-qualified-classType">
- <annotation>
- <documentation>
- The elements that use this type designate the name of a
- Java class or interface.
- </documentation>
- </annotation>
- <restriction base="portlet:string"/>
- </simpleType>
- <simpleType name="role-nameType">
- <annotation>
- <documentation>
- The role-nameType designates the name of a security role.
-
- The name must conform to the lexical rules for an NMTOKEN.
- </documentation>
- </annotation>
- <restriction base="NMTOKEN"/>
- </simpleType>
- <simpleType name="string">
- <annotation>
- <documentation>
- This is a special string datatype that is defined by JavaEE
- as a base type for defining collapsed strings. When
- schemas require trailing/leading space elimination as
- well as collapsing the existing whitespace, this base
- type may be used.
- </documentation>
- </annotation>
- <restriction base="string">
- <whiteSpace value="collapse"/>
- </restriction>
- </simpleType>
- <simpleType name="filter-nameType">
- <annotation>
- <documentation>
- The logical name of the filter is declare
- by using filter-nameType. This name is used to map the
- filter. Each filter name is unique within the portlet
- application.
- Used in: filter, filter-mapping
- </documentation>
- </annotation>
- <restriction base="portlet:string"/>
- </simpleType>
-</schema>
13 years, 3 months