Author: thomas.heute(a)jboss.com
Date: 2008-03-18 10:53:32 -0400 (Tue, 18 Mar 2008)
New Revision: 10307
Added:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/TransactionInfoImpl.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/info/TransactionInfo.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/SessionInfo.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/impl/
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/impl/CacheInfoImpl.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/impl/SessionInfoImpl.java
Removed:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/info/CorePortletInfo.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/ContainerCacheInfo.java
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/users/CurrentUsersPortlet.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/CorePortletInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/TransactionInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletContextFactory.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/CoreInfoBuilder.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/PortletIconInfoImpl.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/metadata/portlet/PortletIconMetaData.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossPortlet.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/PortletSessionSynchronizationInterceptor.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/JBossApplicationMetaDataFactory.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/info/WSRPPortletInfo.java
modules/portlet/trunk/.classpath
Log:
- Removed CorePortletInfo and attached directly the different sub Info
- Session Info configured in jboss-portlet.xml was ignored
- CurrentUsersPortlet doesn't need to be a JBoss Portlet
- Added a warning for former portlet using the JBossPortlet extension to add the filter
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java 2008-03-18
14:27:24 UTC (rev 10306)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -23,7 +23,7 @@
package org.jboss.portal.core.aspects.portlet;
import org.jboss.portal.core.portlet.info.AjaxInfo;
-import org.jboss.portal.core.portlet.info.CorePortletInfo;
+import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
@@ -51,10 +51,10 @@
if (response instanceof FragmentResponse)
{
FragmentResponse fragment = (FragmentResponse)response;
- CorePortletInfo corePortletInfo = getCorePortletInfo(invocation);
+ PortletInfo corePortletInfo = getPortletInfo(invocation);
if (corePortletInfo != null)
{
- AjaxInfo ajax = corePortletInfo.getAjax();
+ AjaxInfo ajax = corePortletInfo.getAttachment(AjaxInfo.class);
if (ajax != null)
{
fragment = updateFragmentWithPropertiesIfNeeded(fragment);
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/CorePortletInterceptor.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/CorePortletInterceptor.java 2008-03-18
14:27:24 UTC (rev 10306)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/CorePortletInterceptor.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -23,9 +23,9 @@
package org.jboss.portal.core.aspects.portlet;
-import org.jboss.portal.core.portlet.info.CorePortletInfo;
import org.jboss.portal.portlet.container.PortletContainer;
import org.jboss.portal.portlet.container.PortletContainerInvoker;
+import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.invocation.PortletInterceptor;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
@@ -44,11 +44,10 @@
* @return the CorePortetInfo associated with the Portlet being invoked or
<code>null</code> if no such information
* is present
*/
- protected CorePortletInfo getCorePortletInfo(PortletInvocation invocation)
+ protected PortletInfo getPortletInfo(PortletInvocation invocation)
{
PortletContainer container =
(PortletContainer)invocation.getAttribute(PortletInvocation.INVOCATION_SCOPE,
PortletContainerInvoker.PORTLET_CONTAINER);
-
- return container.getInfo().getAttachment(CorePortletInfo.class);
+ return container.getInfo();
}
/**
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java 2008-03-18
14:27:24 UTC (rev 10306)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -24,8 +24,8 @@
import org.jboss.portal.common.util.MultiValuedPropertyMap;
import org.jboss.portal.core.metadata.portlet.MarkupElement;
-import org.jboss.portal.core.portlet.info.CorePortletInfo;
import org.jboss.portal.core.portlet.info.MarkupHeaderInfo;
+import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
@@ -52,10 +52,10 @@
{
FragmentResponse fragment = (FragmentResponse)response;
- CorePortletInfo corePortletInfo = getCorePortletInfo(invocation);
- if (corePortletInfo != null)
+ PortletInfo portletInfo = getPortletInfo(invocation);
+ if (portletInfo != null)
{
- MarkupHeaderInfo headerContentInfo = corePortletInfo.getMarkupHeader();
+ MarkupHeaderInfo headerContentInfo =
portletInfo.getAttachment(MarkupHeaderInfo.class);
if (headerContentInfo != null)
{
fragment = updateFragmentWithPropertiesIfNeeded(fragment);
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/TransactionInterceptor.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/TransactionInterceptor.java 2008-03-18
14:27:24 UTC (rev 10306)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/TransactionInterceptor.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -24,7 +24,8 @@
import org.jboss.portal.common.invocation.InvocationException;
import org.jboss.portal.common.transaction.Transactions;
-import org.jboss.portal.core.portlet.info.CorePortletInfo;
+import org.jboss.portal.core.portlet.info.TransactionInfo;
+import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.invocation.PortletInvocation;
/**
@@ -37,40 +38,44 @@
protected Object invoke(PortletInvocation invocation) throws Exception
{
// Override tx type if found
- CorePortletInfo corePortletInfo = getCorePortletInfo(invocation);
- if (corePortletInfo != null)
+ PortletInfo portletInfo = getPortletInfo(invocation);
+ if (portletInfo != null)
{
- Transactions.Type txType = corePortletInfo.getTxType();
+ TransactionInfo transactionInfo =
portletInfo.getAttachment(TransactionInfo.class);
- //
- if (txType == Transactions.TYPE_NOT_SUPPORTED)
+ if (transactionInfo != null)
{
- return invokeNotSupported(invocation);
+ Transactions.Type txType = transactionInfo.getTransactionType();
+ //
+ if (txType == Transactions.TYPE_NOT_SUPPORTED)
+ {
+ return invokeNotSupported(invocation);
+ }
+ else if (txType == Transactions.TYPE_NEVER)
+ {
+ return invokeNever(invocation);
+ }
+ else if (txType == Transactions.TYPE_MANDATORY)
+ {
+ return invokeMandatory(invocation);
+ }
+ else if (txType == Transactions.TYPE_SUPPORTS)
+ {
+ return invokeSupports(invocation);
+ }
+ else if (txType == Transactions.TYPE_REQUIRED)
+ {
+ return invokeRequired(invocation);
+ }
+ else if (txType == Transactions.TYPE_REQUIRES_NEW)
+ {
+ return invokeRequiresNew(invocation);
+ }
+ else
+ {
+ throw new InvocationException("Should not happen");
+ }
}
- else if (txType == Transactions.TYPE_NEVER)
- {
- return invokeNever(invocation);
- }
- else if (txType == Transactions.TYPE_MANDATORY)
- {
- return invokeMandatory(invocation);
- }
- else if (txType == Transactions.TYPE_SUPPORTS)
- {
- return invokeSupports(invocation);
- }
- else if (txType == Transactions.TYPE_REQUIRED)
- {
- return invokeRequired(invocation);
- }
- else if (txType == Transactions.TYPE_REQUIRES_NEW)
- {
- return invokeRequiresNew(invocation);
- }
- else
- {
- throw new InvocationException("Should not happen");
- }
}
return invocation.invokeNext();
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletContextFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletContextFactory.java 2008-03-18
14:27:24 UTC (rev 10306)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletContextFactory.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -28,9 +28,11 @@
import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.model.portal.Portal;
import org.jboss.portal.core.model.portal.Window;
+import org.jboss.portal.portlet.impl.spi.AbstractClientContext;
import org.jboss.portal.portlet.impl.spi.AbstractRequestContext;
import org.jboss.portal.portlet.impl.spi.AbstractSecurityContext;
import org.jboss.portal.portlet.impl.spi.AbstractServerContext;
+import org.jboss.portal.portlet.spi.ClientContext;
import org.jboss.portal.portlet.spi.PortalContext;
import org.jboss.portal.portlet.spi.RequestContext;
import org.jboss.portal.portlet.spi.SecurityContext;
@@ -67,6 +69,9 @@
/**. */
private ServerContext serverContext;
+
+ /** . */
+ private AbstractClientContext clientContext;
public PortletContextFactory(ControllerContext controllerContext, Portal portal,
Window window)
@@ -77,7 +82,7 @@
this.portalContext = new
org.jboss.portal.core.model.portal.portlet.PortalContextImpl(portal);
this.windowContext = new
org.jboss.portal.core.model.portal.portlet.WindowContextImpl(window);
this.serverContext = new
AbstractServerContext(controllerContext.getServerInvocation().getServerContext().getClientRequest(),
controllerContext.getServerInvocation().getServerContext().getClientResponse());
-
+ this.clientContext = new
AbstractClientContext(controllerContext.getServerInvocation().getServerContext().getClientRequest());
}
public PortletContextFactory(ControllerContext controllerContext)
@@ -88,6 +93,7 @@
this.portalContext = portalContextImpl;
this.windowContext = new WindowContextImpl("abc"); // Well ????
this.serverContext = new
AbstractServerContext(controllerContext.getServerInvocation().getServerContext().getClientRequest(),
controllerContext.getServerInvocation().getServerContext().getClientResponse());
+ this.clientContext = new
AbstractClientContext(controllerContext.getServerInvocation().getServerContext().getClientRequest());
}
public PortalContext createPortalContext()
@@ -120,6 +126,10 @@
return serverContext;
}
+ public ClientContext createClientContext()
+ {
+ return clientContext;
+ }
/** . */
private static final PortalContextImpl portalContextImpl = new PortalContextImpl();
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java 2008-03-18
14:27:24 UTC (rev 10306)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -124,6 +124,7 @@
action.setWindowContext(cf.createWindowContext());
action.setUserContext(userContext);
action.setServerContext(cf.createServerContext());
+ action.setClientContext(cf.createClientContext());
//
return action;
@@ -157,6 +158,7 @@
render.setWindowContext(cf.createWindowContext());
render.setUserContext(cf.createUserContext());
render.setServerContext(cf.createServerContext());
+ render.setClientContext(cf.createClientContext());
//
return render;
}
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/CoreInfoBuilder.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/CoreInfoBuilder.java 2008-03-18
14:27:24 UTC (rev 10306)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/CoreInfoBuilder.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -22,10 +22,19 @@
******************************************************************************/
package org.jboss.portal.core.impl.portlet.info;
+import org.jboss.portal.common.transaction.Transactions;
+import org.jboss.portal.core.metadata.portlet.AjaxMetaData;
+import org.jboss.portal.core.metadata.portlet.HeaderContentMetaData;
import org.jboss.portal.core.metadata.portlet.JBossPortletMetaData;
-import org.jboss.portal.core.portlet.info.CorePortletInfo;
+import org.jboss.portal.core.metadata.portlet.PortletInfoMetaData;
+import org.jboss.portal.core.portlet.info.AjaxInfo;
+import org.jboss.portal.core.portlet.info.MarkupHeaderInfo;
+import org.jboss.portal.core.portlet.info.PortletInfoInfo;
+import org.jboss.portal.core.portlet.info.TransactionInfo;
import org.jboss.portal.portlet.deployment.jboss.InfoBuilder;
import org.jboss.portal.portlet.deployment.jboss.PortletApplicationContextImpl;
+import org.jboss.portal.portlet.deployment.jboss.info.SessionInfo;
+import org.jboss.portal.portlet.deployment.jboss.info.impl.SessionInfoImpl;
import org.jboss.portal.portlet.deployment.jboss.metadata.JBossApplicationMetaData;
import org.jboss.portal.portlet.impl.info.ContainerInfoBuilder;
import org.jboss.portal.portlet.impl.info.ContainerInfoBuilderContext;
@@ -89,8 +98,37 @@
org.jboss.portal.portlet.deployment.jboss.metadata.JBossPortletMetaData
jbPortletMD =
(org.jboss.portal.portlet.deployment.jboss.metadata.JBossPortletMetaData)jbossApplicationMetaData.getPortlets().get(containerInfo.getName());
if (jbPortletMD instanceof JBossPortletMetaData)
{
- CorePortletInfo cpi = new CorePortletInfo(new
PortletApplicationContextImpl(builderContext.getWebApp()),
(JBossPortletMetaData)jbPortletMD);
- containerInfo.setAttachment(CorePortletInfo.class, cpi);
+ JBossPortletMetaData jbossPortletMD = (JBossPortletMetaData)jbPortletMD;
+
+ AjaxMetaData ajaxMD = jbossPortletMD.getAjax();
+ if (ajaxMD != null)
+ {
+ containerInfo.setAttachment(AjaxInfo.class, new AjaxInfoImpl(ajaxMD));
+ }
+
+ HeaderContentMetaData headerContentMD = jbossPortletMD.getHeaderContent();
+ if (headerContentMD != null)
+ {
+ containerInfo.setAttachment(MarkupHeaderInfo.class, new
MarkupHeaderInfoImpl(headerContentMD));
+ }
+
+ PortletInfoMetaData portletInfoMD = jbossPortletMD.getPortletInfo();
+ if (portletInfoMD != null)
+ {
+ containerInfo.setAttachment(PortletInfoInfo.class, new
PortletInfoInfoImpl(new PortletApplicationContextImpl(builderContext.getWebApp()),
portletInfoMD));
+ }
+
+ Transactions.Type txType = jbossPortletMD.getTxType();
+ if (txType != null)
+ {
+ containerInfo.setAttachment(TransactionInfo.class, new
TransactionInfoImpl(jbossPortletMD.getTxType()));
+ }
+
+ Boolean distributed = jbossPortletMD.getDistributed();
+ if (distributed != null)
+ {
+ containerInfo.setAttachment(SessionInfo.class, new
SessionInfoImpl(distributed));
+ }
}
portlets.put(jbPortletMD.getName(), containerInfo);
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/PortletIconInfoImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/PortletIconInfoImpl.java 2008-03-18
14:27:24 UTC (rev 10306)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/PortletIconInfoImpl.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -35,7 +35,7 @@
public class PortletIconInfoImpl implements PortletIconInfo
{
/** . */
- private Map icons;
+ private Map<String, String> icons;
/** . */
private PortletApplicationContext portletApplicationContext;
Added:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/TransactionInfoImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/TransactionInfoImpl.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/TransactionInfoImpl.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * 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.core.impl.portlet.info;
+
+import org.jboss.portal.common.transaction.Transactions;
+import org.jboss.portal.common.transaction.Transactions.Type;
+import org.jboss.portal.core.portlet.info.TransactionInfo;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public class TransactionInfoImpl implements TransactionInfo
+{
+
+ private Transactions.Type type;
+
+ public TransactionInfoImpl(Transactions.Type type)
+ {
+ this.type = type;
+ }
+
+ public Type getTransactionType()
+ {
+ return type;
+ }
+
+}
+
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/metadata/portlet/PortletIconMetaData.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/metadata/portlet/PortletIconMetaData.java 2008-03-18
14:27:24 UTC (rev 10306)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/metadata/portlet/PortletIconMetaData.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -40,11 +40,11 @@
public static final String LARGE = "large";
/** . */
- private Map icons;
+ private Map<String, String> icons;
public PortletIconMetaData()
{
- icons = new HashMap();
+ icons = new HashMap<String, String>();
}
public void setIconLocation(String iconLocation, String size)
@@ -57,7 +57,7 @@
return (String)icons.get(size);
}
- public Map getIcons()
+ public Map<String, String> getIcons()
{
return Collections.unmodifiableMap(icons);
}
Deleted:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/info/CorePortletInfo.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/info/CorePortletInfo.java 2008-03-18
14:27:24 UTC (rev 10306)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/info/CorePortletInfo.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -1,87 +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.core.portlet.info;
-
-import org.jboss.portal.common.transaction.Transactions;
-import org.jboss.portal.core.impl.portlet.info.AjaxInfoImpl;
-import org.jboss.portal.core.impl.portlet.info.MarkupHeaderInfoImpl;
-import org.jboss.portal.core.impl.portlet.info.PortletInfoInfoImpl;
-import org.jboss.portal.core.metadata.portlet.AjaxMetaData;
-import org.jboss.portal.core.metadata.portlet.HeaderContentMetaData;
-import org.jboss.portal.core.metadata.portlet.JBossPortletMetaData;
-import org.jboss.portal.core.metadata.portlet.PortletInfoMetaData;
-import org.jboss.portal.portlet.container.PortletApplicationContext;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
- * @version $Revision: 8786 $
- */
-public class CorePortletInfo
-{
- /** . */
- private final Transactions.Type txType;
-
- /** . */
- private final AjaxInfoImpl ajax;
-
- /** . */
- private final MarkupHeaderInfoImpl markupHeader;
-
- /** . */
- private final PortletInfoInfoImpl portletInfo;
-
- public CorePortletInfo(PortletApplicationContext portletApplicationContext,
JBossPortletMetaData jbossPortletMD)
- {
- //
- AjaxMetaData ajaxMD = jbossPortletMD.getAjax();
- HeaderContentMetaData headerContentMD = jbossPortletMD.getHeaderContent();
- PortletInfoMetaData portletInfoMD = jbossPortletMD.getPortletInfo();
-
- //
- this.txType = jbossPortletMD.getTxType();
- this.ajax = ajaxMD != null ? new AjaxInfoImpl(ajaxMD) : null;
- this.markupHeader = headerContentMD != null ? new
MarkupHeaderInfoImpl(headerContentMD) : null;
- this.portletInfo = portletInfoMD != null ? new
PortletInfoInfoImpl(portletApplicationContext, portletInfoMD) : null;
- }
-
- public Transactions.Type getTxType()
- {
- return txType;
- }
-
- public AjaxInfo getAjax()
- {
- return ajax;
- }
-
- public MarkupHeaderInfo getMarkupHeader()
- {
- return markupHeader;
- }
-
- public PortletInfoInfo getPortletInfo()
- {
- return portletInfo;
- }
-}
Added:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/info/TransactionInfo.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/info/TransactionInfo.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/info/TransactionInfo.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -0,0 +1,35 @@
+/******************************************************************************
+ * 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.core.portlet.info;
+
+import org.jboss.portal.common.transaction.Transactions;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public interface TransactionInfo
+{
+ Transactions.Type getTransactionType();
+}
+
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossPortlet.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossPortlet.java 2008-03-18
14:27:24 UTC (rev 10306)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossPortlet.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portlet;
+import org.jboss.logging.Logger;
import org.jboss.portal.format.util.EntityTable;
import javax.portlet.ActionRequest;
@@ -56,7 +57,6 @@
*/
public class JBossPortlet implements Portlet
{
-
/** . */
private static final Class[] ACTION_LOOKUP = new Class[]{JBossActionRequest.class,
JBossActionResponse.class};
@@ -387,7 +387,14 @@
public void render(RenderRequest req, RenderResponse resp) throws PortletException,
PortletSecurityException, IOException
{
- render((JBossRenderRequest)req, (JBossRenderResponse)resp);
+ try
+ {
+ render((JBossRenderRequest)req, (JBossRenderResponse)resp);
+ }
+ catch (ClassCastException e)
+ {
+ throw new PortletException("The request isn't a JBossRenderRequest, you
probably need to activate the JBoss Portlet Filter:
org.jboss.portlet.filter.JBossPortletFilter on " + getPortletName());
+ }
}
public void destroy()
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2008-03-18
14:27:24 UTC (rev 10306)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -32,7 +32,6 @@
import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.PortalObjectPath;
-import org.jboss.portal.core.portlet.info.CorePortletInfo;
import org.jboss.portal.core.portlet.info.PortletIconInfo;
import org.jboss.portal.core.portlet.info.PortletInfoInfo;
import org.jboss.portal.core.ui.content.portlet.PortletContentEditorPortlet;
@@ -465,10 +464,9 @@
Portlet portlet = (Portlet)bean;
PortletInfo info = portlet.getInfo();
- CorePortletInfo cInfo = info.getAttachment(CorePortletInfo.class);
- if (cInfo != null)
+ PortletInfoInfo portletInfo = info.getAttachment(PortletInfoInfo.class);
+ if (portletInfo != null)
{
- PortletInfoInfo portletInfo = cInfo.getPortletInfo();
if (portletInfo != null && portletInfo.getPortletIconInfo() != null
&& portletInfo.getPortletIconInfo().getIconLocation(iconType) != null)
{
return portletInfo.getPortletIconInfo().getIconLocation(iconType);
Modified:
branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/users/CurrentUsersPortlet.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/users/CurrentUsersPortlet.java 2008-03-18
14:27:24 UTC (rev 10306)
+++
branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/users/CurrentUsersPortlet.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -26,12 +26,12 @@
import org.jboss.portal.core.identity.UsersActivityStatsService;
import org.jboss.portal.core.servlet.jsp.PortalJsp;
import org.jboss.portal.core.servlet.jsp.taglib.context.DelegateContext;
-import org.jboss.portlet.JBossPortlet;
-import org.jboss.portlet.JBossRenderRequest;
-import org.jboss.portlet.JBossRenderResponse;
+import javax.portlet.GenericPortlet;
import javax.portlet.PortletException;
import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
import javax.portlet.UnavailableException;
import java.io.IOException;
import java.io.PrintWriter;
@@ -42,13 +42,13 @@
*
* @author <a href="mailto:jedim@vige.it">Luca Stancapiano</a>
*/
-public class CurrentUsersPortlet extends JBossPortlet
+public class CurrentUsersPortlet extends GenericPortlet
{
/** Logger */
public static Logger log = Logger.getLogger(CurrentUsersPortlet.class);
- protected void doView(JBossRenderRequest rRequest, JBossRenderResponse rResponse)
+ protected void doView(RenderRequest rRequest, RenderResponse rResponse)
throws PortletException, IOException, UnavailableException
{
UsersActivityStatsService uass = (UsersActivityStatsService)this
Modified:
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/PortletSessionSynchronizationInterceptor.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/PortletSessionSynchronizationInterceptor.java 2008-03-18
14:27:24 UTC (rev 10306)
+++
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/PortletSessionSynchronizationInterceptor.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -25,8 +25,8 @@
import org.jboss.portal.common.invocation.InvocationException;
import org.jboss.portal.portlet.container.PortletContainer;
import org.jboss.portal.portlet.container.PortletContainerInvoker;
+import org.jboss.portal.portlet.deployment.jboss.info.SessionInfo;
import org.jboss.portal.portlet.info.PortletInfo;
-import org.jboss.portal.portlet.info.SessionInfo;
import org.jboss.portal.portlet.invocation.PortletInterceptor;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.session.SessionListener;
@@ -44,7 +44,7 @@
{
PortletContainer container =
(PortletContainer)invocation.getAttribute(PortletInvocation.INVOCATION_SCOPE,
PortletContainerInvoker.PORTLET_CONTAINER);
PortletInfo portletInfo = container.getInfo();
- SessionInfo sessionInfo = portletInfo.getSession();
+ SessionInfo sessionInfo = portletInfo.getAttachment(SessionInfo.class);
if (sessionInfo != null &&
Boolean.TRUE.equals(sessionInfo.getDistributed()))
{
Modified:
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/JBossApplicationMetaDataFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/JBossApplicationMetaDataFactory.java 2008-03-18
14:27:24 UTC (rev 10306)
+++
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/JBossApplicationMetaDataFactory.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -23,7 +23,7 @@
package org.jboss.portal.portlet.deployment.jboss;
import org.jboss.portal.common.transaction.Transactions;
-import org.jboss.portal.portlet.deployment.jboss.info.ContainerCacheInfo;
+import org.jboss.portal.portlet.deployment.jboss.info.impl.CacheInfoImpl;
import org.jboss.portal.portlet.deployment.jboss.metadata.JBossApplicationMetaData;
import org.jboss.portal.portlet.deployment.jboss.metadata.JBossPortletMetaData;
import org.jboss.portal.portlet.deployment.jboss.metadata.PolicyPermissionMetaData;
@@ -198,11 +198,11 @@
{
if ("strong".equals(localName))
{
- portlet.setCacheRefType(new Integer(ContainerCacheInfo.REF_STRONG));
+ portlet.setCacheRefType(new Integer(CacheInfoImpl.REF_STRONG));
}
else if ("soft".equals(localName))
{
- portlet.setCacheRefType(new Integer(ContainerCacheInfo.REF_SOFT));
+ portlet.setCacheRefType(new Integer(CacheInfoImpl.REF_SOFT));
}
else
{
Deleted:
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/ContainerCacheInfo.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/ContainerCacheInfo.java 2008-03-18
14:27:24 UTC (rev 10306)
+++
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/ContainerCacheInfo.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -1,77 +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.portlet.deployment.jboss.info;
-
-import org.apache.log4j.Logger;
-import org.jboss.portal.portlet.deployment.jboss.metadata.JBossPortletMetaData;
-import org.jboss.portal.portlet.impl.metadata.portlet.PortletMetaData;
-import org.jboss.portal.portlet.info.CacheInfo;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 6697 $
- */
-public class ContainerCacheInfo implements CacheInfo
-{
-
- /** Cache uses strong references. */
- public static int REF_STRONG = 0;
-
- /** Cache uses soft references. */
- public static int REF_SOFT = 1;
-
- /** . */
- private static Logger log = Logger.getLogger(ContainerCacheInfo.class);
-
- /** . */
- private int expirationTimeSecs;
-
- /** . */
- private int referenceType;
-
- public ContainerCacheInfo(PortletMetaData portletMD, JBossPortletMetaData
jbossPortletMD)
- {
- expirationTimeSecs = portletMD.getExpirationCache();
- if (expirationTimeSecs < 0 && expirationTimeSecs != -1)
- {
- log.warn("Seen bad caching expiration value " + expirationTimeSecs +
" disable caching instead");
- expirationTimeSecs = 0;
- }
-
- referenceType = REF_STRONG;
- if (jbossPortletMD != null)
- {
- referenceType = jbossPortletMD.getCacheRefType() == null ? REF_STRONG :
jbossPortletMD.getCacheRefType().intValue();
- }
- }
-
- public int getExpirationSecs()
- {
- return expirationTimeSecs;
- }
-
- public int getReferenceType()
- {
- return referenceType;
- }
-}
Added:
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/SessionInfo.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/SessionInfo.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/SessionInfo.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -0,0 +1,35 @@
+/******************************************************************************
+ * 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.portlet.deployment.jboss.info;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public interface SessionInfo
+{
+ /**
+ * @return true if the session should be distributed
+ */
+ Boolean getDistributed();
+}
Property changes on:
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/SessionInfo.java
___________________________________________________________________
Name: svn:executable
+ *
Added:
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/impl/CacheInfoImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/impl/CacheInfoImpl.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/impl/CacheInfoImpl.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -0,0 +1,77 @@
+/******************************************************************************
+ * 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.portlet.deployment.jboss.info.impl;
+
+import org.apache.log4j.Logger;
+import org.jboss.portal.portlet.deployment.jboss.metadata.JBossPortletMetaData;
+import org.jboss.portal.portlet.impl.metadata.portlet.PortletMetaData;
+import org.jboss.portal.portlet.info.CacheInfo;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 6697 $
+ */
+public class CacheInfoImpl implements CacheInfo
+{
+
+ /** Cache uses strong references. */
+ public static int REF_STRONG = 0;
+
+ /** Cache uses soft references. */
+ public static int REF_SOFT = 1;
+
+ /** . */
+ private static Logger log = Logger.getLogger(CacheInfoImpl.class);
+
+ /** . */
+ private int expirationTimeSecs;
+
+ /** . */
+ private int referenceType;
+
+ public CacheInfoImpl(PortletMetaData portletMD, JBossPortletMetaData jbossPortletMD)
+ {
+ expirationTimeSecs = portletMD.getExpirationCache();
+ if (expirationTimeSecs < 0 && expirationTimeSecs != -1)
+ {
+ log.warn("Seen bad caching expiration value " + expirationTimeSecs +
" disable caching instead");
+ expirationTimeSecs = 0;
+ }
+
+ referenceType = REF_STRONG;
+ if (jbossPortletMD != null)
+ {
+ referenceType = jbossPortletMD.getCacheRefType() == null ? REF_STRONG :
jbossPortletMD.getCacheRefType().intValue();
+ }
+ }
+
+ public int getExpirationSecs()
+ {
+ return expirationTimeSecs;
+ }
+
+ public int getReferenceType()
+ {
+ return referenceType;
+ }
+}
Added:
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/impl/SessionInfoImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/impl/SessionInfoImpl.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/impl/SessionInfoImpl.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -0,0 +1,52 @@
+/******************************************************************************
+ * 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.portlet.deployment.jboss.info.impl;
+
+import org.jboss.portal.portlet.deployment.jboss.info.SessionInfo;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 7226 $
+ */
+public class SessionInfoImpl implements SessionInfo
+{
+
+ /** . */
+ private boolean distributed;
+
+ public SessionInfoImpl(Boolean distributed)
+ {
+ if (distributed == null)
+ {
+ distributed = false;
+ }
+
+ //
+ this.distributed = distributed;
+ }
+
+ public Boolean getDistributed()
+ {
+ return distributed;
+ }
+}
\ No newline at end of file
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/info/WSRPPortletInfo.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/info/WSRPPortletInfo.java 2008-03-18
14:27:24 UTC (rev 10306)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/info/WSRPPortletInfo.java 2008-03-18
14:53:32 UTC (rev 10307)
@@ -35,7 +35,6 @@
import org.jboss.portal.portlet.info.PreferenceInfo;
import org.jboss.portal.portlet.info.PreferencesInfo;
import org.jboss.portal.portlet.info.SecurityInfo;
-import org.jboss.portal.portlet.info.SessionInfo;
import org.jboss.portal.portlet.info.WindowStateInfo;
import org.jboss.portal.wsrp.WSRPUtils;
import org.jboss.portal.wsrp.consumer.ProducerInfo;
@@ -193,11 +192,6 @@
throw new UnsupportedOperationException("getCache currently not
supported!");
}
- public SessionInfo getSession()
- {
- return null;
- }
-
public Boolean isRemotable()
{
return Boolean.FALSE;
Modified: modules/portlet/trunk/.classpath
===================================================================
--- modules/portlet/trunk/.classpath 2008-03-18 14:27:24 UTC (rev 10306)
+++ modules/portlet/trunk/.classpath 2008-03-18 14:53:32 UTC (rev 10307)
@@ -8,6 +8,8 @@
<classpathentry kind="src" path="management/src/main/java"/>
<classpathentry kind="src" path="test/src/main/java"/>
<classpathentry kind="src" path="samples/src/main/java"/>
+ <classpathentry kind="src" path="portlet/src/test/java"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib"
path="/home/theute/Java/jdk1.5.0_08/lib/tools.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>