Author: julien(a)jboss.com
Date: 2007-03-15 17:27:09 -0400 (Thu, 15 Mar 2007)
New Revision: 6700
Added:
trunk/portlet/src/main/org/jboss/portal/portlet/deployment/jboss/PortletContainerAdapter.java
Removed:
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerAdapter.java
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeployment.java
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/info/ContainerCapabilities.java
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/info/ContainerPortletInfo.java
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/info/ContentTypes.java
Log:
moved the PortletContainerAdapter at the right place
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeployment.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeployment.java 2007-03-15
21:05:07 UTC (rev 6699)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeployment.java 2007-03-15
21:27:09 UTC (rev 6700)
@@ -35,12 +35,12 @@
import org.jboss.portal.common.xml.NullEntityResolver;
import org.jboss.portal.portlet.container.PortletApplicationContextImpl;
import org.jboss.portal.portlet.container.PortletApplicationRegistry;
-import org.jboss.portal.portlet.impl.jsr168.PortletContainerAdapter;
import org.jboss.portal.portlet.deployment.JBossApplicationMetaDataFactory;
import org.jboss.portal.portlet.deployment.PortletApplicationMetaDataFactory;
import org.jboss.portal.portlet.impl.jsr168.APIFactory;
import org.jboss.portal.portlet.impl.jsr168.metadata.PortletApplicationMetaData;
import org.jboss.portal.portlet.impl.jsr168.metadata.PortletMetaData;
+import org.jboss.portal.portlet.deployment.jboss.PortletContainerAdapter;
import org.jboss.portal.portlet.metadata.JBossApplicationMetaData;
import org.jboss.portal.portlet.metadata.JBossPortletMetaData;
import org.jboss.portal.portlet.metadata.PolicyPermissionMetaData;
Copied:
trunk/portlet/src/main/org/jboss/portal/portlet/deployment/jboss/PortletContainerAdapter.java
(from rev 6697,
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerAdapter.java)
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/deployment/jboss/PortletContainerAdapter.java
(rev 0)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/deployment/jboss/PortletContainerAdapter.java 2007-03-15
21:27:09 UTC (rev 6700)
@@ -0,0 +1,89 @@
+/******************************************************************************
+ * 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;
+
+import org.jboss.portal.portlet.impl.jsr168.metadata.PortletMetaData;
+import org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl;
+import org.jboss.portal.portlet.impl.jsr168.PortletApplicationImpl;
+import org.jboss.portal.portlet.metadata.JBossPortletMetaData;
+import org.jboss.portal.portlet.container.PortletApplicationContextImpl;
+import org.jboss.portal.portlet.container.PortletContainer;
+
+/**
+ * Adapt the life cycle of micro container to the portlet container impl.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision$
+ */
+public class PortletContainerAdapter
+{
+
+ /** . */
+ private PortletMetaData portletMD;
+
+ /** . */
+ private JBossPortletMetaData jbossPortletMD;
+
+ /** . */
+ private PortletApplicationContextImpl portletApplicationContext;
+
+ /** . */
+ private PortletContainerImpl portletContainer;
+
+ public PortletContainerAdapter(PortletMetaData portletMD, JBossPortletMetaData
jbossPortletMD)
+ {
+ this.portletMD = portletMD;
+ this.jbossPortletMD = jbossPortletMD;
+ }
+
+ public PortletApplicationContextImpl getPortletApplicationContext()
+ {
+ return portletApplicationContext;
+ }
+
+ public void setPortletWebAppAdapter(PortletApplicationContextImpl
portletApplicationContext)
+ {
+ this.portletApplicationContext = portletApplicationContext;
+ }
+
+ public PortletContainer getPortletContainer()
+ {
+ return portletContainer;
+ }
+
+ public void start() throws Exception
+ {
+ PortletApplicationImpl portletApp =
portletApplicationContext.getPortletApplication();
+ portletContainer = new PortletContainerImpl(portletApp, portletMD,
jbossPortletMD);
+ portletContainer.start();
+ portletApp.addContainer(portletContainer);
+ }
+
+ public void stop()
+ {
+ PortletApplicationImpl portletApp =
portletApplicationContext.getPortletApplication();
+ portletApp.removeContainer(portletContainer);
+ portletContainer.stop();
+ portletContainer = null;
+ }
+}
Property changes on:
trunk/portlet/src/main/org/jboss/portal/portlet/deployment/jboss/PortletContainerAdapter.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Deleted:
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerAdapter.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerAdapter.java 2007-03-15
21:05:07 UTC (rev 6699)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerAdapter.java 2007-03-15
21:27:09 UTC (rev 6700)
@@ -1,85 +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.impl.jsr168;
-
-import org.jboss.portal.portlet.impl.jsr168.metadata.PortletMetaData;
-import org.jboss.portal.portlet.metadata.JBossPortletMetaData;
-import org.jboss.portal.portlet.container.PortletApplicationContextImpl;
-import org.jboss.portal.portlet.container.PortletContainer;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision$
- */
-public class PortletContainerAdapter
-{
-
- /** . */
- private PortletMetaData portletMD;
-
- /** . */
- private JBossPortletMetaData jbossPortletMD;
-
- /** . */
- private PortletApplicationContextImpl portletApplicationContext;
-
- /** . */
- private PortletContainerImpl portletContainer;
-
- public PortletContainerAdapter(PortletMetaData portletMD, JBossPortletMetaData
jbossPortletMD)
- {
- this.portletMD = portletMD;
- this.jbossPortletMD = jbossPortletMD;
- }
-
- public PortletApplicationContextImpl getPortletApplicationContext()
- {
- return portletApplicationContext;
- }
-
- public void setPortletWebAppAdapter(PortletApplicationContextImpl
portletApplicationContext)
- {
- this.portletApplicationContext = portletApplicationContext;
- }
-
- public PortletContainer getPortletContainer()
- {
- return portletContainer;
- }
-
- public void start() throws Exception
- {
- PortletApplicationImpl portletApp =
portletApplicationContext.getPortletApplication();
- portletContainer = new PortletContainerImpl(portletApp, portletMD,
jbossPortletMD);
- portletContainer.start();
- portletApp.addContainer(portletContainer);
- }
-
- public void stop()
- {
- PortletApplicationImpl portletApp =
portletApplicationContext.getPortletApplication();
- portletApp.removeContainer(portletContainer);
- portletContainer.stop();
- portletContainer = null;
- }
-}
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java 2007-03-15
21:05:07 UTC (rev 6699)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java 2007-03-15
21:27:09 UTC (rev 6700)
@@ -23,7 +23,6 @@
package org.jboss.portal.portlet.impl.jsr168;
import org.jboss.logging.Logger;
-import org.jboss.portal.portlet.impl.jsr168.PortletApplicationImpl;
import org.jboss.portal.portlet.impl.jsr168.api.PortletConfigImpl;
import org.jboss.portal.portlet.impl.jsr168.api.ActionResponseImpl;
import org.jboss.portal.portlet.impl.jsr168.api.RenderResponseImpl;
@@ -157,7 +156,7 @@
return valve.getState() == Valve.OPEN;
}
- public void start() throws Exception, PortletInitializationException
+ public void start() throws PortletInitializationException
{
// Set class name
this.className = metaData.getClassName();
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/info/ContainerCapabilities.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/info/ContainerCapabilities.java 2007-03-15
21:05:07 UTC (rev 6699)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/info/ContainerCapabilities.java 2007-03-15
21:27:09 UTC (rev 6700)
@@ -52,7 +52,7 @@
private ContentTypes contentTypes;
private PortletResourceBundleManager bundleMgr;
- public ContainerCapabilities(Set supportedLocales, PortletResourceBundleManager
bundleMgr, ContentTypes contentTypes) throws Exception
+ public ContainerCapabilities(Set supportedLocales, PortletResourceBundleManager
bundleMgr, ContentTypes contentTypes)
{
this.supportedLocales = supportedLocales;
this.contentTypes = contentTypes;
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/info/ContainerPortletInfo.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/info/ContainerPortletInfo.java 2007-03-15
21:05:07 UTC (rev 6699)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/info/ContainerPortletInfo.java 2007-03-15
21:27:09 UTC (rev 6700)
@@ -62,7 +62,6 @@
PortletContainerImpl container,
PortletResourceBundleManager bundleMgr,
ContentTypes contentTypes)
- throws Exception
{
PortletMetaData portletMD = container.getMetaData();
JBossPortletMetaData jbossPortletMD = container.getJBossMetaData();
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/info/ContentTypes.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/info/ContentTypes.java 2007-03-15
21:05:07 UTC (rev 6699)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/info/ContentTypes.java 2007-03-15
21:27:09 UTC (rev 6700)
@@ -84,7 +84,7 @@
this.metadata = metadata;
}
- public void start() throws Exception
+ public void start()
{
initFromMetadata(metadata);
}