Author: thomas.heute(a)jboss.com
Date: 2008-03-18 10:57:23 -0400 (Tue, 18 Mar 2008)
New Revision: 10308
Removed:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/portlet/support/info/SessionInfoSupport.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/info/SessionInfoTest.java
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/info/ContainerInfoBuilder.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/info/ContainerPortletInfo.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/info/PortletInfo.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/portlet/support/info/PortletInfoSupport.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/info/PortletInfoTest.java
modules/portlet/trunk/test/src/test/resources/info/test-info-war/WEB-INF/jboss-portlet.xml
modules/portlet/trunk/test/src/test/resources/info/test-info-war/WEB-INF/portlet.xml
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:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/info/ContainerInfoBuilder.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/info/ContainerInfoBuilder.java 2008-03-18
14:53:32 UTC (rev 10307)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/info/ContainerInfoBuilder.java 2008-03-18
14:57:23 UTC (rev 10308)
@@ -520,7 +520,6 @@
ContainerMetaInfo containerMeta = buildContainerMeta(portletMD);
ContainerSecurityInfo containerSecurity = buildContainerSecurityInfo(portletMD);
ContainerCacheInfo containerCache = buildContainerCache(portletMD);
- ContainerSessionInfo containerSession = buildContainerSession(portletMD);
//
Map<String, String> initParameters = Collections.emptyMap();
@@ -607,7 +606,6 @@
containerMeta,
containerSecurity,
containerCache,
- containerSession,
containerEvents,
containerNavigation,
filters,
@@ -628,7 +626,6 @@
containerMeta,
containerSecurity,
containerCache,
- containerSession,
portletMD.getPortletName(),
portletMD.getPortletClass(),
context.getApplicationName(),
@@ -753,11 +750,6 @@
return containerSecurity;
}
- private ContainerSessionInfo buildContainerSession(PortletMetaData portletMD)
- {
- return new ContainerSessionInfo(false);
- }
-
private ContainerCacheInfo buildContainerCache(PortletMetaData portletMD)
{
int expirationCache = portletMD.getExpirationCache();
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/info/ContainerPortletInfo.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/info/ContainerPortletInfo.java 2008-03-18
14:53:32 UTC (rev 10307)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/info/ContainerPortletInfo.java 2008-03-18
14:57:23 UTC (rev 10308)
@@ -60,9 +60,6 @@
private final ContainerCacheInfo cache;
/** . */
- private final ContainerSessionInfo session;
-
- /** . */
private final ContainerEventingInfo events;
/** . */
@@ -98,7 +95,6 @@
ContainerMetaInfo meta,
ContainerSecurityInfo security,
ContainerCacheInfo cache,
- ContainerSessionInfo session,
String name,
String className,
String applicationName,
@@ -112,7 +108,6 @@
this.meta = meta;
this.security = security;
this.cache = cache;
- this.session = session;
this.events = new ContainerEventingInfo();
this.navigation = new ContainerNavigationInfo();
this.filterRefs = Collections.emptyList();
@@ -131,7 +126,6 @@
ContainerMetaInfo meta,
ContainerSecurityInfo security,
ContainerCacheInfo cache,
- ContainerSessionInfo session,
ContainerEventingInfo events,
ContainerNavigationInfo navigation,
List<String> filterRefs,
@@ -149,7 +143,6 @@
this.meta = meta;
this.security = security;
this.cache = cache;
- this.session = session;
this.events = events;
this.navigation = navigation;
this.filterRefs = filterRefs;
@@ -257,11 +250,6 @@
return cache;
}
- public ContainerSessionInfo getSession()
- {
- return session;
- }
-
public Boolean isRemotable()
{
return remotable;
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/info/PortletInfo.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/info/PortletInfo.java 2008-03-18
14:53:32 UTC (rev 10307)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/info/PortletInfo.java 2008-03-18
14:57:23 UTC (rev 10308)
@@ -83,14 +83,6 @@
CacheInfo getCache();
/**
- * Retrieves session-related information for the described portlet. If no information
is available then it returns
- * the null value.
- *
- * @return the session related information
- */
- SessionInfo getSession();
-
- /**
* Determines whether the described portlet can be accessed remotely (such as via
WSRP) or not. Clients of this
* method should be prepare to handle a <code>null</code> return value
expressing the fact that the remotable status
* hasn't been explicitely set.
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/portlet/support/info/PortletInfoSupport.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/portlet/support/info/PortletInfoSupport.java 2008-03-18
14:53:32 UTC (rev 10307)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/portlet/support/info/PortletInfoSupport.java 2008-03-18
14:57:23 UTC (rev 10308)
@@ -38,7 +38,6 @@
private PreferencesInfoSupport preferencesSupport = new PreferencesInfoSupport();
private SecurityInfoSupport securitySupport = new SecurityInfoSupport();
private CacheInfoSupport cacheSupport = new CacheInfoSupport();
- private SessionInfoSupport sessionSupport = new SessionInfoSupport();
private MetaInfoSupport metaSupport = new MetaInfoSupport();
private EventingInfoSupport eventsSupport = new EventingInfoSupport();
private NavigationInfoSupport navigationSupport = new NavigationInfoSupport();
@@ -88,11 +87,6 @@
return cacheSupport;
}
- public SessionInfoSupport getSession()
- {
- return sessionSupport;
- }
-
public Boolean isRemotable()
{
return remotable;
Deleted:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/portlet/support/info/SessionInfoSupport.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/portlet/support/info/SessionInfoSupport.java 2008-03-18
14:53:32 UTC (rev 10307)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/portlet/support/info/SessionInfoSupport.java 2008-03-18
14:57:23 UTC (rev 10308)
@@ -1,56 +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.support.info;
-
-import org.jboss.portal.portlet.info.SessionInfo;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 5448 $
- */
-public class SessionInfoSupport implements SessionInfo
-{
-
- /** . */
- private Boolean distributed;
-
- public SessionInfoSupport(Boolean distributed)
- {
- this.distributed = distributed;
- }
-
- public SessionInfoSupport()
- {
- this(null);
- }
-
- public Boolean getDistributed()
- {
- return distributed;
- }
-
- public void setDistributed(Boolean distributed)
- {
- this.distributed = distributed;
- }
-}
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/info/PortletInfoTest.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/info/PortletInfoTest.java 2008-03-18
14:53:32 UTC (rev 10307)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/info/PortletInfoTest.java 2008-03-18
14:57:23 UTC (rev 10308)
@@ -52,7 +52,6 @@
assertNotNull(info.getMeta());
assertNotNull(info.getPreferences());
assertNotNull(info.getSecurity());
- assertNotNull(info.getSession());
container =
registry.getManagedPortletApplication("/test-info").getManagedPortletContainer("RemotablePortlet2");
info = container.getInfo();
Deleted:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/info/SessionInfoTest.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/info/SessionInfoTest.java 2008-03-18
14:53:32 UTC (rev 10307)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/info/SessionInfoTest.java 2008-03-18
14:57:23 UTC (rev 10308)
@@ -1,60 +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.portlet.info;
-
-import org.jboss.portal.portlet.container.managed.ManagedPortletContainer;
-import org.jboss.portal.portlet.info.PortletInfo;
-import org.jboss.portal.portlet.info.SessionInfo;
-
-import static org.jboss.unit.api.Assert.*;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.com">Boleslaw
Dawidowicz</a>
- * @version $Revision: 6720 $
- */
-public class SessionInfoTest extends AbstractInfoTest
-{
-
- public SessionInfoTest()
- {
- super("SessionInfoTest");
- }
-
- public void execute()
- {
- ManagedPortletContainer container =
registry.getManagedPortletApplication("/test-info").getManagedPortletContainer("DistributedPortlet1");
- PortletInfo info = container.getInfo();
- SessionInfo sessionInfo = info.getSession();
- assertNotNull(sessionInfo);
- Boolean distributed = sessionInfo.getDistributed();
- assertEquals(Boolean.TRUE, distributed);
-
-
- container =
registry.getManagedPortletApplication("/test-info").getManagedPortletContainer("DistributedPortlet2");
- info = container.getInfo();
- sessionInfo = info.getSession();
- assertNotNull(sessionInfo);
- distributed = sessionInfo.getDistributed();
- assertEquals(Boolean.FALSE, distributed);
- }
-}
Modified:
modules/portlet/trunk/test/src/test/resources/info/test-info-war/WEB-INF/jboss-portlet.xml
===================================================================
---
modules/portlet/trunk/test/src/test/resources/info/test-info-war/WEB-INF/jboss-portlet.xml 2008-03-18
14:53:32 UTC (rev 10307)
+++
modules/portlet/trunk/test/src/test/resources/info/test-info-war/WEB-INF/jboss-portlet.xml 2008-03-18
14:57:23 UTC (rev 10308)
@@ -34,13 +34,4 @@
<portlet-name>RemotablePortlet3</portlet-name>
<remotable>true</remotable>
</portlet>
-
- <portlet>
- <portlet-name>DistributedPortlet1</portlet-name>
- <distributed>true</distributed>
- </portlet>
- <portlet>
- <portlet-name>DistributedPortlet2</portlet-name>
- <distributed>false</distributed>
- </portlet>
</portlet-app>
\ No newline at end of file
Modified:
modules/portlet/trunk/test/src/test/resources/info/test-info-war/WEB-INF/portlet.xml
===================================================================
---
modules/portlet/trunk/test/src/test/resources/info/test-info-war/WEB-INF/portlet.xml 2008-03-18
14:53:32 UTC (rev 10307)
+++
modules/portlet/trunk/test/src/test/resources/info/test-info-war/WEB-INF/portlet.xml 2008-03-18
14:57:23 UTC (rev 10308)
@@ -186,34 +186,6 @@
</portlet>
<portlet>
- <portlet-name>DistributedPortlet1</portlet-name>
-
<portlet-class>org.jboss.portal.test.portlet.info.universal.SimplePortlet</portlet-class>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>VIEW</portlet-mode>
- </supports>
- <portlet-info>
- <title>title</title>
- <short-title>short-title</short-title>
- <keywords>keywords</keywords>
- </portlet-info>
- </portlet>
-
- <portlet>
- <portlet-name>DistributedPortlet2</portlet-name>
-
<portlet-class>org.jboss.portal.test.portlet.info.universal.SimplePortlet</portlet-class>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>VIEW</portlet-mode>
- </supports>
- <portlet-info>
- <title>title</title>
- <short-title>short-title</short-title>
- <keywords>keywords</keywords>
- </portlet-info>
- </portlet>
-
- <portlet>
<portlet-name>SecuredPortlet1</portlet-name>
<portlet-class>org.jboss.portal.test.portlet.info.universal.SimplePortlet</portlet-class>
<supports>