Author: julien(a)jboss.com
Date: 2008-02-19 07:14:38 -0500 (Tue, 19 Feb 2008)
New Revision: 10028
Removed:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/container/PortletApplicationContextImpl.java
Log:
remove very obsolete class
Deleted:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/container/PortletApplicationContextImpl.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/container/PortletApplicationContextImpl.java 2008-02-19
12:08:48 UTC (rev 10027)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/container/PortletApplicationContextImpl.java 2008-02-19
12:14:38 UTC (rev 10028)
@@ -1,204 +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.container;
-
-import org.jboss.portal.portlet.container.PortletApplicationContext;
-import org.jboss.portal.portlet.container.managed.PortletApplicationRegistrationContext;
-import org.jboss.portal.portlet.container.managed.PortletApplicationRegistry;
-import org.jboss.portal.portlet.container.PortletContainer;
-import org.jboss.portal.portlet.impl.jsr168.PortletApplicationImpl;
-import org.jboss.portal.portlet.impl.jsr168.spi.PortletAPIFactory;
-import org.jboss.portal.portlet.impl.jsr168.spi.PortletInfoFactory;
-import org.jboss.portal.portlet.impl.metadata.PortletApplication10MetaData;
-import org.jboss.portal.portlet.metadata.JBossApplicationMetaData;
-import org.jboss.portal.common.FixMe;
-
-import javax.servlet.ServletContext;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 6697 $
- */
-public class PortletApplicationContextImpl implements PortletApplicationContext
-{
-
- /** . */
- private final PortletAPIFactory portletAPIFactory;
-
- /** . */
- private final PortletApplication10MetaData portletAppMD;
-
- /** . */
- private final JBossApplicationMetaData jbossAppMD;
-
- /** . */
- private final ServletContext servletContext;
-
- /** . */
- private final ClassLoader classLoader;
-
- /** . */
- private PortletApplicationImpl portletApp;
-
- /** . */
- private PortletApplicationRegistry registry;
-
- /** . */
- private PortletApplicationRegistrationContext registrationContext;
-
- /** . */
- private String contextPath;
-
- public PortletApplicationContextImpl(
- PortletApplicationRegistry registry,
- PortletAPIFactory portletAPIFactory,
- PortletInfoFactory portletInfoFactory,
- PortletApplication10MetaData portletAppMD,
- JBossApplicationMetaData jbossAppMD,
- ServletContext servletContext,
- ClassLoader classLoader,
- String contextPath)
- {
- this.registry = registry;
- this.portletAPIFactory = portletAPIFactory;
- this.portletAppMD = portletAppMD;
- this.jbossAppMD = jbossAppMD;
- this.servletContext = servletContext;
- this.classLoader = classLoader;
- this.contextPath = contextPath;
- }
-
- public PortletApplicationImpl getPortletApplication()
- {
- return portletApp;
- }
-
- // PortletApplicationContext implementation
*************************************************************************
-
- public void invokeStart() throws Exception
- {
- throw new FixMe("Not used anymore for now, check or reimplement in
2.6");
-/*
- portletApp = new PortletApplicationImpl(portletAppMD, jbossAppMD, this,
portletAPIFactory);
- portletApp.start();
-
- //
- registrationContext = registry.registerPortletApplication(portletApp);
-
- // Fixme here need the web App
- ContainerInfoBuilderContext builderContext = new
ContainerInfoBuilderContextImpl(portletAppMD, null);
- ContainerInfoBuilder builder = new ContainerInfoBuilder(portletAppMD,
builderContext);
- builder.build();
-
- //
- for (ContainerPortletInfo containerInfo : builder.getPortlets())
- {
-// JBossPortletMetaData jBossPortletMD = null;
-// if (jbossAppMD != null)
-// {
-// jBossPortletMD =
(JBossPortletMetaData)jbossAppMD.getPortlets().get(portletMD.getName());
-// }
-
-
- //
- PortletContainerImpl container = new PortletContainerImpl(containerInfo);
-
- //
- container.setApplication(portletApp);
- portletApp.addContainer(container);
-
- //
- try
- {
- container.start();
- registrationContext.registerPortlet(container);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-*/
- }
-
- public void invokeStop()
- {
- // if the portlet application wasn't properly started, we shouldn't be
trying to stop it
- if (portletApp != null)
- {
- for (PortletContainer container : portletApp.getPortletContainers())
- {
- try
- {
- registrationContext.unregisterPortlet(container);
- container.stop();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- //
- portletApp.removeContainer(container);
- container.setApplication(null);
- }
-
- //
- registry.unregisterPortletApplication(portletApp);
- portletApp.stop();
-
- //
- portletApp = null;
- registrationContext = null;
- }
- }
-
- public void startPortletContainer(String portletName) throws Exception
- {
- PortletContainer container = portletApp.getPortletContainer(portletName);
- container.start();
- registrationContext.registerPortlet(container);
- }
-
- public void stopPortletContainer(String portletName)
- {
- PortletContainer container = portletApp.getPortletContainer(portletName);
- registrationContext.unregisterPortlet(container);
- container.stop();
- }
-
- public ServletContext getServletContext()
- {
- return servletContext;
- }
-
- public String getContextPath()
- {
- return contextPath;
- }
-
- public ClassLoader getClassLoader()
- {
- return classLoader;
- }
-}