JBoss Portal SVN: r13619 - modules/portlet/trunk/build.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-29 09:33:45 -0400 (Wed, 29 Jul 2009)
New Revision: 13619
Modified:
modules/portlet/trunk/build/pom.xml
Log:
use JBoss Unit 1.2.3
Modified: modules/portlet/trunk/build/pom.xml
===================================================================
--- modules/portlet/trunk/build/pom.xml 2009-07-29 13:08:20 UTC (rev 13618)
+++ modules/portlet/trunk/build/pom.xml 2009-07-29 13:33:45 UTC (rev 13619)
@@ -35,7 +35,7 @@
<version.jboss-remoting>2.2.1.GA</version.jboss-remoting>
<version.jboss.portal.common>1.2.3</version.jboss.portal.common>
<version.jboss.portal.web>1.2.0-SNAPSHOT</version.jboss.portal.web>
- <version.jboss.unit>1.2.2</version.jboss.unit>
+ <version.jboss.unit>1.2.3</version.jboss.unit>
<version.log4j>1.2.14</version.log4j>
<version.apache.commons-logging>1.1.1</version.apache.commons-logging>
<version.apache.commons-httpclient>3.0.1</version.apache.commons-httpclient>
@@ -84,6 +84,13 @@
<enabled>false</enabled>
</snapshots>
</repository>
+<!--
+<repository>
+ <id>openqa-releases</id>
+ <name>OpenQA Selenium Repository</name>
+ <url>http://archiva.openqa.org/repository/releases/</url>
+ </repository>
+-->
</repositories>
14 years, 9 months
JBoss Portal SVN: r13618 - in jbossexo/modules/portlet/trunk: exo/src/main/java/org/jboss/portal/portlet/exo and 3 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-07-29 09:08:20 -0400 (Wed, 29 Jul 2009)
New Revision: 13618
Modified:
jbossexo/modules/portlet/trunk/exo/pom.xml
jbossexo/modules/portlet/trunk/exo/src/main/java/org/jboss/portal/portlet/exo/ExoKernelIntegration.java
jbossexo/modules/portlet/trunk/federation/src/main/java/org/jboss/portal/portlet/federation/impl/FederatingPortletInvokerService.java
jbossexo/modules/portlet/trunk/portal/pom.xml
jbossexo/modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/aspects/portlet/ContextDispatcherInterceptor.java
Log:
- Use FederatingPortletInvoker so that other PIs (WSRP consumers) can be registered and used.
- Inject ServletContainer directly in ContextDispatcherInterceptor to avoid dependency on ExoContainer.
- Added dependencies in POM files so that things compile...
Modified: jbossexo/modules/portlet/trunk/exo/pom.xml
===================================================================
--- jbossexo/modules/portlet/trunk/exo/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
+++ jbossexo/modules/portlet/trunk/exo/pom.xml 2009-07-29 13:08:20 UTC (rev 13618)
@@ -1,3 +1,26 @@
+<!--
+ ~ JBoss, a division of Red Hat
+ ~ Copyright 2009, 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.
+ -->
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
@@ -24,6 +47,24 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-federation</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-api</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ <version>${version.exo.kernel}</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
Modified: jbossexo/modules/portlet/trunk/exo/src/main/java/org/jboss/portal/portlet/exo/ExoKernelIntegration.java
===================================================================
--- jbossexo/modules/portlet/trunk/exo/src/main/java/org/jboss/portal/portlet/exo/ExoKernelIntegration.java 2009-07-29 12:38:44 UTC (rev 13617)
+++ jbossexo/modules/portlet/trunk/exo/src/main/java/org/jboss/portal/portlet/exo/ExoKernelIntegration.java 2009-07-29 13:08:20 UTC (rev 13618)
@@ -1,33 +1,31 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2009, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2009, 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.jboss.portal.portlet.exo;
-import javax.servlet.http.HttpServlet;
-
import org.exoplatform.container.ExoContainer;
import org.exoplatform.container.ExoContainerContext;
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
import org.jboss.portal.portlet.api.PortletInvoker;
-import org.jboss.portal.portlet.PortletInvokerInterceptor;
import org.jboss.portal.portlet.aspects.portlet.CCPPInterceptor;
import org.jboss.portal.portlet.aspects.portlet.ConsumerCacheInterceptor;
import org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor;
@@ -39,14 +37,17 @@
import org.jboss.portal.portlet.aspects.portlet.ValveInterceptor;
import org.jboss.portal.portlet.container.ContainerPortletDispatcher;
import org.jboss.portal.portlet.container.ContainerPortletInvoker;
+import org.jboss.portal.portlet.federation.FederatingPortletInvoker;
+import org.jboss.portal.portlet.federation.impl.FederatingPortletInvokerService;
import org.jboss.portal.portlet.impl.state.StateConverterV0;
import org.jboss.portal.portlet.impl.state.StateManagementPolicyService;
import org.jboss.portal.portlet.impl.state.producer.PortletStatePersistenceManagerService;
import org.jboss.portal.portlet.mc.PortletApplicationDeployer;
import org.jboss.portal.portlet.state.producer.ProducerPortletInvoker;
import org.jboss.portal.web.ServletContainer;
-import org.picocontainer.Startable;
+import javax.servlet.http.HttpServlet;
+
/**
* @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
* @version $Revision$
@@ -55,33 +56,34 @@
{
protected PortletApplicationDeployer portletApplicationRegistry;
-
+ private static final String LOCAL_PORTLET_INVOKER_ID = "local";
+
public void init()
{
ExoContainer container = ExoContainerContext.getCurrentContainer();
-
+
// The producer persistence manager
PortletStatePersistenceManagerService producerPersistanceManager = new PortletStatePersistenceManagerService();
-
+
// The producer state management policy
StateManagementPolicyService producerStateManagementPolicy = new StateManagementPolicyService();
producerStateManagementPolicy.setPersistLocally(true);
-
+
// The producer state converter
- StateConverterV0 producerStateConverter = new StateConverterV0();
-
+ StateConverterV0 producerStateConverter = new StateConverterV0();
+
// The portlet container invoker
ContainerPortletInvoker containerPortletInvoker = new ContainerPortletInvoker();
// continued below
-
+
// The portlet application deployer
portletApplicationRegistry = new PortletApplicationDeployer();
portletApplicationRegistry.setContainerPortletInvoker(containerPortletInvoker);
// ServletContainer servletContainer = (ServletContainer)container.getComponentInstance(ServletContainer.class);
// servletContainer.addWebAppListener(portletApplicationRegistry);
-
+
//Container Stack
ContainerPortletDispatcher portletContainerDispatcher = new ContainerPortletDispatcher();
EventPayloadInterceptor eventPayloadInterceptor = new EventPayloadInterceptor();
@@ -99,27 +101,36 @@
ValveInterceptor valveInterceptor = new ValveInterceptor();
valveInterceptor.setPortletApplicationRegistry(portletApplicationRegistry);
valveInterceptor.setNext(secureTransportInterceptor);
-
-
+
+ // inject ServletContainer in objects that need it
ServletContainer servletContainer = (ServletContainer)container.getComponentInstance(ServletContainer.class);
portletApplicationRegistry.setServletContainer(servletContainer);
+ contextDispatcherInterceptor.setServletContainer(servletContainer);
+
// portletApplicationRegistry.start();
//servletContainer.addWebAppListener(portletApplicationRegistry);
-
+
// The portlet container invoker continued
containerPortletInvoker.setNext(valveInterceptor);
+
+ // Federating portlet invoker
+ FederatingPortletInvoker federatingPortletInvoker = new FederatingPortletInvokerService();
+
+ // register local portlet invoker with federating portlet invoker
+ federatingPortletInvoker.registerInvoker(LOCAL_PORTLET_INVOKER_ID, containerPortletInvoker);
+
/* register with container */
- container.registerComponentInstance(PortletInvoker.class, containerPortletInvoker);
-
-
+ container.registerComponentInstance(PortletInvoker.class, federatingPortletInvoker);
+
+
// The producer portlet invoker
ProducerPortletInvoker producerPortletInvoker = new ProducerPortletInvoker();
producerPortletInvoker.setNext(containerPortletInvoker);
producerPortletInvoker.setPersistenceManager(producerPersistanceManager);
producerPortletInvoker.setStateManagementPolicy(producerStateManagementPolicy);
producerPortletInvoker.setStateConverter(producerStateConverter);
-
-
+
+
// The consumer portlet invoker
PortletCustomizationInterceptor portletCustomizationInterceptor = new PortletCustomizationInterceptor();
portletCustomizationInterceptor.setNext(producerPortletInvoker);
@@ -127,13 +138,13 @@
consumerCacheInterceptor.setNext(portletCustomizationInterceptor);
PortletInvokerInterceptor consumerPortletInvoker = new PortletInvokerInterceptor();
consumerPortletInvoker.setNext(consumerCacheInterceptor);
-
+
container.registerComponentInstance(PortletInvokerInterceptor.class, consumerPortletInvoker);
-
+
portletApplicationRegistry.start();
}
-
+
public void destroy()
{
if (portletApplicationRegistry != null)
Modified: jbossexo/modules/portlet/trunk/federation/src/main/java/org/jboss/portal/portlet/federation/impl/FederatingPortletInvokerService.java
===================================================================
--- jbossexo/modules/portlet/trunk/federation/src/main/java/org/jboss/portal/portlet/federation/impl/FederatingPortletInvokerService.java 2009-07-29 12:38:44 UTC (rev 13617)
+++ jbossexo/modules/portlet/trunk/federation/src/main/java/org/jboss/portal/portlet/federation/impl/FederatingPortletInvokerService.java 2009-07-29 13:08:20 UTC (rev 13618)
@@ -1,41 +1,42 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2009, 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.jboss.portal.portlet.federation.impl;
+import org.apache.log4j.Logger;
+import org.jboss.portal.common.util.ParameterValidation;
import org.jboss.portal.portlet.api.InvokerUnavailableException;
import org.jboss.portal.portlet.api.NoSuchPortletException;
import org.jboss.portal.portlet.api.Portlet;
import org.jboss.portal.portlet.api.PortletContext;
-import org.jboss.portal.portlet.api.PortletInvokerException;
import org.jboss.portal.portlet.api.PortletInvoker;
-import org.jboss.portal.portlet.api.state.PropertyMap;
-import org.jboss.portal.portlet.federation.FederatedPortletInvoker;
-import org.jboss.portal.portlet.federation.FederatingPortletInvoker;
+import org.jboss.portal.portlet.api.PortletInvokerException;
import org.jboss.portal.portlet.api.invocation.PortletInvocation;
import org.jboss.portal.portlet.api.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.api.state.PropertyChange;
import org.jboss.portal.portlet.api.state.DestroyCloneFailure;
-import org.apache.log4j.Logger;
+import org.jboss.portal.portlet.api.state.PropertyChange;
+import org.jboss.portal.portlet.api.state.PropertyMap;
+import org.jboss.portal.portlet.federation.FederatedPortletInvoker;
+import org.jboss.portal.portlet.federation.FederatingPortletInvoker;
import java.util.Collection;
import java.util.Collections;
@@ -65,14 +66,8 @@
public synchronized FederatedPortletInvoker registerInvoker(String federatedId, PortletInvoker federatedInvoker)
{
- if (federatedId == null)
- {
- throw new IllegalArgumentException("No null id");
- }
- if (federatedInvoker == null)
- {
- throw new IllegalArgumentException("No null invoker");
- }
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(federatedId, "Federated PortletInvoker id", null);
+ ParameterValidation.throwIllegalArgExceptionIfNull(federatedInvoker, "Federated PortletInvoker");
if (registry.containsKey(federatedId))
{
throw new IllegalArgumentException("Attempting dual registration of " + federatedId);
@@ -86,10 +81,7 @@
public synchronized void unregisterInvoker(String federatedId)
{
- if (federatedId == null)
- {
- throw new IllegalArgumentException("No null id accepted");
- }
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(federatedId, "Federated PortletInvoker id", null);
if (!registry.containsKey(federatedId))
{
throw new IllegalArgumentException("Attempting to unregister unknown invoker " + federatedId);
@@ -101,10 +93,7 @@
public FederatedPortletInvoker getFederatedInvoker(String federatedId) throws IllegalArgumentException
{
- if (federatedId == null)
- {
- throw new IllegalArgumentException("No null id provided");
- }
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(federatedId, "Federated PortletInvoker id", null);
return registry.get(federatedId);
}
@@ -211,14 +200,11 @@
* @param compoundPortletContext the portlet context for which the invoker is to be retrieved
* @return the portlet invoker associated with the specified compound portlet id
* @throws IllegalArgumentException if the compound portlet id is not well formed or null
- * @throws NoSuchPortletException if not such portlet exist
+ * @throws NoSuchPortletException if not such portlet exist
*/
private FederatedPortletInvoker getFederatedPortletInvokerFor(PortletContext compoundPortletContext) throws IllegalArgumentException, NoSuchPortletException
{
- if (compoundPortletContext == null)
- {
- throw new IllegalArgumentException("No null portlet id accepted");
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(compoundPortletContext, "Portlet id");
//
String compoundPortletId = compoundPortletContext.getId();
Modified: jbossexo/modules/portlet/trunk/portal/pom.xml
===================================================================
--- jbossexo/modules/portlet/trunk/portal/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
+++ jbossexo/modules/portlet/trunk/portal/pom.xml 2009-07-29 13:08:20 UTC (rev 13618)
@@ -1,3 +1,26 @@
+<!--
+ ~ JBoss, a division of Red Hat
+ ~ Copyright 2009, 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.
+ -->
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
@@ -96,6 +119,14 @@
<groupId>apache-taglibs</groupId>
<artifactId>standard</artifactId>
</dependency>
+
+
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ <version>${version.exo.kernel}</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<build>
Modified: jbossexo/modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/aspects/portlet/ContextDispatcherInterceptor.java
===================================================================
--- jbossexo/modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/aspects/portlet/ContextDispatcherInterceptor.java 2009-07-29 12:38:44 UTC (rev 13617)
+++ jbossexo/modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/aspects/portlet/ContextDispatcherInterceptor.java 2009-07-29 13:08:20 UTC (rev 13618)
@@ -1,45 +1,42 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2009, 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.jboss.portal.portlet.aspects.portlet;
-import org.exoplatform.container.ExoContainer;
-import org.exoplatform.container.ExoContainerContext;
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
+import org.jboss.portal.portlet.api.PortletInvokerException;
+import org.jboss.portal.portlet.api.invocation.PortletInvocation;
+import org.jboss.portal.portlet.api.invocation.response.PortletInvocationResponse;
+import org.jboss.portal.portlet.api.spi.ServerContext;
+import org.jboss.portal.portlet.container.ContainerPortletInvoker;
import org.jboss.portal.portlet.container.PortletApplication;
import org.jboss.portal.portlet.container.PortletContainer;
-import org.jboss.portal.portlet.container.ContainerPortletInvoker;
import org.jboss.portal.web.RequestDispatchCallback;
import org.jboss.portal.web.ServletContainer;
-import org.jboss.portal.web.ServletContainerFactory;
-import org.jboss.portal.portlet.api.invocation.PortletInvocation;
-import org.jboss.portal.portlet.PortletInvokerInterceptor;
-import org.jboss.portal.portlet.api.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.api.spi.ServerContext;
-import org.jboss.portal.portlet.api.PortletInvokerException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
@@ -55,29 +52,20 @@
public static final String REQ_ATT_COMPONENT_INVOCATION = "org.jboss.portal.attribute.component_invocation";
/** . */
- private ServletContainerFactory servletContainerFactory;
+ private ServletContainer servletContainer;
- public ServletContainerFactory getServletContainerFactory()
+ public void setServletContainer(ServletContainer servletContainer)
{
- return servletContainerFactory;
+ this.servletContainer = servletContainer;
}
- public void setServletContainerFactory(ServletContainerFactory servletContainerFactory)
- {
- this.servletContainerFactory = servletContainerFactory;
- }
-
public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
{
PortletContainer container = (PortletContainer)invocation.getAttribute(ContainerPortletInvoker.PORTLET_CONTAINER);
PortletApplication portletApplication = container.getPortletApplication();
ServerContext reqCtx = invocation.getServerContext();
ServletContext targetCtx = portletApplication.getContext().getServletContext();
-
- ExoContainer exoContainer = ExoContainerContext.getCurrentContainer();
- ServletContainer servletContainer = (ServletContainer) exoContainer.getComponentInstance(ServletContainer.class);
-
- //ServletContainer servletContainer = servletContainerFactory.getServletContainer();
+
try
{
return (PortletInvocationResponse)reqCtx.dispatch(servletContainer, targetCtx, callback, invocation);
14 years, 9 months
JBoss Portal SVN: r13617 - in modules/test/tags/JBOSS_UNIT_1_2_3: build and 15 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-29 08:38:44 -0400 (Wed, 29 Jul 2009)
New Revision: 13617
Modified:
modules/test/tags/JBOSS_UNIT_1_2_3/build/pom.xml
modules/test/tags/JBOSS_UNIT_1_2_3/docs/pom.xml
modules/test/tags/JBOSS_UNIT_1_2_3/docs/user-guide/pom.xml
modules/test/tags/JBOSS_UNIT_1_2_3/mc/pom.xml
modules/test/tags/JBOSS_UNIT_1_2_3/pom.xml
modules/test/tags/JBOSS_UNIT_1_2_3/releaseLibs.sh
modules/test/tags/JBOSS_UNIT_1_2_3/remote/pom.xml
modules/test/tags/JBOSS_UNIT_1_2_3/test/agent/pom.xml
modules/test/tags/JBOSS_UNIT_1_2_3/test/core/pom.xml
modules/test/tags/JBOSS_UNIT_1_2_3/test/generic/pom.xml
modules/test/tags/JBOSS_UNIT_1_2_3/test/jboss/pom.xml
modules/test/tags/JBOSS_UNIT_1_2_3/test/opends/pom.xml
modules/test/tags/JBOSS_UNIT_1_2_3/tooling/ant/pom.xml
modules/test/tags/JBOSS_UNIT_1_2_3/tooling/core/pom.xml
modules/test/tags/JBOSS_UNIT_1_2_3/tooling/examples/maven2/pom.xml
modules/test/tags/JBOSS_UNIT_1_2_3/tooling/maven2/pom.xml
modules/test/tags/JBOSS_UNIT_1_2_3/tooling/pom.xml
modules/test/tags/JBOSS_UNIT_1_2_3/unit/pom.xml
Log:
1.2.3
Modified: modules/test/tags/JBOSS_UNIT_1_2_3/build/pom.xml
===================================================================
--- modules/test/tags/JBOSS_UNIT_1_2_3/build/pom.xml 2009-07-29 12:27:14 UTC (rev 13616)
+++ modules/test/tags/JBOSS_UNIT_1_2_3/build/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
@@ -18,7 +18,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<packaging>pom</packaging>
<name>JBoss Portal Test Module</name>
<url>http://www.jboss.com/products/jbossmc</url>
Modified: modules/test/tags/JBOSS_UNIT_1_2_3/docs/pom.xml
===================================================================
--- modules/test/tags/JBOSS_UNIT_1_2_3/docs/pom.xml 2009-07-29 12:27:14 UTC (rev 13616)
+++ modules/test/tags/JBOSS_UNIT_1_2_3/docs/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
@@ -4,13 +4,13 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<artifactId>docs-aggregator</artifactId>
<packaging>pom</packaging>
<name>JBoss Portal Portlet Docs Aggregator</name>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<url>http://labs.jboss.com/jbossportal</url>
<modules>
Modified: modules/test/tags/JBOSS_UNIT_1_2_3/docs/user-guide/pom.xml
===================================================================
--- modules/test/tags/JBOSS_UNIT_1_2_3/docs/user-guide/pom.xml 2009-07-29 12:27:14 UTC (rev 13616)
+++ modules/test/tags/JBOSS_UNIT_1_2_3/docs/user-guide/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
@@ -60,7 +60,7 @@
<groupId>org.jboss.unit</groupId>
<artifactId>user-guide-${translation}</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<packaging>jdocbook</packaging>
<name>User_Guide_(${translation})</name>
Modified: modules/test/tags/JBOSS_UNIT_1_2_3/mc/pom.xml
===================================================================
--- modules/test/tags/JBOSS_UNIT_1_2_3/mc/pom.xml 2009-07-29 12:27:14 UTC (rev 13616)
+++ modules/test/tags/JBOSS_UNIT_1_2_3/mc/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/tags/JBOSS_UNIT_1_2_3/pom.xml
===================================================================
--- modules/test/tags/JBOSS_UNIT_1_2_3/pom.xml 2009-07-29 12:27:14 UTC (rev 13616)
+++ modules/test/tags/JBOSS_UNIT_1_2_3/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
@@ -5,7 +5,7 @@
<artifactId>module-aggregator</artifactId>
<packaging>pom</packaging>
<name>JBoss Portal Modules Test</name>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<url>http://labs.jboss.com/jbossportal</url>
<dependencies/>
Modified: modules/test/tags/JBOSS_UNIT_1_2_3/releaseLibs.sh
===================================================================
--- modules/test/tags/JBOSS_UNIT_1_2_3/releaseLibs.sh 2009-07-29 12:27:14 UTC (rev 13616)
+++ modules/test/tags/JBOSS_UNIT_1_2_3/releaseLibs.sh 2009-07-29 12:38:44 UTC (rev 13617)
@@ -1,4 +1,4 @@
-repos=$HOME/Dev/portal-modules-repos/test/trunk-SNAPSHOT/lib
+repos=$HOME/Dev/portal-modules-repos/test/1.2.3/lib
thirdparty=$HOME/Dev/jboss-portal-2.7/thirdparty/jboss-portal/modules/test/lib/
echo "Copies current version of test libraries either to local repository copy or Portal thirdparty to test or release purpose"
@@ -27,21 +27,21 @@
echo "Old test framework"
-cp test/jboss/target/portal-test-jboss-*-SNAPSHOT.jar $loc/portal-test-jboss-lib.jar
-cp test/agent/target/portal-test-agent-*-SNAPSHOT.sar $loc/portal-test-agent.sar
-cp test/core/target/portal-test-*-SNAPSHOT.jar $loc/portal-test-lib.jar
-cp test/generic/target/portal-test-generic-*-SNAPSHOT.jar $loc/portal-test-generic-lib.jar
-cp test/jboss/target/portal-test-jboss-*-SNAPSHOT.jar $loc/portal-test-jboss-lib.jar
+cp test/jboss/target/portal-test-jboss-*.jar $loc/portal-test-jboss-lib.jar
+cp test/agent/target/portal-test-agent-*.sar $loc/portal-test-agent.sar
+cp test/core/target/portal-test-*.jar $loc/portal-test-lib.jar
+cp test/generic/target/portal-test-generic-*.jar $loc/portal-test-generic-lib.jar
+cp test/jboss/target/portal-test-jboss-*.jar $loc/portal-test-jboss-lib.jar
echo "Missing opends???"
echo "JBoss Unit: old tooling is replaced by tooling-ant, tooling-core and tooling-maven2"
-cp unit/target/jboss-unit-*-SNAPSHOT.jar $loc/jboss-unit-lib.jar
-cp mc/target/jboss-unit-mc-*-SNAPSHOT.jar $loc/jboss-unit-mc-lib.jar
-cp remote/target/jboss-unit-remote-*-SNAPSHOT.jar $loc/jboss-unit-remote-lib.jar
-cp tooling/ant/target/jboss-unit-tooling-ant-*-SNAPSHOT.jar $loc/jboss-unit-tooling-ant-lib.jar
-cp tooling/core/target/jboss-unit-tooling-core-*-SNAPSHOT.jar $loc/jboss-unit-tooling-core-lib.jar
-cp tooling/maven2/target/jboss-unit-tooling-maven2-*-SNAPSHOT.jar $loc/jboss-unit-tooling-maven2-lib.jar
+cp unit/target/jboss-unit-*.jar $loc/jboss-unit-lib.jar
+cp mc/target/jboss-unit-mc-*.jar $loc/jboss-unit-mc-lib.jar
+cp remote/target/jboss-unit-remote-*.jar $loc/jboss-unit-remote-lib.jar
+cp tooling/ant/target/jboss-unit-tooling-ant-*.jar $loc/jboss-unit-tooling-ant-lib.jar
+cp tooling/core/target/jboss-unit-tooling-core-*.jar $loc/jboss-unit-tooling-core-lib.jar
+cp tooling/maven2/target/jboss-unit-tooling-maven2-*.jar $loc/jboss-unit-tooling-maven2-lib.jar
echo "Resources"
cp test/core/resources/config/*.xml $loc/../resources/
Modified: modules/test/tags/JBOSS_UNIT_1_2_3/remote/pom.xml
===================================================================
--- modules/test/tags/JBOSS_UNIT_1_2_3/remote/pom.xml 2009-07-29 12:27:14 UTC (rev 13616)
+++ modules/test/tags/JBOSS_UNIT_1_2_3/remote/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/tags/JBOSS_UNIT_1_2_3/test/agent/pom.xml
===================================================================
--- modules/test/tags/JBOSS_UNIT_1_2_3/test/agent/pom.xml 2009-07-29 12:27:14 UTC (rev 13616)
+++ modules/test/tags/JBOSS_UNIT_1_2_3/test/agent/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/tags/JBOSS_UNIT_1_2_3/test/core/pom.xml
===================================================================
--- modules/test/tags/JBOSS_UNIT_1_2_3/test/core/pom.xml 2009-07-29 12:27:14 UTC (rev 13616)
+++ modules/test/tags/JBOSS_UNIT_1_2_3/test/core/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/tags/JBOSS_UNIT_1_2_3/test/generic/pom.xml
===================================================================
--- modules/test/tags/JBOSS_UNIT_1_2_3/test/generic/pom.xml 2009-07-29 12:27:14 UTC (rev 13616)
+++ modules/test/tags/JBOSS_UNIT_1_2_3/test/generic/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/tags/JBOSS_UNIT_1_2_3/test/jboss/pom.xml
===================================================================
--- modules/test/tags/JBOSS_UNIT_1_2_3/test/jboss/pom.xml 2009-07-29 12:27:14 UTC (rev 13616)
+++ modules/test/tags/JBOSS_UNIT_1_2_3/test/jboss/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/tags/JBOSS_UNIT_1_2_3/test/opends/pom.xml
===================================================================
--- modules/test/tags/JBOSS_UNIT_1_2_3/test/opends/pom.xml 2009-07-29 12:27:14 UTC (rev 13616)
+++ modules/test/tags/JBOSS_UNIT_1_2_3/test/opends/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/tags/JBOSS_UNIT_1_2_3/tooling/ant/pom.xml
===================================================================
--- modules/test/tags/JBOSS_UNIT_1_2_3/tooling/ant/pom.xml 2009-07-29 12:27:14 UTC (rev 13616)
+++ modules/test/tags/JBOSS_UNIT_1_2_3/tooling/ant/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/tags/JBOSS_UNIT_1_2_3/tooling/core/pom.xml
===================================================================
--- modules/test/tags/JBOSS_UNIT_1_2_3/tooling/core/pom.xml 2009-07-29 12:27:14 UTC (rev 13616)
+++ modules/test/tags/JBOSS_UNIT_1_2_3/tooling/core/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/tags/JBOSS_UNIT_1_2_3/tooling/examples/maven2/pom.xml
===================================================================
--- modules/test/tags/JBOSS_UNIT_1_2_3/tooling/examples/maven2/pom.xml 2009-07-29 12:27:14 UTC (rev 13616)
+++ modules/test/tags/JBOSS_UNIT_1_2_3/tooling/examples/maven2/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
@@ -11,7 +11,7 @@
<dependency>
<groupId>org.jboss.unit</groupId>
<artifactId>jboss-unit</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
</dependency>
</dependencies>
@@ -39,7 +39,7 @@
<plugin>
<groupId>org.jboss.unit</groupId>
<artifactId>jboss-unit-tooling-maven2</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<executions>
<execution>
<phase>test</phase>
Modified: modules/test/tags/JBOSS_UNIT_1_2_3/tooling/maven2/pom.xml
===================================================================
--- modules/test/tags/JBOSS_UNIT_1_2_3/tooling/maven2/pom.xml 2009-07-29 12:27:14 UTC (rev 13616)
+++ modules/test/tags/JBOSS_UNIT_1_2_3/tooling/maven2/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/tags/JBOSS_UNIT_1_2_3/tooling/pom.xml
===================================================================
--- modules/test/tags/JBOSS_UNIT_1_2_3/tooling/pom.xml 2009-07-29 12:27:14 UTC (rev 13616)
+++ modules/test/tags/JBOSS_UNIT_1_2_3/tooling/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -11,7 +11,7 @@
<artifactId>jboss-unit-tooling-aggregator</artifactId>
<packaging>pom</packaging>
<name>JBoss Unit Tooling (aggregator)</name>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<modules>
<module>core</module>
<module>ant</module>
Modified: modules/test/tags/JBOSS_UNIT_1_2_3/unit/pom.xml
===================================================================
--- modules/test/tags/JBOSS_UNIT_1_2_3/unit/pom.xml 2009-07-29 12:27:14 UTC (rev 13616)
+++ modules/test/tags/JBOSS_UNIT_1_2_3/unit/pom.xml 2009-07-29 12:38:44 UTC (rev 13617)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.unit</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.3</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
14 years, 9 months
JBoss Portal SVN: r13616 - modules/test/tags.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-29 08:27:14 -0400 (Wed, 29 Jul 2009)
New Revision: 13616
Added:
modules/test/tags/JBOSS_UNIT_1_2_3/
Log:
Tagging JBoss Unit 1.2.3
Copied: modules/test/tags/JBOSS_UNIT_1_2_3 (from rev 13615, modules/test/trunk)
14 years, 9 months
JBoss Portal SVN: r13615 - modules/test/trunk/remote.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-29 08:25:30 -0400 (Wed, 29 Jul 2009)
New Revision: 13615
Modified:
modules/test/trunk/remote/pom.xml
Log:
Mark selenium library as embedded so that dependent libraries won't complain
Modified: modules/test/trunk/remote/pom.xml
===================================================================
--- modules/test/trunk/remote/pom.xml 2009-07-29 11:00:37 UTC (rev 13614)
+++ modules/test/trunk/remote/pom.xml 2009-07-29 12:25:30 UTC (rev 13615)
@@ -38,7 +38,8 @@
<dependency>
<groupId>org.openqa.selenium.client-drivers</groupId>
<artifactId>selenium-java-client-driver</artifactId>
- <version>0.9.2</version>
+ <version>0.9.2</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>apache-httpclient</groupId>
14 years, 9 months
JBoss Portal SVN: r13614 - modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/util.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-29 07:00:37 -0400 (Wed, 29 Jul 2009)
New Revision: 13614
Modified:
modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/util/VersionTestCase.java
Log:
SUFFIX now has 0 padding
Modified: modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/util/VersionTestCase.java
===================================================================
--- modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/util/VersionTestCase.java 2009-07-29 10:38:29 UTC (rev 13613)
+++ modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/util/VersionTestCase.java 2009-07-29 11:00:37 UTC (rev 13614)
@@ -145,6 +145,6 @@
public void testFormat()
{
Version version = new Version("foo", 1, 2, 3, new Version.Qualifier(Version.Qualifier.Prefix.CR, Version.Qualifier.Suffix.SUFFIX_3), "bar");
- assertEquals("foo 1.2.3-CR3", version.toString());
+ assertEquals("foo 1.2.3-CR03", version.toString());
}
}
14 years, 9 months
JBoss Portal SVN: r13613 - modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-29 06:38:29 -0400 (Wed, 29 Jul 2009)
New Revision: 13613
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ResourceResponseImpl.java
Log:
JBPORTAL-2345: ResourceResponse.setContentLength throws UnsupportedOperationException
JBPORTAL-2346: JBPC 2.0 : ResourceResponse.setCharacterEncoding always throws UnsupportedOperationException
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ResourceResponseImpl.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ResourceResponseImpl.java 2009-07-29 10:35:41 UTC (rev 13612)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ResourceResponseImpl.java 2009-07-29 10:38:29 UTC (rev 13613)
@@ -22,6 +22,9 @@
******************************************************************************/
package org.jboss.portal.portlet.impl.jsr168.api;
+import org.jboss.portal.common.net.media.ContentType;
+import org.jboss.portal.common.net.media.MediaType;
+import org.jboss.portal.common.net.media.Parameter;
import org.jboss.portal.portlet.invocation.ResourceInvocation;
import org.jboss.portal.portlet.invocation.response.ContentResponse;
import org.jboss.portal.portlet.invocation.response.ResponseProperties;
@@ -30,6 +33,9 @@
import javax.portlet.ResourceResponse;
import javax.portlet.PortletURL;
+
+import java.util.ArrayList;
+import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -53,17 +59,53 @@
public void setLocale(Locale locale)
{
- throw new UnsupportedOperationException();
+ // TODO: setLocale should also set the character encoding according to the mapping done in web.xml
+
+ if (locale == null)
+ {
+ throw new IllegalArgumentException("Locale cannot be null");
+ }
+ if ("".equals(locale.getCountry()))
+ {
+ addProperty("Content-Language", locale.getLanguage());
+ }
+ else
+ {
+ addProperty("Content-Language", locale.getLanguage() + "-" + locale.getCountry());
+ }
}
public void setCharacterEncoding(String s)
{
- throw new UnsupportedOperationException();
+ List<Parameter> parameters = new ArrayList<Parameter>();
+ MediaType mediaType = null;
+
+ String contentTypeString = getContentType();
+ if (contentTypeString != null)
+ {
+ ContentType contentType = ContentType.create(contentTypeString);
+ mediaType = contentType.getMediaType();
+ for (Parameter parameter : contentType.getParameters())
+ {
+ if (!parameter.getName().trim().toLowerCase().equals("charset"))
+ {
+ parameters.add(parameter);
+ }
+ }
+ }
+ else
+ {
+ // Default to "text/html"
+ mediaType = MediaType.TEXT_HTML;
+ }
+ parameters.add(new Parameter("charset", s));
+
+ setContentType(new ContentType(mediaType, parameters).getValue());
}
public void setContentLength(int i)
{
- throw new UnsupportedOperationException();
+ addProperty("Content-Length", "" + i);
}
public PortletURL createActionURL()
14 years, 9 months
JBoss Portal SVN: r13612 - modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-29 06:35:41 -0400 (Wed, 29 Jul 2009)
New Revision: 13612
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/MimeResponseImpl.java
Log:
Let a developer override the defined content type
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/MimeResponseImpl.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/MimeResponseImpl.java 2009-07-29 10:15:04 UTC (rev 13611)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/MimeResponseImpl.java 2009-07-29 10:35:41 UTC (rev 13612)
@@ -125,11 +125,8 @@
public void setContentType(String contentType)
{
- if (responseContent.getContentType() == null)
- {
- responseContent.setContentType(contentType);
- contentTypeSet = true;
- }
+ responseContent.setContentType(contentType);
+ contentTypeSet = true;
}
public PrintWriter getWriter() throws IOException
14 years, 9 months
JBoss Portal SVN: r13611 - modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-29 06:15:04 -0400 (Wed, 29 Jul 2009)
New Revision: 13611
Modified:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/ContentType.java
Log:
Fixed getValue() method
Modified: modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/ContentType.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/ContentType.java 2009-07-29 10:14:44 UTC (rev 13610)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/ContentType.java 2009-07-29 10:15:04 UTC (rev 13611)
@@ -181,22 +181,13 @@
{
StringBuilder builder = new StringBuilder();
builder.append(mediaType.getValue());
- for (Iterator<Parameter> i = parameters.iterator();;)
+ for (Iterator<Parameter> i = parameters.iterator();i.hasNext();)
{
Parameter parameter = i.next();
//
- builder.append(parameter.getName()).append('=').append(parameter.getValue());
+ builder.append(';').append(parameter.getName()).append('=').append(parameter.getValue());
- //
- if (i.hasNext())
- {
- builder.append(';');
- }
- else
- {
- break;
- }
}
return builder.toString();
}
14 years, 9 months
JBoss Portal SVN: r13610 - branches/Enterprise_Portal_Platform_4_3/core-samples/src/main/org/jboss/portal/core/samples/basic.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-29 06:14:44 -0400 (Wed, 29 Jul 2009)
New Revision: 13610
Modified:
branches/Enterprise_Portal_Platform_4_3/core-samples/src/main/org/jboss/portal/core/samples/basic/HeaderContentPortlet.java
Log:
Improved example
Modified: branches/Enterprise_Portal_Platform_4_3/core-samples/src/main/org/jboss/portal/core/samples/basic/HeaderContentPortlet.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-samples/src/main/org/jboss/portal/core/samples/basic/HeaderContentPortlet.java 2009-07-28 22:28:07 UTC (rev 13609)
+++ branches/Enterprise_Portal_Platform_4_3/core-samples/src/main/org/jboss/portal/core/samples/basic/HeaderContentPortlet.java 2009-07-29 10:14:44 UTC (rev 13610)
@@ -35,6 +35,7 @@
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Writer;
+import java.util.Locale;
/*
* Portlet to demonstrate the declarative header content feature.
@@ -67,7 +68,11 @@
{
resourceResponse.setProperty("Expires", "0");
resourceResponse.setProperty("Content-Disposition", "attachment; filename=vcard.vcf ");
- resourceResponse.setContentType("text/x-vcard");
+ resourceResponse.setContentType("text/x-vcard; charset=UTF-8");
+ resourceResponse.setCharacterEncoding("ISO-8859-1");
+ resourceResponse.setContentLength(160);
+ resourceResponse.setLocale(Locale.FRENCH);
+
PrintWriter writer = resourceResponse.getWriter();
writer.print("BEGIN:VCARD\n");
14 years, 9 months