gatein SVN: r5685 - in components/pc/trunk: api and 19 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-01-06 10:03:25 -0500 (Thu, 06 Jan 2011)
New Revision: 5685
Modified:
components/pc/trunk/api/pom.xml
components/pc/trunk/bridge/pom.xml
components/pc/trunk/controller/pom.xml
components/pc/trunk/docs/pom.xml
components/pc/trunk/docs/user-guide/pom.xml
components/pc/trunk/federation/pom.xml
components/pc/trunk/jsr168api/pom.xml
components/pc/trunk/management/pom.xml
components/pc/trunk/mc/pom.xml
components/pc/trunk/pom.xml
components/pc/trunk/portal/pom.xml
components/pc/trunk/portlet/pom.xml
components/pc/trunk/samples/pom.xml
components/pc/trunk/test/core/pom.xml
components/pc/trunk/test/pom.xml
components/pc/trunk/test/servers/jboss42/pom.xml
components/pc/trunk/test/servers/jboss51/pom.xml
components/pc/trunk/test/servers/jetty6/pom.xml
components/pc/trunk/test/servers/pom.xml
components/pc/trunk/test/servers/tomcat6/pom.xml
components/pc/trunk/test/servers/tomcat7/pom.xml
Log:
update pom to correct version 2.3.0-Alpha01-SNAPSHOT
Modified: components/pc/trunk/api/pom.xml
===================================================================
--- components/pc/trunk/api/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/api/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.gatein.pc</groupId>
Modified: components/pc/trunk/bridge/pom.xml
===================================================================
--- components/pc/trunk/bridge/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/bridge/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-bridge</artifactId>
Modified: components/pc/trunk/controller/pom.xml
===================================================================
--- components/pc/trunk/controller/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/controller/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-controller</artifactId>
Modified: components/pc/trunk/docs/pom.xml
===================================================================
--- components/pc/trunk/docs/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/docs/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<artifactId>docs-aggregator</artifactId>
<packaging>pom</packaging>
Modified: components/pc/trunk/docs/user-guide/pom.xml
===================================================================
--- components/pc/trunk/docs/user-guide/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/docs/user-guide/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<groupId>org.gatein.pc</groupId>
<artifactId>user-guide-${translation}</artifactId>
Modified: components/pc/trunk/federation/pom.xml
===================================================================
--- components/pc/trunk/federation/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/federation/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-federation</artifactId>
Modified: components/pc/trunk/jsr168api/pom.xml
===================================================================
--- components/pc/trunk/jsr168api/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/jsr168api/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-jsr168api</artifactId>
Modified: components/pc/trunk/management/pom.xml
===================================================================
--- components/pc/trunk/management/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/management/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-management</artifactId>
Modified: components/pc/trunk/mc/pom.xml
===================================================================
--- components/pc/trunk/mc/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/mc/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-mc</artifactId>
Modified: components/pc/trunk/pom.xml
===================================================================
--- components/pc/trunk/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -29,7 +29,7 @@
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
Modified: components/pc/trunk/portal/pom.xml
===================================================================
--- components/pc/trunk/portal/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/portal/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-portal</artifactId>
Modified: components/pc/trunk/portlet/pom.xml
===================================================================
--- components/pc/trunk/portlet/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/portlet/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-portlet</artifactId>
Modified: components/pc/trunk/samples/pom.xml
===================================================================
--- components/pc/trunk/samples/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/samples/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-samples</artifactId>
Modified: components/pc/trunk/test/core/pom.xml
===================================================================
--- components/pc/trunk/test/core/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/test/core/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-test</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test-core</artifactId>
Modified: components/pc/trunk/test/pom.xml
===================================================================
--- components/pc/trunk/test/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/test/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test</artifactId>
Modified: components/pc/trunk/test/servers/jboss42/pom.xml
===================================================================
--- components/pc/trunk/test/servers/jboss42/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/test/servers/jboss42/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-test-servers</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test-jboss42</artifactId>
Modified: components/pc/trunk/test/servers/jboss51/pom.xml
===================================================================
--- components/pc/trunk/test/servers/jboss51/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/test/servers/jboss51/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-test-servers</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test-jboss51</artifactId>
Modified: components/pc/trunk/test/servers/jetty6/pom.xml
===================================================================
--- components/pc/trunk/test/servers/jetty6/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/test/servers/jetty6/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-test-servers</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test-jetty6</artifactId>
Modified: components/pc/trunk/test/servers/pom.xml
===================================================================
--- components/pc/trunk/test/servers/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/test/servers/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-test</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test-servers</artifactId>
Modified: components/pc/trunk/test/servers/tomcat6/pom.xml
===================================================================
--- components/pc/trunk/test/servers/tomcat6/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/test/servers/tomcat6/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-test-servers</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test-tomcat6</artifactId>
Modified: components/pc/trunk/test/servers/tomcat7/pom.xml
===================================================================
--- components/pc/trunk/test/servers/tomcat7/pom.xml 2011-01-06 14:46:24 UTC (rev 5684)
+++ components/pc/trunk/test/servers/tomcat7/pom.xml 2011-01-06 15:03:25 UTC (rev 5685)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-test-servers</artifactId>
- <version>2.2.0-GA</version>
+ <version>2.3.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test-tomcat7</artifactId>
14 years, 9 months
gatein SVN: r5684 - in components/pc: branches and 1 other directory.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-01-06 09:46:24 -0500 (Thu, 06 Jan 2011)
New Revision: 5684
Added:
components/pc/trunk/
Removed:
components/pc/branches/adf/
Log:
promote work branch as new trunk
Copied: components/pc/trunk (from rev 5683, components/pc/branches/adf)
14 years, 9 months
gatein SVN: r5683 - in components/pc: branches and 1 other directory.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-01-06 09:42:21 -0500 (Thu, 06 Jan 2011)
New Revision: 5683
Added:
components/pc/branches/2.2.x/
Removed:
components/pc/trunk/
Log:
move trunk to branches 2.2.x
Copied: components/pc/branches/2.2.x (from rev 5677, components/pc/trunk)
14 years, 9 months
gatein SVN: r5682 - in components/wsrp/trunk/consumer/src: main/java/org/gatein/wsrp/consumer/handlers and 2 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-01-06 07:11:44 -0500 (Thu, 06 Jan 2011)
New Revision: 5682
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/spi/WSRPConsumerSPI.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java
Log:
- GTNWSRP-194:
+ Made RequestPrecursor deal with templates as well so that we only need to retrieve the PortletInfo once.
+ Made getUserContextFrom and setTemplatesIfNeeded use a provided PortletInfo.
+ Added getPortletInfo(PortletInvovation) to WSRPConsumerSPI.
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2011-01-06 11:56:39 UTC (rev 5681)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2011-01-06 12:11:44 UTC (rev 5682)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * Copyright 2011, Red Hat Middleware, LLC, and individual
* contributors as indicated by the @authors tag. See the
* copyright.txt in the distribution for a full listing of
* individual contributors.
@@ -694,11 +694,9 @@
// fix-me!
- public org.oasis.wsrp.v2.UserContext getUserContextFrom(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
+ public org.oasis.wsrp.v2.UserContext getUserContextFrom(WSRPPortletInfo info, PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
{
// first decide if we need to pass the user context...
- WSRPPortletInfo info = getPortletInfo(invocation);
-
SessionParams sessionParams = runtimeContext.getSessionParams();
if (info != null && info.isUserContextStoredInSession() && sessionParams != null && sessionParams.getSessionID() != null)
{
@@ -720,11 +718,9 @@
return null;
}
- public void setTemplatesIfNeeded(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
+ public void setTemplatesIfNeeded(WSRPPortletInfo info, PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
{
// todo: could store templates in producer session info to avoid to re-generate them all the time?
- WSRPPortletInfo info = getPortletInfo(invocation);
-
SessionParams sessionParams = runtimeContext.getSessionParams();
if (info != null && info.isDoesUrlTemplateProcessing()
&& (!info.isTemplatesStoredInSession() || sessionParams == null || sessionParams.getSessionID() == null))
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java 2011-01-06 11:56:39 UTC (rev 5681)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java 2011-01-06 12:11:44 UTC (rev 5682)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * Copyright 2011, Red Hat Middleware, LLC, and individual
* contributors as indicated by the @authors tag. See the
* copyright.txt in the distribution for a full listing of
* individual contributors.
@@ -39,6 +39,7 @@
import org.gatein.wsrp.WSRPUtils;
import org.gatein.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.consumer.WSRPConsumerImpl;
+import org.gatein.wsrp.consumer.portlet.info.WSRPPortletInfo;
import org.gatein.wsrp.consumer.spi.WSRPConsumerSPI;
import org.gatein.wsrp.spec.v2.WSRP2RewritingConstants;
import org.oasis.wsrp.v2.InvalidCookie;
@@ -140,7 +141,6 @@
SessionHandler sessionHandler = consumer.getSessionHandler();
// prepare everything for the request
-// updateRegistrationContext(request);
RuntimeContext runtimeContext = getRuntimeContextFrom(request);
if (runtimeContext != null)
@@ -150,9 +150,6 @@
InstanceContext instanceContext = invocation.getInstanceContext();
runtimeContext.setPortletInstanceKey(instanceContext == null ? null : instanceContext.getId());
-
-// updateUserContext(request, consumer.getUserContextFrom(invocation, runtimeContext));
- consumer.setTemplatesIfNeeded(invocation, runtimeContext);
}
try
@@ -307,11 +304,11 @@
{
private final static Logger log = LoggerFactory.getLogger(RequestPrecursor.class);
- private PortletContext portletContext;
- private RuntimeContext runtimeContext;
- private MarkupParams markupParams;
- private RegistrationContext registrationContext;
- private UserContext userContext;
+ private final PortletContext portletContext;
+ private final RuntimeContext runtimeContext;
+ private final MarkupParams markupParams;
+ private final RegistrationContext registrationContext;
+ private final UserContext userContext;
private static final String PORTLET_HANDLE = "portlet handle";
private static final String SECURITY_CONTEXT = "security context";
private static final String USER_CONTEXT = "user context";
@@ -344,14 +341,17 @@
runtimeContext = WSRPTypeFactory.createRuntimeContext(authType, portletInstanceKey, namespacePrefix);
+ WSRPPortletInfo info = wsrpConsumer.getPortletInfo(invocation);
+
// user context
- userContext = wsrpConsumer.getUserContextFrom(invocation, runtimeContext);
+ userContext = wsrpConsumer.getUserContextFrom(info, invocation, runtimeContext);
+ // templates
+ wsrpConsumer.setTemplatesIfNeeded(info, invocation, getRuntimeContext());
+
// set the session id if needed
wsrpConsumer.getSessionHandler().setSessionIdIfNeeded(invocation, getRuntimeContext(), getPortletHandle());
- wsrpConsumer.setTemplatesIfNeeded(invocation, getRuntimeContext());
-
// create markup params
org.gatein.pc.api.spi.UserContext userContext = invocation.getUserContext();
ParameterValidation.throwIllegalArgExceptionIfNull(userContext, USER_CONTEXT);
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/spi/WSRPConsumerSPI.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/spi/WSRPConsumerSPI.java 2011-01-06 11:56:39 UTC (rev 5681)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/spi/WSRPConsumerSPI.java 2011-01-06 12:11:44 UTC (rev 5682)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * Copyright 2011, Red Hat Middleware, LLC, and individual
* contributors as indicated by the @authors tag. See the
* copyright.txt in the distribution for a full listing of
* individual contributors.
@@ -28,6 +28,7 @@
import org.gatein.wsrp.WSRPConsumer;
import org.gatein.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.consumer.handlers.SessionHandler;
+import org.gatein.wsrp.consumer.portlet.info.WSRPPortletInfo;
import org.gatein.wsrp.services.MarkupService;
import org.oasis.wsrp.v2.RegistrationContext;
import org.oasis.wsrp.v2.RuntimeContext;
@@ -41,11 +42,11 @@
{
RegistrationContext getRegistrationContext() throws PortletInvokerException;
- UserContext getUserContextFrom(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException;
+ UserContext getUserContextFrom(WSRPPortletInfo info, PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException;
SessionHandler getSessionHandler();
- void setTemplatesIfNeeded(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException;
+ void setTemplatesIfNeeded(WSRPPortletInfo info, PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException;
void refreshProducerInfo() throws PortletInvokerException;
@@ -62,4 +63,6 @@
* @return <code>true</code> if the given user scope is supported, <code>false</code> otherwise
*/
boolean supportsUserScope(String userScope);
+
+ WSRPPortletInfo getPortletInfo(PortletInvocation invocation) throws PortletInvokerException;
}
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java 2011-01-06 11:56:39 UTC (rev 5681)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java 2011-01-06 12:11:44 UTC (rev 5682)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * Copyright 2011, Red Hat Middleware, LLC, and individual
* contributors as indicated by the @authors tag. See the
* copyright.txt in the distribution for a full listing of
* individual contributors.
@@ -41,6 +41,7 @@
import org.gatein.wsrp.consumer.migration.ExportInfo;
import org.gatein.wsrp.consumer.migration.ImportInfo;
import org.gatein.wsrp.consumer.migration.MigrationService;
+import org.gatein.wsrp.consumer.portlet.info.WSRPPortletInfo;
import org.gatein.wsrp.consumer.spi.WSRPConsumerSPI;
import org.gatein.wsrp.services.MarkupService;
import org.oasis.wsrp.v2.RegistrationContext;
@@ -98,12 +99,17 @@
throw new NotYetImplemented();
}
+ public WSRPPortletInfo getPortletInfo(PortletInvocation invocation) throws PortletInvokerException
+ {
+ throw new NotYetImplemented();
+ }
+
public RegistrationContext getRegistrationContext() throws PortletInvokerException
{
throw new NotYetImplemented();
}
- public UserContext getUserContextFrom(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
+ public UserContext getUserContextFrom(WSRPPortletInfo info, PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
{
throw new NotYetImplemented();
}
@@ -113,7 +119,7 @@
throw new NotYetImplemented();
}
- public void setTemplatesIfNeeded(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
+ public void setTemplatesIfNeeded(WSRPPortletInfo info, PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
{
throw new NotYetImplemented();
}
14 years, 9 months
gatein SVN: r5681 - in components/wsrp/branches/2.0.x/consumer/src: main/java/org/gatein/wsrp/consumer/handlers and 2 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-01-06 06:56:39 -0500 (Thu, 06 Jan 2011)
New Revision: 5681
Modified:
components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java
components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java
components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/spi/WSRPConsumerSPI.java
components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java
Log:
- GTNWSRP-194:
+ Made RequestPrecursor deal with templates as well so that we only need to retrieve the PortletInfo once.
+ Made getUserContextFrom and setTemplatesIfNeeded use a provided PortletInfo.
+ Added getPortletInfo(PortletInvovation) to WSRPConsumerSPI.
Modified: components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2011-01-06 06:45:24 UTC (rev 5680)
+++ components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2011-01-06 11:56:39 UTC (rev 5681)
@@ -694,11 +694,9 @@
// fix-me!
- public org.oasis.wsrp.v2.UserContext getUserContextFrom(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
+ public org.oasis.wsrp.v2.UserContext getUserContextFrom(WSRPPortletInfo info, PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
{
// first decide if we need to pass the user context...
- WSRPPortletInfo info = getPortletInfo(invocation);
-
SessionParams sessionParams = runtimeContext.getSessionParams();
if (info != null && info.isUserContextStoredInSession() && sessionParams != null && sessionParams.getSessionID() != null)
{
@@ -720,11 +718,9 @@
return null;
}
- public void setTemplatesIfNeeded(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
+ public void setTemplatesIfNeeded(WSRPPortletInfo info, PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
{
// todo: could store templates in producer session info to avoid to re-generate them all the time?
- WSRPPortletInfo info = getPortletInfo(invocation);
-
SessionParams sessionParams = runtimeContext.getSessionParams();
if (info != null && info.isDoesUrlTemplateProcessing()
&& (!info.isTemplatesStoredInSession() || sessionParams == null || sessionParams.getSessionID() == null))
Modified: components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java 2011-01-06 06:45:24 UTC (rev 5680)
+++ components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java 2011-01-06 11:56:39 UTC (rev 5681)
@@ -39,6 +39,7 @@
import org.gatein.wsrp.WSRPUtils;
import org.gatein.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.consumer.WSRPConsumerImpl;
+import org.gatein.wsrp.consumer.portlet.info.WSRPPortletInfo;
import org.gatein.wsrp.consumer.spi.WSRPConsumerSPI;
import org.gatein.wsrp.spec.v2.WSRP2RewritingConstants;
import org.oasis.wsrp.v2.InvalidCookie;
@@ -140,7 +141,6 @@
SessionHandler sessionHandler = consumer.getSessionHandler();
// prepare everything for the request
-// updateRegistrationContext(request);
RuntimeContext runtimeContext = getRuntimeContextFrom(request);
if (runtimeContext != null)
@@ -150,9 +150,6 @@
InstanceContext instanceContext = invocation.getInstanceContext();
runtimeContext.setPortletInstanceKey(instanceContext == null ? null : instanceContext.getId());
-
-// updateUserContext(request, consumer.getUserContextFrom(invocation, runtimeContext));
- consumer.setTemplatesIfNeeded(invocation, runtimeContext);
}
try
@@ -307,11 +304,11 @@
{
private final static Logger log = LoggerFactory.getLogger(RequestPrecursor.class);
- private PortletContext portletContext;
- private RuntimeContext runtimeContext;
- private MarkupParams markupParams;
- private RegistrationContext registrationContext;
- private UserContext userContext;
+ private final PortletContext portletContext;
+ private final RuntimeContext runtimeContext;
+ private final MarkupParams markupParams;
+ private final RegistrationContext registrationContext;
+ private final UserContext userContext;
private static final String PORTLET_HANDLE = "portlet handle";
private static final String SECURITY_CONTEXT = "security context";
private static final String USER_CONTEXT = "user context";
@@ -344,14 +341,17 @@
runtimeContext = WSRPTypeFactory.createRuntimeContext(authType, portletInstanceKey, namespacePrefix);
+ WSRPPortletInfo info = wsrpConsumer.getPortletInfo(invocation);
+
// user context
- userContext = wsrpConsumer.getUserContextFrom(invocation, runtimeContext);
+ userContext = wsrpConsumer.getUserContextFrom(info, invocation, runtimeContext);
+ // templates
+ wsrpConsumer.setTemplatesIfNeeded(info, invocation, getRuntimeContext());
+
// set the session id if needed
wsrpConsumer.getSessionHandler().setSessionIdIfNeeded(invocation, getRuntimeContext(), getPortletHandle());
- wsrpConsumer.setTemplatesIfNeeded(invocation, getRuntimeContext());
-
// create markup params
org.gatein.pc.api.spi.UserContext userContext = invocation.getUserContext();
ParameterValidation.throwIllegalArgExceptionIfNull(userContext, USER_CONTEXT);
Modified: components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/spi/WSRPConsumerSPI.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/spi/WSRPConsumerSPI.java 2011-01-06 06:45:24 UTC (rev 5680)
+++ components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/spi/WSRPConsumerSPI.java 2011-01-06 11:56:39 UTC (rev 5681)
@@ -27,6 +27,7 @@
import org.gatein.wsrp.WSRPConsumer;
import org.gatein.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.consumer.handlers.SessionHandler;
+import org.gatein.wsrp.consumer.portlet.info.WSRPPortletInfo;
import org.gatein.wsrp.services.MarkupService;
import org.oasis.wsrp.v2.RegistrationContext;
import org.oasis.wsrp.v2.RuntimeContext;
@@ -40,11 +41,11 @@
{
RegistrationContext getRegistrationContext() throws PortletInvokerException;
- UserContext getUserContextFrom(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException;
+ UserContext getUserContextFrom(WSRPPortletInfo info, PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException;
SessionHandler getSessionHandler();
- void setTemplatesIfNeeded(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException;
+ void setTemplatesIfNeeded(WSRPPortletInfo info, PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException;
void refreshProducerInfo() throws PortletInvokerException;
@@ -61,4 +62,6 @@
* @return <code>true</code> if the given user scope is supported, <code>false</code> otherwise
*/
boolean supportsUserScope(String userScope);
+
+ WSRPPortletInfo getPortletInfo(PortletInvocation invocation) throws PortletInvokerException;
}
Modified: components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java 2011-01-06 06:45:24 UTC (rev 5680)
+++ components/wsrp/branches/2.0.x/consumer/src/test/java/org/gatein/wsrp/test/support/MockWSRPConsumer.java 2011-01-06 11:56:39 UTC (rev 5681)
@@ -41,6 +41,7 @@
import org.gatein.wsrp.consumer.migration.ExportInfo;
import org.gatein.wsrp.consumer.migration.ImportInfo;
import org.gatein.wsrp.consumer.migration.MigrationService;
+import org.gatein.wsrp.consumer.portlet.info.WSRPPortletInfo;
import org.gatein.wsrp.consumer.spi.WSRPConsumerSPI;
import org.gatein.wsrp.services.MarkupService;
import org.oasis.wsrp.v2.RegistrationContext;
@@ -98,12 +99,17 @@
throw new NotYetImplemented();
}
+ public WSRPPortletInfo getPortletInfo(PortletInvocation invocation) throws PortletInvokerException
+ {
+ throw new NotYetImplemented();
+ }
+
public RegistrationContext getRegistrationContext() throws PortletInvokerException
{
throw new NotYetImplemented();
}
- public UserContext getUserContextFrom(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
+ public UserContext getUserContextFrom(WSRPPortletInfo info, PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
{
throw new NotYetImplemented();
}
@@ -113,7 +119,7 @@
throw new NotYetImplemented();
}
- public void setTemplatesIfNeeded(PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
+ public void setTemplatesIfNeeded(WSRPPortletInfo info, PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
{
throw new NotYetImplemented();
}
14 years, 9 months
gatein SVN: r5680 - in portal/branches/branch-GTNPORTAL-1731: webui/portal/src/main/java/conf/portal and 1 other directory.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2011-01-06 01:45:24 -0500 (Thu, 06 Jan 2011)
New Revision: 5680
Modified:
portal/branches/branch-GTNPORTAL-1731/web/portal/src/main/webapp/WEB-INF/conf/organization/organization-configuration.xml
portal/branches/branch-GTNPORTAL-1731/webui/portal/src/main/java/conf/portal/configuration.xml
Log:
GTNPORTAL-1378 Remove the services from the portal configuration.xml in jar files
Modified: portal/branches/branch-GTNPORTAL-1731/web/portal/src/main/webapp/WEB-INF/conf/organization/organization-configuration.xml
===================================================================
--- portal/branches/branch-GTNPORTAL-1731/web/portal/src/main/webapp/WEB-INF/conf/organization/organization-configuration.xml 2011-01-06 06:43:16 UTC (rev 5679)
+++ portal/branches/branch-GTNPORTAL-1731/web/portal/src/main/webapp/WEB-INF/conf/organization/organization-configuration.xml 2011-01-06 06:45:24 UTC (rev 5680)
@@ -298,56 +298,5 @@
</object-param>
</init-params>
</component-plugin>
-
-<!--
- <component-plugin>
- <name>ecm.new.user.event.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.services.jcr.ext.hierarchy.impl.NewUserListener</type>
- <description>description</description>
- <init-params>
- <object-param>
- <name>configuration</name>
- <description>description</description>
- <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig">
- <field name="repository"><string>repository</string></field>
- <field name="workspaces">
- <collection type="java.util.ArrayList">
- <value><string>portal-system</string></value>
- </collection>
- </field>
- <field name="jcrPaths">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
- <field name="alias"><string>userApplicationData</string></field>
- <field name="path"><string>ApplicationData</string></field>
- <field name="nodeType"><string>nt:unstructured</string></field>
- <field name="permissions">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
- <field name="identity"><string>*:/platform/administrators</string></field>
- <field name="read"><string>true</string></field>
- <field name="addNode"><string>true</string></field>
- <field name="setProperty"><string>true</string></field>
- <field name="remove"><string>true</string></field>
- </object>
- </value>
- </collection>
- </field>
- <field name="mixinTypes">
- <collection type="java.util.ArrayList">
- </collection>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
--->
</external-component-plugins>
</configuration>
Modified: portal/branches/branch-GTNPORTAL-1731/webui/portal/src/main/java/conf/portal/configuration.xml
===================================================================
--- portal/branches/branch-GTNPORTAL-1731/webui/portal/src/main/java/conf/portal/configuration.xml 2011-01-06 06:43:16 UTC (rev 5679)
+++ portal/branches/branch-GTNPORTAL-1731/webui/portal/src/main/java/conf/portal/configuration.xml 2011-01-06 06:45:24 UTC (rev 5680)
@@ -34,7 +34,6 @@
<component>
<key>org.exoplatform.services.resources.LocalePolicy</key>
- <!--type>org.exoplatform.portal.application.NoBrowserLocalePolicyService</type-->
<type>org.exoplatform.portal.application.localization.DefaultLocalePolicyService</type>
</component>
14 years, 9 months
gatein SVN: r5679 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2011-01-06 01:43:16 -0500 (Thu, 06 Jan 2011)
New Revision: 5679
Modified:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_43_ChangeApplicationWhenEditLayoutForGroupPage.html
Log:
TESTVN-2313 - Daily tests on GateIn - Clean and improve scripts
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_43_ChangeApplicationWhenEditLayoutForGroupPage.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_43_ChangeApplicationWhenEditLayoutForGroupPage.html 2011-01-05 04:57:05 UTC (rev 5678)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_43_ChangeApplicationWhenEditLayoutForGroupPage.html 2011-01-06 06:43:16 UTC (rev 5679)
@@ -258,17 +258,17 @@
</tr>
<tr>
<td>mouseOver</td>
- <td>//div[2]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/div[2]</td>
+ <td>//div[3]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/div[2]</td>
<td>Calculator</td>
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[2]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/a[1]</td>
+ <td>//div[3]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/a[1]</td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>//div[2]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/a[1]</td>
+ <td>//div[3]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/a[1]</td>
<td></td>
</tr>
<tr>
@@ -388,17 +388,17 @@
</tr>
<tr>
<td>mouseOver</td>
- <td>//div[2]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/div[2]</td>
+ <td>//div[3]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/div[2]</td>
<td>Test_SNF_PRL_43</td>
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[2]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/div[1]</td>
+ <td>//div[3]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/div[1]</td>
<td></td>
</tr>
<tr>
<td>dragAndDropToObject</td>
- <td>//div[2]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/div[1]</td>
+ <td>//div[3]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/div[1]</td>
<td>css=div[class='LAYOUT-BLOCK LAYOUT-PORTLET']</td>
</tr>
<tr>
14 years, 9 months
gatein SVN: r5678 - in exo/portal/branches/webos-gatein-branch: webui/portal/src/main/java/org/exoplatform/portal/webui/page and 1 other directory.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2011-01-04 23:57:05 -0500 (Tue, 04 Jan 2011)
New Revision: 5678
Modified:
exo/portal/branches/webos-gatein-branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
exo/portal/branches/webos-gatein-branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java
Log:
WEBOS-386 Error after edit a Desktop page via Page management
Modified: exo/portal/branches/webos-gatein-branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
--- exo/portal/branches/webos-gatein-branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2011-01-04 12:48:43 UTC (rev 5677)
+++ exo/portal/branches/webos-gatein-branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2011-01-05 04:57:05 UTC (rev 5678)
@@ -431,6 +431,8 @@
UIPageBrowser.msg.NotViewPage=You have not the rights to view this page.
UIPageBrowser.msg.edit.NotEditPage=You have not the rights to edit this page.
UIPageBrowser.msg.delete.NotDelete=You have not the rights to delete this page.
+UIPageBrowser.msg.edit.NotEditDesktopPage=Don't allow edit a desktop page here.
+UIPageBrowser.msg.delete.NotDeleteDesktopPage=A desktop page can not be deleted.
UIPageBrowser.selectItem.ownerType=Owner Type
UIPageBrowser.selectItem.ownerId=Owner Id
UIPageBrowser.selectItem.name=Name
Modified: exo/portal/branches/webos-gatein-branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java
===================================================================
--- exo/portal/branches/webos-gatein-branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java 2011-01-04 12:48:43 UTC (rev 5677)
+++ exo/portal/branches/webos-gatein-branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java 2011-01-05 04:57:05 UTC (rev 5678)
@@ -266,13 +266,20 @@
return;
}
Page page = service.getPage(id, pcontext.getRemoteUser());
+ if (page != null && page.getName().equals("webos"))
+ {
+ uiPortalApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.delete.NotDeleteDesktopPage", new String[]{id}, 1));
+ pcontext.addUIComponentToUpdateByAjax(uiPortalApp.getUIPopupMessages());
+ return;
+ }
+
if (page == null || !page.isModifiable())
{
uiPortalApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.delete.NotDelete", new String[]{id}, 1));
pcontext.addUIComponentToUpdateByAjax(uiPortalApp.getUIPopupMessages());
return;
}
-
+
UIVirtualList virtualList = uiPageBrowser.getChild(UIVirtualList.class);
UIRepeater repeater = (UIRepeater)virtualList.getDataFeed();
PageListAccess datasource = (PageListAccess)repeater.getDataSource();
@@ -398,6 +405,13 @@
pcontext.addUIComponentToUpdateByAjax(uiPortalApp.getUIPopupMessages());
return;
}
+
+ if (page.getName().equals("webos"))
+ {
+ uiPortalApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.edit.NotEditDesktopPage", new String[]{id}, 1));
+ pcontext.addUIComponentToUpdateByAjax(uiPortalApp.getUIPopupMessages());
+ return;
+ }
//Check current user 's permissions on the page
UserACL userACL = uiPageBrowser.getApplicationComponent(UserACL.class);
@@ -407,7 +421,7 @@
pcontext.addUIComponentToUpdateByAjax(uiPortalApp.getUIPopupMessages());
return;
}
-
+
//Switch portal application to edit mode
uiPortalApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
UIWorkingWorkspace uiWorkingWS = uiPortalApp.findFirstComponentOfType(UIWorkingWorkspace.class);
@@ -421,17 +435,6 @@
if (uiPageBody.getUIComponent() != null)
uiPageBody.setUIComponent(null);
- if (Page.DESKTOP_PAGE.equals(page.getFactoryId()))
- {
- UIMaskWorkspace uiMaskWS = uiPortalApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
- UIPageForm uiPageForm = uiMaskWS.createUIComponent(UIPageForm.class, "UIBrowserPageForm", "UIPageForm");
- uiPageForm.setValues(uiPage);
- uiMaskWS.setUIComponent(uiPageForm);
- uiMaskWS.setShow(true);
- pcontext.addUIComponentToUpdateByAjax(uiMaskWS);
- return;
- }
-
editInlineWS.setRendered(true);
editInlineWS.setUIComponent(uiPage);
14 years, 9 months
gatein SVN: r5677 - components/wci/branches.
by do-not-reply@jboss.org
Author: alain_defrance
Date: 2011-01-04 07:48:43 -0500 (Tue, 04 Jan 2011)
New Revision: 5677
Removed:
components/wci/branches/adf/
Log:
Removing merged branche
14 years, 9 months
gatein SVN: r5676 - in components/wsrp/trunk/admin-gui/src/main: webapp/WEB-INF and 3 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-01-04 05:00:13 -0500 (Tue, 04 Jan 2011)
New Revision: 5676
Added:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/RedirectToErrorIfWSRPUnavailablePhaseListener.java
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/WSRPVersionBean.java
Modified:
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/faces-config.xml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/common/template.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/error.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/errorTemplate.xhtml
Log:
- GTNWSRP-191: Added PhaseListener to check if the WSRP service is available before restoring the view.
- GTNWSRP-193: Added WSRPVersionBean to display version of the WSRP service.
Added: components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/RedirectToErrorIfWSRPUnavailablePhaseListener.java
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/RedirectToErrorIfWSRPUnavailablePhaseListener.java (rev 0)
+++ components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/RedirectToErrorIfWSRPUnavailablePhaseListener.java 2011-01-04 10:00:13 UTC (rev 5676)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2011, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.gatein.wsrp.admin.ui;
+
+import javax.faces.application.NavigationHandler;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class RedirectToErrorIfWSRPUnavailablePhaseListener implements PhaseListener
+{
+ /** Same value as used in faces-config.xml to set the ConsumerRegistry */
+ private static final String CONSUMER_REGISTRY = "ConsumerRegistry";
+ /** Same value as used in faces-config.xml to set the ProducerConfigurationService */
+ private static final String PRODUCER_CONFIGURATION_SERVICE = "ProducerConfigurationService";
+
+ public void afterPhase(PhaseEvent event)
+ {
+ // nothing to do
+ }
+
+ public void beforePhase(PhaseEvent event)
+ {
+ FacesContext context = event.getFacesContext();
+
+ // if we don't have a ConsumerRegistry or ProducerConfigurationService set in the application scope, then it means
+ // that the WSRP is not properly setup and we need to redirect to the error page
+ ExternalContext externalContext = context.getExternalContext();
+ Map<String, Object> applicationMap = externalContext.getApplicationMap();
+ if (!applicationMap.containsKey(CONSUMER_REGISTRY) || !applicationMap.containsKey(PRODUCER_CONFIGURATION_SERVICE))
+ {
+ NavigationHandler navigationHandler = context.getApplication().getNavigationHandler();
+ navigationHandler.handleNavigation(context, null, "error");
+ }
+ }
+
+ public PhaseId getPhaseId()
+ {
+ return PhaseId.RESTORE_VIEW;
+ }
+}
Added: components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/WSRPVersionBean.java
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/WSRPVersionBean.java (rev 0)
+++ components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/WSRPVersionBean.java 2011-01-04 10:00:13 UTC (rev 5676)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2011, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.gatein.wsrp.admin.ui;
+
+import org.gatein.wsrp.WSRPConstants;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class WSRPVersionBean
+{
+ public String getVersion()
+ {
+ return WSRPConstants.WSRP_SERVICE_VERSION;
+ }
+}
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties 2011-01-04 09:57:01 UTC (rev 5675)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties 2011-01-04 10:00:13 UTC (rev 5676)
@@ -1,6 +1,6 @@
#
# JBoss, a division of Red Hat
-# Copyright 2010, Red Hat Middleware, LLC, and individual
+# Copyright 2011, Red Hat Middleware, LLC, and individual
# contributors as indicated by the @authors tag. See the
# copyright.txt in the distribution for a full listing of
# individual contributors.
@@ -220,4 +220,5 @@
org.jboss.portal.object.name.admin.WSRP=WSRP
INVALID_NAME_ERROR=''{0}'' is an invalid {1} name: Cannot be null, empty or contain '/', '.', '\\', '<', '>', '(', ')', '=' or '%5c'
-DUPLICATE_ERROR=A {1} named ''{0}'' already exists!
\ No newline at end of file
+DUPLICATE_ERROR=A {1} named ''{0}'' already exists!
+unavailable_service = WSRP service is unavailble. Please activate it before using this portlet.
\ No newline at end of file
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties 2011-01-04 09:57:01 UTC (rev 5675)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties 2011-01-04 10:00:13 UTC (rev 5676)
@@ -1,6 +1,6 @@
#
# JBoss, a division of Red Hat
-# Copyright 2010, Red Hat Middleware, LLC, and individual
+# Copyright 2011, Red Hat Middleware, LLC, and individual
# contributors as indicated by the @authors tag. See the
# copyright.txt in the distribution for a full listing of
# individual contributors.
@@ -182,4 +182,5 @@
edit_consumer_import_title=Portlets en import
bean_consumermanager_refresh_failure_wsdl=Le rafra\u00eechissement a \u00e9chou\u00e9 (probablement \u00e0 cause d'URL WSDL non valide)
producer_config_wsdl_v1=Adresse WSDL pour le Producteur WSRP v1:
-producer_config_wsdl_v2=Adresse WSDL pour le Producteur WSRP v2:
\ No newline at end of file
+producer_config_wsdl_v2=Adresse WSDL pour le Producteur WSRP v2:
+unavailable_service=Le service WSRP n''est pas disponible. Veuillez l''activer avant d'utiliser cette portlet.
\ No newline at end of file
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/faces-config.xml 2011-01-04 09:57:01 UTC (rev 5675)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/faces-config.xml 2011-01-04 10:00:13 UTC (rev 5676)
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2011, Red Hat Middleware, LLC, and individual
~ contributors as indicated by the @authors tag. See the
~ copyright.txt in the distribution for a full listing of
~ individual contributors.
@@ -40,6 +40,10 @@
</locale-config>
</application>
+ <lifecycle>
+ <phase-listener>org.gatein.wsrp.admin.ui.RedirectToErrorIfWSRPUnavailablePhaseListener</phase-listener>
+ </lifecycle>
+
<converter>
<converter-for-class>org.gatein.wsrp.registration.LocalizedString</converter-for-class>
<converter-class>org.gatein.wsrp.admin.ui.LocalizedStringConverter</converter-class>
@@ -56,6 +60,11 @@
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>
<managed-bean>
+ <managed-bean-name>version</managed-bean-name>
+ <managed-bean-class>org.gatein.wsrp.admin.ui.WSRPVersionBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
<managed-bean-name>consumersMgr</managed-bean-name>
<managed-bean-class>org.gatein.wsrp.admin.ui.ConsumerManagerBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
@@ -176,4 +185,11 @@
<to-view-id>/jsf/consumers/exports/import.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>error</from-outcome>
+ <to-view-id>/jsf/error.xhtml</to-view-id>
+ <!--<redirect/>-->
+ </navigation-case>
+ </navigation-rule>
</faces-config>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/common/template.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/common/template.xhtml 2011-01-04 09:57:01 UTC (rev 5675)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/common/template.xhtml 2011-01-04 10:00:13 UTC (rev 5676)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2011, Red Hat Middleware, LLC, and individual
~ contributors as indicated by the @authors tag. See the
~ copyright.txt in the distribution for a full listing of
~ individual contributors.
@@ -21,6 +21,8 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
+
+
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jstl/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
@@ -56,5 +58,6 @@
</div>
</div>
</div>
+ <p align="right" style="font-size: 8px">WSRP version #{version.version}</p>
</div>
</ui:composition>
\ No newline at end of file
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/error.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/error.xhtml 2011-01-04 09:57:01 UTC (rev 5675)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/error.xhtml 2011-01-04 10:00:13 UTC (rev 5676)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2011, Red Hat Middleware, LLC, and individual
~ contributors as indicated by the @authors tag. See the
~ copyright.txt in the distribution for a full listing of
~ individual contributors.
@@ -21,13 +21,21 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
+
+
<ui:decorate template="errorTemplate.xhtml" xmlns="http://www.w3.org/1999/xhtml"
- xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:c="http://java.sun.com/jstl/core"
- xmlns:webui="http://jboss.org/gatein">
+ xmlns:h="http://java.sun.com/jsf/html">
<ui:define name="content">
- An Error Has Occured.
+ <div class="portlet-msg">
+ <div class="portlet-msg-icon">
+ <h:graphicImage url="/img/msgIcon_Warning.gif" alt="/!\"/>
+ </div>
+ <div class="portlet-msg-body">
+ <p class="portlet-msg-alert">
+ #{i18n.unavailable_service}
+ </p>
+ </div>
+ </div>
</ui:define>
</ui:decorate>
\ No newline at end of file
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/errorTemplate.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/errorTemplate.xhtml 2011-01-04 09:57:01 UTC (rev 5675)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/errorTemplate.xhtml 2011-01-04 10:00:13 UTC (rev 5676)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2011, Red Hat Middleware, LLC, and individual
~ contributors as indicated by the @authors tag. See the
~ copyright.txt in the distribution for a full listing of
~ individual contributors.
@@ -21,12 +21,11 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
+
+
<ui:decorate template="common/template.xhtml" xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:c="http://java.sun.com/jstl/core"
- xmlns:webui="http://jboss.org/gatein">
+ xmlns:h="http://java.sun.com/jsf/html">
<ui:define name="topnav">
<h:form id="cons-temp-form" styleClass="cons-temp-form">
@@ -40,7 +39,8 @@
<div class="LeftTab">
<div class="RightTab">
<div class="MiddleTab">
- #{i18n.nav_tabs_consumers}
+ <h:commandLink id="consumersTab" action="consumers"
+ value="#{i18n.nav_tabs_consumers}"/>
</div>
</div>
</div>
14 years, 9 months