[jboss-svn-commits] JBoss Portal SVN: r5482 - in trunk/wsrp/src/main/org/jboss/portal/test/wsrp: framework v1/consumer v1/consumer/behaviors

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Oct 18 18:37:19 EDT 2006


Author: chris.laprun at jboss.com
Date: 2006-10-18 18:37:16 -0400 (Wed, 18 Oct 2006)
New Revision: 5482

Added:
   trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/
   trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/BasicBehavior.java
   trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/EmptyMarkupBehavior.java
   trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/NullMarkupBehavior.java
   trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/SessionBehavior.java
Removed:
   trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/BasicBehavior.java
   trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/EmptyMarkupBehavior.java
   trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/NullMarkupBehavior.java
   trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/SessionBehavior.java
   trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/producer/
Modified:
   trunk/wsrp/src/main/org/jboss/portal/test/wsrp/framework/TestWSRPProducerImpl.java
   trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/MarkupTestCase.java
   trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/ServiceDescriptionTestCase.java
Log:
- Renamed v1.consumer.producer package to behaviors.

Modified: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/framework/TestWSRPProducerImpl.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/framework/TestWSRPProducerImpl.java	2006-10-18 22:29:18 UTC (rev 5481)
+++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/framework/TestWSRPProducerImpl.java	2006-10-18 22:37:16 UTC (rev 5482)
@@ -25,10 +25,10 @@
 import org.jboss.invocation.Invocation;
 import org.jboss.portal.jems.as.system.AbstractJBossService;
 import org.jboss.portal.test.wsrp.framework.support.ServiceObjectFactory;
-import org.jboss.portal.test.wsrp.v1.consumer.producer.BasicBehavior;
-import org.jboss.portal.test.wsrp.v1.consumer.producer.EmptyMarkupBehavior;
-import org.jboss.portal.test.wsrp.v1.consumer.producer.NullMarkupBehavior;
-import org.jboss.portal.test.wsrp.v1.consumer.producer.SessionBehavior;
+import org.jboss.portal.test.wsrp.v1.consumer.behaviors.BasicBehavior;
+import org.jboss.portal.test.wsrp.v1.consumer.behaviors.EmptyMarkupBehavior;
+import org.jboss.portal.test.wsrp.v1.consumer.behaviors.NullMarkupBehavior;
+import org.jboss.portal.test.wsrp.v1.consumer.behaviors.SessionBehavior;
 import org.jboss.portal.wsrp.WSRPConstants;
 import org.jboss.portal.wsrp.WSRPTypeFactory;
 import org.jboss.portal.wsrp.WSRPUtils;

Modified: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/MarkupTestCase.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/MarkupTestCase.java	2006-10-18 22:29:18 UTC (rev 5481)
+++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/MarkupTestCase.java	2006-10-18 22:37:16 UTC (rev 5482)
@@ -38,10 +38,10 @@
 import org.jboss.portal.test.wsrp.framework.support.BasicSecurityContext;
 import org.jboss.portal.test.wsrp.framework.support.BasicUserContext;
 import org.jboss.portal.test.wsrp.framework.support.TestPortletInvocationContext;
-import org.jboss.portal.test.wsrp.v1.consumer.producer.BasicBehavior;
-import org.jboss.portal.test.wsrp.v1.consumer.producer.EmptyMarkupBehavior;
-import org.jboss.portal.test.wsrp.v1.consumer.producer.NullMarkupBehavior;
-import org.jboss.portal.test.wsrp.v1.consumer.producer.SessionBehavior;
+import org.jboss.portal.test.wsrp.v1.consumer.behaviors.BasicBehavior;
+import org.jboss.portal.test.wsrp.v1.consumer.behaviors.EmptyMarkupBehavior;
+import org.jboss.portal.test.wsrp.v1.consumer.behaviors.NullMarkupBehavior;
+import org.jboss.portal.test.wsrp.v1.consumer.behaviors.SessionBehavior;
 import org.jboss.portal.wsrp.consumer.ProducerSessionInformation;
 import org.jboss.portal.wsrp.core.CookieProtocol;
 

Modified: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/ServiceDescriptionTestCase.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/ServiceDescriptionTestCase.java	2006-10-18 22:29:18 UTC (rev 5481)
+++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/ServiceDescriptionTestCase.java	2006-10-18 22:37:16 UTC (rev 5482)
@@ -24,8 +24,8 @@
 
 import org.jboss.portal.portlet.Portlet;
 import org.jboss.portal.portlet.PortletContext;
-import org.jboss.portal.test.wsrp.v1.consumer.producer.BasicBehavior;
-import org.jboss.portal.test.wsrp.v1.consumer.producer.SessionBehavior;
+import org.jboss.portal.test.wsrp.v1.consumer.behaviors.BasicBehavior;
+import org.jboss.portal.test.wsrp.v1.consumer.behaviors.SessionBehavior;
 
 import java.util.Set;
 

Copied: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors (from rev 5480, trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/producer)

Deleted: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/BasicBehavior.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/producer/BasicBehavior.java	2006-10-18 18:11:13 UTC (rev 5480)
+++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/BasicBehavior.java	2006-10-18 22:37:16 UTC (rev 5482)
@@ -1,69 +0,0 @@
-/******************************************************************************
- * 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.                   *
- ******************************************************************************/
-
-package org.jboss.portal.test.wsrp.v1.consumer.producer;
-
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
-import org.jboss.portal.test.wsrp.framework.TestProducerBehavior;
-import org.jboss.portal.wsrp.WSRPConstants;
-import org.jboss.portal.wsrp.WSRPTypeFactory;
-import org.jboss.portal.wsrp.core.GetMarkup;
-import org.jboss.portal.wsrp.core.MarkupResponse;
-
-/**
- * @author <a href="mailto:chris.laprun at jboss.com?subject=org.jboss.portal.test.wsrp.v1.consumer.producer.BasicProducer">Chris
- *         Laprun</a>
- * @version $Revision$
- * @since 2.6
- */
-public class BasicBehavior extends TestProducerBehavior
-{
-   public static final String PORTLET_HANDLE = "SamplePortletHandle";
-
-
-   public BasicBehavior()
-   {
-      portletHandle = PORTLET_HANDLE;
-   }
-
-   public String getMarkupString(Mode mode, WindowState windowState, String navigationalState, GetMarkup getMarkup)
-   {
-      StringBuffer markupString = new StringBuffer("portlet1:");
-
-      markupString.append(mode).append(":").append(windowState);
-      if (navigationalState != null)
-      {
-         markupString.append(":").append(navigationalState);
-      }
-
-      return markupString.toString();
-   }
-
-
-   public void modifyResponseIfNeeded(MarkupResponse markupResponse)
-   {
-      // fake markup caching
-      markupResponse.getMarkupContext().setCacheControl(WSRPTypeFactory.createCacheControl(15, WSRPConstants.CACHE_PER_USER));
-   }
-}

Added: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/BasicBehavior.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/producer/BasicBehavior.java	2006-10-18 18:11:13 UTC (rev 5480)
+++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/BasicBehavior.java	2006-10-18 22:37:16 UTC (rev 5482)
@@ -0,0 +1,80 @@
+/******************************************************************************
+ * 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.                   *
+ ******************************************************************************/
+
+package org.jboss.portal.test.wsrp.v1.consumer.behaviors;
+
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.test.wsrp.framework.MarkupBehavior;
+import org.jboss.portal.wsrp.WSRPConstants;
+import org.jboss.portal.wsrp.WSRPTypeFactory;
+import org.jboss.portal.wsrp.core.BlockingInteractionResponse;
+import org.jboss.portal.wsrp.core.GetMarkup;
+import org.jboss.portal.wsrp.core.MarkupResponse;
+import org.jboss.portal.wsrp.core.PerformBlockingInteraction;
+import org.jboss.portal.wsrp.core.UpdateResponse;
+
+/**
+ * @author <a href="mailto:chris.laprun at jboss.com?subject=org.jboss.portal.test.wsrp.v1.consumer.producer.BasicProducer">Chris
+ *         Laprun</a>
+ * @version $Revision$
+ * @since 2.6
+ */
+public class BasicBehavior extends MarkupBehavior
+{
+   public static final String PORTLET_HANDLE = "SamplePortletHandle";
+   public static final String NS = "ns1";
+
+
+   public BasicBehavior()
+   {
+      portletHandle = PORTLET_HANDLE;
+   }
+
+   public String getMarkupString(Mode mode, WindowState windowState, String navigationalState, GetMarkup getMarkup)
+   {
+      StringBuffer markupString = new StringBuffer("portlet1:");
+
+      markupString.append(mode).append(":").append(windowState);
+      if (navigationalState != null)
+      {
+         markupString.append(":").append(navigationalState);
+      }
+
+      return markupString.toString();
+   }
+
+
+   public BlockingInteractionResponse performBlockingInteraction(PerformBlockingInteraction performBlockingInteraction)
+   {
+      UpdateResponse ur = WSRPTypeFactory.createUpdateResponse();
+      ur.setNavigationalState(NS);
+      return WSRPTypeFactory.createBlockingInteractionResponse(ur);
+   }
+
+   public void modifyResponseIfNeeded(MarkupResponse markupResponse)
+   {
+      // fake markup caching
+      markupResponse.getMarkupContext().setCacheControl(WSRPTypeFactory.createCacheControl(15, WSRPConstants.CACHE_PER_USER));
+   }
+}

Deleted: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/EmptyMarkupBehavior.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/producer/EmptyMarkupBehavior.java	2006-10-18 18:11:13 UTC (rev 5480)
+++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/EmptyMarkupBehavior.java	2006-10-18 22:37:16 UTC (rev 5482)
@@ -1,51 +0,0 @@
-/******************************************************************************
- * 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.                   *
- ******************************************************************************/
-
-package org.jboss.portal.test.wsrp.v1.consumer.producer;
-
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
-import org.jboss.portal.test.wsrp.framework.TestProducerBehavior;
-import org.jboss.portal.wsrp.core.GetMarkup;
-
-/**
- * @author <a href="mailto:chris.laprun at jboss.com?subject=org.jboss.portal.test.wsrp.v1.consumer.producer.EmptyMarkupBehavior">Chris
- *         Laprun</a>
- * @version $Revision$
- * @since 2.6
- */
-public class EmptyMarkupBehavior extends TestProducerBehavior
-{
-   public static final String PORTLET_HANDLE = "EmptyMarkup";
-
-
-   public EmptyMarkupBehavior()
-   {
-      portletHandle = PORTLET_HANDLE;
-   }
-
-   public String getMarkupString(Mode mode, WindowState windowState, String navigationalState, GetMarkup getMarkup)
-   {
-      return "";
-   }
-}

Copied: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/EmptyMarkupBehavior.java (from rev 5481, trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/producer/EmptyMarkupBehavior.java)
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/producer/EmptyMarkupBehavior.java	2006-10-18 22:29:18 UTC (rev 5481)
+++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/EmptyMarkupBehavior.java	2006-10-18 22:37:16 UTC (rev 5482)
@@ -0,0 +1,51 @@
+/******************************************************************************
+ * 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.                   *
+ ******************************************************************************/
+
+package org.jboss.portal.test.wsrp.v1.consumer.behaviors;
+
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.test.wsrp.framework.MarkupBehavior;
+import org.jboss.portal.wsrp.core.GetMarkup;
+
+/**
+ * @author <a href="mailto:chris.laprun at jboss.com?subject=org.jboss.portal.test.wsrp.v1.consumer.producer.EmptyMarkupBehavior">Chris
+ *         Laprun</a>
+ * @version $Revision$
+ * @since 2.6
+ */
+public class EmptyMarkupBehavior extends MarkupBehavior
+{
+   public static final String PORTLET_HANDLE = "EmptyMarkup";
+
+
+   public EmptyMarkupBehavior()
+   {
+      portletHandle = PORTLET_HANDLE;
+   }
+
+   public String getMarkupString(Mode mode, WindowState windowState, String navigationalState, GetMarkup getMarkup)
+   {
+      return "";
+   }
+}

Deleted: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/NullMarkupBehavior.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/producer/NullMarkupBehavior.java	2006-10-18 18:11:13 UTC (rev 5480)
+++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/NullMarkupBehavior.java	2006-10-18 22:37:16 UTC (rev 5482)
@@ -1,51 +0,0 @@
-/******************************************************************************
- * 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.                   *
- ******************************************************************************/
-
-package org.jboss.portal.test.wsrp.v1.consumer.producer;
-
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
-import org.jboss.portal.test.wsrp.framework.TestProducerBehavior;
-import org.jboss.portal.wsrp.core.GetMarkup;
-
-/**
- * @author <a href="mailto:chris.laprun at jboss.com?subject=org.jboss.portal.test.wsrp.v1.consumer.producer.NullMarkupBehavior">Chris
- *         Laprun</a>
- * @version $Revision$
- * @since 2.6
- */
-public class NullMarkupBehavior extends TestProducerBehavior
-{
-   public static final String PORTLET_HANDLE = "NullMarkup";
-
-
-   public NullMarkupBehavior()
-   {
-      portletHandle = PORTLET_HANDLE;
-   }
-
-   public String getMarkupString(Mode mode, WindowState windowState, String navigationalState, GetMarkup getMarkup)
-   {
-      return null;
-   }
-}

Copied: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/NullMarkupBehavior.java (from rev 5481, trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/producer/NullMarkupBehavior.java)
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/producer/NullMarkupBehavior.java	2006-10-18 22:29:18 UTC (rev 5481)
+++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/NullMarkupBehavior.java	2006-10-18 22:37:16 UTC (rev 5482)
@@ -0,0 +1,51 @@
+/******************************************************************************
+ * 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.                   *
+ ******************************************************************************/
+
+package org.jboss.portal.test.wsrp.v1.consumer.behaviors;
+
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.test.wsrp.framework.MarkupBehavior;
+import org.jboss.portal.wsrp.core.GetMarkup;
+
+/**
+ * @author <a href="mailto:chris.laprun at jboss.com?subject=org.jboss.portal.test.wsrp.v1.consumer.producer.NullMarkupBehavior">Chris
+ *         Laprun</a>
+ * @version $Revision$
+ * @since 2.6
+ */
+public class NullMarkupBehavior extends MarkupBehavior
+{
+   public static final String PORTLET_HANDLE = "NullMarkup";
+
+
+   public NullMarkupBehavior()
+   {
+      portletHandle = PORTLET_HANDLE;
+   }
+
+   public String getMarkupString(Mode mode, WindowState windowState, String navigationalState, GetMarkup getMarkup)
+   {
+      return null;
+   }
+}

Deleted: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/SessionBehavior.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/producer/SessionBehavior.java	2006-10-18 18:11:13 UTC (rev 5480)
+++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/SessionBehavior.java	2006-10-18 22:37:16 UTC (rev 5482)
@@ -1,84 +0,0 @@
-/******************************************************************************
- * 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.                   *
- ******************************************************************************/
-
-package org.jboss.portal.test.wsrp.v1.consumer.producer;
-
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
-import org.jboss.portal.test.wsrp.framework.TestProducerBehavior;
-import org.jboss.portal.wsrp.WSRPTypeFactory;
-import org.jboss.portal.wsrp.core.GetMarkup;
-import org.jboss.portal.wsrp.core.MarkupResponse;
-import org.jboss.portal.wsrp.core.SessionContext;
-
-/**
- * @author <a href="mailto:chris.laprun at jboss.com?subject=org.jboss.portal.test.wsrp.v1.consumer.producer.SessionBehavior">Chris
- *         Laprun</a>
- * @version $Revision$
- * @since 2.6
- */
-public class SessionBehavior extends TestProducerBehavior
-{
-   public static final String PORTLET_HANDLE = "SecondPortletHandle";
-   public static final String SESSION_ID = "sessionID";
-
-   private int count = 0;
-   private String sessionId;
-
-   public SessionBehavior()
-   {
-      portletHandle = PORTLET_HANDLE;
-   }
-
-   public String getMarkupString(Mode mode, WindowState windowState, String navigationalState, GetMarkup getMarkup)
-   {
-      StringBuffer markupString = new StringBuffer("portlet2:");
-      sessionId = getMarkup.getRuntimeContext().getSessionID();
-
-      // if we have a session, increments count to simulate session usage
-      if (SESSION_ID.equals(sessionId))
-      {
-         count++;
-      }
-      markupString.append(count).append(":");
-
-      markupString.append(mode).append(":").append(windowState);
-      if (navigationalState != null)
-      {
-         markupString.append(":").append(navigationalState);
-      }
-
-      return markupString.toString();
-   }
-
-
-   public void modifyResponseIfNeeded(MarkupResponse markupResponse)
-   {
-      // fakes creation of a portlet session if not already present
-      if (count == 0 || SESSION_ID.equals(sessionId))
-      {
-         SessionContext sessionContext = WSRPTypeFactory.createSessionContext(SESSION_ID, 30);
-         markupResponse.setSessionContext(sessionContext);
-      }
-   }
-}

Added: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/SessionBehavior.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/producer/SessionBehavior.java	2006-10-18 18:11:13 UTC (rev 5480)
+++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/consumer/behaviors/SessionBehavior.java	2006-10-18 22:37:16 UTC (rev 5482)
@@ -0,0 +1,84 @@
+/******************************************************************************
+ * 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.                   *
+ ******************************************************************************/
+
+package org.jboss.portal.test.wsrp.v1.consumer.behaviors;
+
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.test.wsrp.framework.MarkupBehavior;
+import org.jboss.portal.wsrp.WSRPTypeFactory;
+import org.jboss.portal.wsrp.core.GetMarkup;
+import org.jboss.portal.wsrp.core.MarkupResponse;
+import org.jboss.portal.wsrp.core.SessionContext;
+
+/**
+ * @author <a href="mailto:chris.laprun at jboss.com?subject=org.jboss.portal.test.wsrp.v1.consumer.producer.SessionBehavior">Chris
+ *         Laprun</a>
+ * @version $Revision$
+ * @since 2.6
+ */
+public class SessionBehavior extends MarkupBehavior
+{
+   public static final String PORTLET_HANDLE = "SecondPortletHandle";
+   public static final String SESSION_ID = "sessionID";
+
+   private int count = 0;
+   private String sessionId;
+
+   public SessionBehavior()
+   {
+      portletHandle = PORTLET_HANDLE;
+   }
+
+   public String getMarkupString(Mode mode, WindowState windowState, String navigationalState, GetMarkup getMarkup)
+   {
+      StringBuffer markupString = new StringBuffer("portlet2:");
+      sessionId = getMarkup.getRuntimeContext().getSessionID();
+
+      // if we have a session, increments count to simulate session usage
+      if (SESSION_ID.equals(sessionId))
+      {
+         count++;
+      }
+      markupString.append(count).append(":");
+
+      markupString.append(mode).append(":").append(windowState);
+      if (navigationalState != null)
+      {
+         markupString.append(":").append(navigationalState);
+      }
+
+      return markupString.toString();
+   }
+
+
+   public void modifyResponseIfNeeded(MarkupResponse markupResponse)
+   {
+      // fakes creation of a portlet session if not already present
+      if (count == 0 || SESSION_ID.equals(sessionId))
+      {
+         SessionContext sessionContext = WSRPTypeFactory.createSessionContext(SESSION_ID, 30);
+         markupResponse.setSessionContext(sessionContext);
+      }
+   }
+}




More information about the jboss-svn-commits mailing list