Author: julien(a)jboss.com
Date: 2008-02-19 07:08:48 -0500 (Tue, 19 Feb 2008)
New Revision: 10027
Added:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/ManagedPortletApplication.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/ManagedPortletContainer.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/PortletApplicationRegistrationContext.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/PortletApplicationRegistry.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/PortletApplicationRegistryListener.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/KernelPortletApplication.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/KernelPortletContainer.java
Removed:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplicationRegistrationContext.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplicationRegistry.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplicationRegistryListener.java
Modified:
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/PortletApplicationRegistryImpl.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/info/AbstractInfoTest.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployer.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployment.java
Log:
start to revamp the container registry to something more managed
Deleted:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplicationRegistrationContext.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplicationRegistrationContext.java 2008-02-19
11:39:23 UTC (rev 10026)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplicationRegistrationContext.java 2008-02-19
12:08:48 UTC (rev 10027)
@@ -1,47 +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.container;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface PortletApplicationRegistrationContext
-{
-
- /**
- * Register a portlet.
- *
- * @param portletContainer the portlet container
- */
- void registerPortlet(PortletContainer portletContainer);
-
- /**
- * Unregister a portlet.
- *
- * @param portletContainer the portlet container
- */
- void unregisterPortlet(PortletContainer portletContainer);
-
-
-}
Deleted:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplicationRegistry.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplicationRegistry.java 2008-02-19
11:39:23 UTC (rev 10026)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplicationRegistry.java 2008-02-19
12:08:48 UTC (rev 10027)
@@ -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.portlet.container;
-
-import java.util.Collection;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
- * @version $Revision: 6699 $
- */
-public interface PortletApplicationRegistry
-{
- /**
- * Register a portlet application.
- *
- * @param portletApplication the portlet application to register
- * @throws IllegalArgumentException if the portlet application is null or already
registered
- */
- PortletApplicationRegistrationContext registerPortletApplication(PortletApplication
portletApplication) throws IllegalArgumentException;
-
- /**
- * Unregister a portlet application.
- *
- * @param portletApplication the portlet application to unregister
- * @throws IllegalArgumentException if the portlet application is null or not
registered
- */
- void unregisterPortletApplication(PortletApplication portletApplication) throws
IllegalArgumentException;
-
- /** Return an immutable list all the known portlet application in the registry. */
- Collection<PortletApplication> getPortletApplications();
-
- /** Return a portlet app using its id or null if it does not exist. */
- PortletApplication getPortletApplication(String id);
-
- /**
- * Adds a portlet container registry listener.
- *
- * @param listener
- */
- void addListener(PortletApplicationRegistryListener listener);
-
- /**
- * Removes a portlet container registry listener.
- *
- * @param listener
- */
- void removeListener(PortletApplicationRegistryListener listener);
-}
Deleted:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplicationRegistryListener.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplicationRegistryListener.java 2008-02-19
11:39:23 UTC (rev 10026)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplicationRegistryListener.java 2008-02-19
12:08:48 UTC (rev 10027)
@@ -1,41 +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.container;
-
-/**
- * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
- */
-public interface PortletApplicationRegistryListener
-{
-
- /**
- * A portlet container has been registered.
- */
- void portletContainerRegistered(PortletContainer portletContainer);
-
- /**
- * A portlet container has been unregistered.
- */
- void portletContainerUnregistered(PortletContainer portletContainer);
-
-}
Added:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/ManagedPortletApplication.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/ManagedPortletApplication.java
(rev 0)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/ManagedPortletApplication.java 2008-02-19
12:08:48 UTC (rev 10027)
@@ -0,0 +1,42 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.container.managed;
+
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface ManagedPortletApplication
+{
+
+ String getId();
+
+ void managedStart() throws Exception;
+
+ void managedStop();
+
+ Collection<? extends ManagedPortletContainer> getManagedPortletContainers();
+
+}
Added:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/ManagedPortletContainer.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/ManagedPortletContainer.java
(rev 0)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/ManagedPortletContainer.java 2008-02-19
12:08:48 UTC (rev 10027)
@@ -0,0 +1,44 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.container.managed;
+
+import org.jboss.portal.portlet.info.PortletInfo;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface ManagedPortletContainer
+{
+
+ String getId();
+
+ PortletInfo getPortletInfo();
+
+ ManagedPortletApplication getManagedPortletApplication();
+
+ void managedStart() throws Exception;
+
+ void managedStop();
+
+}
Added:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/PortletApplicationRegistrationContext.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/PortletApplicationRegistrationContext.java
(rev 0)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/PortletApplicationRegistrationContext.java 2008-02-19
12:08:48 UTC (rev 10027)
@@ -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.portlet.container.managed;
+
+import org.jboss.portal.portlet.container.PortletContainer;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface PortletApplicationRegistrationContext
+{
+
+ /**
+ * Register a portlet.
+ *
+ * @param portletContainer the portlet container
+ */
+ void registerPortlet(PortletContainer portletContainer);
+
+ /**
+ * Unregister a portlet.
+ *
+ * @param portletContainer the portlet container
+ */
+ void unregisterPortlet(PortletContainer portletContainer);
+
+
+}
Added:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/PortletApplicationRegistry.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/PortletApplicationRegistry.java
(rev 0)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/PortletApplicationRegistry.java 2008-02-19
12:08:48 UTC (rev 10027)
@@ -0,0 +1,71 @@
+/******************************************************************************
+ * 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.container.managed;
+
+import org.jboss.portal.portlet.container.PortletApplication;
+
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision: 6699 $
+ */
+public interface PortletApplicationRegistry
+{
+ /**
+ * Register a portlet application.
+ *
+ * @param portletApplication the portlet application to register
+ * @throws IllegalArgumentException if the portlet application is null or already
registered
+ */
+ PortletApplicationRegistrationContext registerPortletApplication(PortletApplication
portletApplication) throws IllegalArgumentException;
+
+ /**
+ * Unregister a portlet application.
+ *
+ * @param portletApplication the portlet application to unregister
+ * @throws IllegalArgumentException if the portlet application is null or not
registered
+ */
+ void unregisterPortletApplication(PortletApplication portletApplication) throws
IllegalArgumentException;
+
+ /** Return an immutable list all the known portlet application in the registry. */
+ Collection<PortletApplication> getPortletApplications();
+
+ /** Return a portlet app using its id or null if it does not exist. */
+ PortletApplication getPortletApplication(String id);
+
+ /**
+ * Adds a portlet container registry listener.
+ *
+ * @param listener
+ */
+ void addListener(PortletApplicationRegistryListener listener);
+
+ /**
+ * Removes a portlet container registry listener.
+ *
+ * @param listener
+ */
+ void removeListener(PortletApplicationRegistryListener listener);
+}
Property changes on:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/PortletApplicationRegistry.java
___________________________________________________________________
Name: svn:executable
+ *
Added:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/PortletApplicationRegistryListener.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/PortletApplicationRegistryListener.java
(rev 0)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/managed/PortletApplicationRegistryListener.java 2008-02-19
12:08:48 UTC (rev 10027)
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * 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.container.managed;
+
+import org.jboss.portal.portlet.container.PortletContainer;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ */
+public interface PortletApplicationRegistryListener
+{
+
+ /**
+ * A portlet container has been registered.
+ */
+ void portletContainerRegistered(PortletContainer portletContainer);
+
+ /**
+ * A portlet container has been unregistered.
+ */
+ void portletContainerUnregistered(PortletContainer portletContainer);
+
+}
Modified:
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
11:39:23 UTC (rev 10026)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/container/PortletApplicationContextImpl.java 2008-02-19
12:08:48 UTC (rev 10027)
@@ -23,8 +23,8 @@
package org.jboss.portal.portlet.impl.container;
import org.jboss.portal.portlet.container.PortletApplicationContext;
-import org.jboss.portal.portlet.container.PortletApplicationRegistrationContext;
-import org.jboss.portal.portlet.container.PortletApplicationRegistry;
+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;
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/container/PortletApplicationRegistryImpl.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/container/PortletApplicationRegistryImpl.java 2008-02-19
11:39:23 UTC (rev 10026)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/container/PortletApplicationRegistryImpl.java 2008-02-19
12:08:48 UTC (rev 10027)
@@ -22,10 +22,10 @@
******************************************************************************/
package org.jboss.portal.portlet.impl.container;
-import org.jboss.portal.portlet.container.PortletApplicationRegistry;
-import org.jboss.portal.portlet.container.PortletApplicationRegistrationContext;
+import org.jboss.portal.portlet.container.managed.PortletApplicationRegistry;
+import org.jboss.portal.portlet.container.managed.PortletApplicationRegistrationContext;
import org.jboss.portal.portlet.container.PortletApplication;
-import org.jboss.portal.portlet.container.PortletApplicationRegistryListener;
+import org.jboss.portal.portlet.container.managed.PortletApplicationRegistryListener;
import org.jboss.portal.portlet.container.PortletContainer;
import java.util.ArrayList;
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/info/AbstractInfoTest.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/info/AbstractInfoTest.java 2008-02-19
11:39:23 UTC (rev 10026)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/info/AbstractInfoTest.java 2008-02-19
12:08:48 UTC (rev 10027)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.test.portlet.info;
-import org.jboss.portal.portlet.container.PortletApplicationRegistry;
+import org.jboss.portal.portlet.container.managed.PortletApplicationRegistry;
import org.jboss.unit.info.TestInfo;
import org.jboss.unit.info.impl.SimpleTestSuiteInfo;
import org.jboss.unit.remote.driver.RemoteTestDriver;
Copied:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/KernelPortletApplication.java
(from rev 10026,
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/ManagedPortletApplication.java)
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/KernelPortletApplication.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/KernelPortletApplication.java 2008-02-19
12:08:48 UTC (rev 10027)
@@ -0,0 +1,136 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.test;
+
+import org.jboss.portal.portlet.container.PortletApplicationContext;
+import org.jboss.portal.portlet.container.PortletApplication;
+import org.jboss.portal.portlet.container.managed.ManagedPortletApplication;
+import org.jboss.portal.portlet.container.managed.ManagedPortletContainer;
+import org.jboss.portal.web.WebApp;
+import org.jboss.portal.common.NotYetImplemented;
+
+import javax.servlet.ServletContext;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class KernelPortletApplication implements PortletApplicationContext,
ManagedPortletApplication
+{
+
+ /** . */
+ private final WebApp webApp;
+
+ /** . */
+ private PortletApplication portletApplication;
+
+ /** . */
+ private final Map<String, KernelPortletContainer> kernelPortletContainers;
+
+ public KernelPortletApplication(WebApp webApp)
+ {
+ this.webApp = webApp;
+ this.portletApplication = null;
+ this.kernelPortletContainers = new HashMap<String,
KernelPortletContainer>();
+ }
+
+ public void addKernelPortletContainer(KernelPortletContainer kernelPortletContainer)
+ {
+ kernelPortletContainers.put(kernelPortletContainer.getPortletContainer().getId(),
kernelPortletContainer);
+ }
+
+ public void removeKernelPortletContainer(KernelPortletContainer
kernelPortletContainer)
+ {
+
kernelPortletContainers.remove(kernelPortletContainer.getPortletContainer().getId());
+ }
+
+ public PortletApplication getPortletApplication()
+ {
+ return portletApplication;
+ }
+
+ public void setPortletApplication(PortletApplication portletApplication)
+ {
+ this.portletApplication = portletApplication;
+ }
+
+ public void start() throws Exception
+ {
+ }
+
+ public void stop()
+ {
+ }
+
+ // PortletApplicationContext
****************************************************************************************
+
+ public ServletContext getServletContext()
+ {
+ return webApp.getServletContext();
+ }
+
+ public String getContextPath()
+ {
+ return webApp.getContextPath();
+ }
+
+ public ClassLoader getClassLoader()
+ {
+ return webApp.getClassLoader();
+ }
+
+ public void invokeStart() throws Exception
+ {
+ throw new NotYetImplemented();
+ }
+
+ public void invokeStop()
+ {
+ throw new NotYetImplemented();
+ }
+
+ //
+
+ public String getId()
+ {
+ return portletApplication.getId();
+ }
+
+ public void managedStart() throws Exception
+ {
+ throw new NotYetImplemented();
+ }
+
+ public void managedStop()
+ {
+ throw new NotYetImplemented();
+ }
+
+ public Collection<? extends ManagedPortletContainer>
getManagedPortletContainers()
+ {
+ return kernelPortletContainers.values();
+ }
+}
Copied:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/KernelPortletContainer.java
(from rev 10026,
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/ManagedPortletContainer.java)
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/KernelPortletContainer.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/KernelPortletContainer.java 2008-02-19
12:08:48 UTC (rev 10027)
@@ -0,0 +1,111 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.test;
+
+import org.jboss.portal.portlet.container.PortletContainerContext;
+import org.jboss.portal.portlet.container.PortletContainer;
+import org.jboss.portal.portlet.container.managed.ManagedPortletContainer;
+import org.jboss.portal.portlet.container.managed.ManagedPortletApplication;
+import org.jboss.portal.portlet.info.PortletInfo;
+import org.jboss.portal.common.NotYetImplemented;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class KernelPortletContainer implements PortletContainerContext,
ManagedPortletContainer
+{
+
+ /** . */
+ private PortletContainer portletContainer;
+
+ /** . */
+ private KernelPortletApplication kernelPortletApplication;
+
+ public KernelPortletApplication getKernelPortletApplication()
+ {
+ return kernelPortletApplication;
+ }
+
+ public void setKernelPortletApplication(KernelPortletApplication
kernelPortletApplication)
+ {
+ this.kernelPortletApplication = kernelPortletApplication;
+ }
+
+ public PortletContainer getPortletContainer()
+ {
+ return portletContainer;
+ }
+
+ public void setPortletContainer(PortletContainer portletContainer)
+ {
+ this.portletContainer = portletContainer;
+ }
+
+ public void start() throws Exception
+ {
+ }
+
+ public void stop()
+ {
+ }
+
+ //
+
+ public void invokeStart() throws Exception
+ {
+ throw new NotYetImplemented();
+ }
+
+ public void invokeStop()
+ {
+ throw new NotYetImplemented();
+ }
+
+ //
+
+ public String getId()
+ {
+ return portletContainer.getId();
+ }
+
+ public ManagedPortletApplication getManagedPortletApplication()
+ {
+ return kernelPortletApplication;
+ }
+
+ public PortletInfo getPortletInfo()
+ {
+ return portletContainer.getInfo();
+ }
+
+ public void managedStart() throws Exception
+ {
+ throw new NotYetImplemented();
+ }
+
+ public void managedStop()
+ {
+ throw new NotYetImplemented();
+ }
+}
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployer.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployer.java 2008-02-19
11:39:23 UTC (rev 10026)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployer.java 2008-02-19
12:08:48 UTC (rev 10027)
@@ -28,8 +28,8 @@
import org.jboss.kernel.spi.dependency.KernelControllerContextAware;
import org.jboss.portal.common.io.IOTools;
import org.jboss.portal.portlet.container.PortletApplication;
-import org.jboss.portal.portlet.container.PortletApplicationRegistrationContext;
-import org.jboss.portal.portlet.container.PortletApplicationRegistry;
+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.metadata.PortletApplication10MetaData;
import static
org.jboss.portal.portlet.impl.metadata.PortletMetaDataConstants.PORTLET_JSR_168_NS;
@@ -100,8 +100,8 @@
private ClassLoader classLoader;
/** . */
- private final Map<ManagedPortletApplication,
PortletApplicationRegistrationContext> registrationContextMap =
- new HashMap<ManagedPortletApplication,
PortletApplicationRegistrationContext>();
+ private final Map<KernelPortletApplication,
PortletApplicationRegistrationContext> registrationContextMap =
+ new HashMap<KernelPortletApplication,
PortletApplicationRegistrationContext>();
public PortletApplicationRegistry getRegistry()
{
@@ -270,35 +270,35 @@
}
/** Called by MC to install application. */
- public void addManagedPortletApplication(ManagedPortletApplication
managedPortletApplication)
+ public void addManagedPortletApplication(KernelPortletApplication
kernelPortletApplication)
{
- PortletApplication portletApplication =
managedPortletApplication.getPortletApplication();
+ PortletApplication portletApplication =
kernelPortletApplication.getPortletApplication();
PortletApplicationRegistrationContext context =
registry.registerPortletApplication(portletApplication);
- registrationContextMap.put(managedPortletApplication, context);
+ registrationContextMap.put(kernelPortletApplication, context);
}
/** Called by MC to install container. */
- public void addManagedPortletContainer(ManagedPortletContainer
managedPortletContainer)
+ public void addManagedPortletContainer(KernelPortletContainer kernelPortletContainer)
{
- ManagedPortletApplication managedPortletApplication =
managedPortletContainer.getManagedPortletApplication();
- PortletApplicationRegistrationContext context =
registrationContextMap.get(managedPortletApplication);
- PortletContainer portletContainer = managedPortletContainer.getPortletContainer();
+ KernelPortletApplication kernelPortletApplication =
kernelPortletContainer.getKernelPortletApplication();
+ PortletApplicationRegistrationContext context =
registrationContextMap.get(kernelPortletApplication);
+ PortletContainer portletContainer = kernelPortletContainer.getPortletContainer();
context.registerPortlet(portletContainer);
}
/** Called by MC to uninstall application. */
- public void removeManagedPortletApplication(ManagedPortletApplication
managedPortletApplication)
+ public void removeManagedPortletApplication(KernelPortletApplication
kernelPortletApplication)
{
- PortletApplication portletApplication =
managedPortletApplication.getPortletApplication();
+ PortletApplication portletApplication =
kernelPortletApplication.getPortletApplication();
registry.unregisterPortletApplication(portletApplication);
}
/** Called by MC to uninstall container. */
- public void removeManagedPortletContainer(ManagedPortletContainer
managedPortletContainer)
+ public void removeManagedPortletContainer(KernelPortletContainer
kernelPortletContainer)
{
- ManagedPortletApplication managedPortletApplication =
managedPortletContainer.getManagedPortletApplication();
- PortletApplicationRegistrationContext context =
registrationContextMap.get(managedPortletApplication);
- PortletContainer portletContainer = managedPortletContainer.getPortletContainer();
+ KernelPortletApplication kernelPortletApplication =
kernelPortletContainer.getKernelPortletApplication();
+ PortletApplicationRegistrationContext context =
registrationContextMap.get(kernelPortletApplication);
+ PortletContainer portletContainer = kernelPortletContainer.getPortletContainer();
context.unregisterPortlet(portletContainer);
}
}
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployment.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployment.java 2008-02-19
11:39:23 UTC (rev 10026)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployment.java 2008-02-19
12:08:48 UTC (rev 10027)
@@ -88,9 +88,9 @@
this.installed = new LinkedHashMap<String, KernelControllerContext>();
}
- public AbstractBeanMetaData createManagedPortletContainerMetaData(String
managedPortletContainerId)
+ public AbstractBeanMetaData createKernelPortletContainerMetaData(String
kernelPortletContainerId)
{
- AbstractBeanMetaData beanMD = new AbstractBeanMetaData(managedPortletContainerId,
ManagedPortletContainer.class.getName());
+ AbstractBeanMetaData beanMD = new AbstractBeanMetaData(kernelPortletContainerId,
KernelPortletContainer.class.getName());
//
AbstractConstructorMetaData ctorMD = new AbstractConstructorMetaData();
@@ -110,9 +110,9 @@
return beanMD;
}
- public AbstractBeanMetaData createManagedPortletApplicationMetaData(String
managedPortletApplicationId)
+ public AbstractBeanMetaData createKernelPortletApplicationMetaData(String
kernelPortletApplicationId)
{
- AbstractBeanMetaData beanMD = new AbstractBeanMetaData(managedPortletApplicationId,
ManagedPortletApplication.class.getName());
+ AbstractBeanMetaData beanMD = new AbstractBeanMetaData(kernelPortletApplicationId,
KernelPortletApplication.class.getName());
//
AbstractConstructorMetaData ctorMD = new AbstractConstructorMetaData();
@@ -192,7 +192,7 @@
String portletApplicationId = "PortletApplication[" +
webApp.getContextPath() + "]";
//
- String managedPortletApplicationId = "ManagedPortletApplication[" +
webApp.getContextPath() + "]";
+ String kernelPortletApplicationId = "KernelPortletApplication[" +
webApp.getContextPath() + "]";
//
ContainerInfoBuilderContext builderContext = new
ContainerInfoBuilderContextImpl(metaData, webApp);
@@ -207,21 +207,21 @@
{
//
String portletContainerId = "PortletContainer[" +
webApp.getContextPath() + "," + containerInfo.getName() + "]";
- String managedPortletContainerId = "ManagedPortletContainer[" +
webApp.getContextPath() + "," + containerInfo.getName() + "]";
+ String kernelPortletContainerId = "KernelPortletContainer[" +
webApp.getContextPath() + "," + containerInfo.getName() + "]";
//
AbstractBeanMetaData portletContainerMD =
createPortletContainerMetaData(portletContainerId, containerInfo);
- AbstractBeanMetaData managedPortletContainerMD =
createManagedPortletContainerMetaData(managedPortletContainerId);
+ AbstractBeanMetaData kernelPortletContainerMD =
createKernelPortletContainerMetaData(kernelPortletContainerId);
//
- AbstractDependencyValueMetaData portletContainerContextDependencyMD = new
AbstractDependencyValueMetaData(managedPortletContainerId);
+ AbstractDependencyValueMetaData portletContainerContextDependencyMD = new
AbstractDependencyValueMetaData(kernelPortletContainerId);
portletContainerContextDependencyMD.setDependentState(ControllerState.INSTANTIATED);
portletContainerMD.getProperties().add(new
AbstractPropertyMetaData("context", portletContainerContextDependencyMD));
//
AbstractDependencyValueMetaData portletContainerDependencyMD = new
AbstractDependencyValueMetaData(portletContainerId);
portletContainerDependencyMD.setDependentState(ControllerState.START);
- managedPortletContainerMD.getProperties().add(new
AbstractPropertyMetaData("portletContainer", portletContainerDependencyMD));
+ kernelPortletContainerMD.getProperties().add(new
AbstractPropertyMetaData("portletContainer", portletContainerDependencyMD));
//
AbstractDependencyValueMetaData portletApplicationDependencyMD = new
AbstractDependencyValueMetaData(portletApplicationId);
@@ -242,51 +242,51 @@
uninstallPortletContainerMD.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
uninstallPortletContainerMD.setMethodName("removeContainer");
uninstallPortletContainerMD.setDependentState(ControllerState.START);
- managedPortletContainerMD.getUninstalls().add(uninstallPortletContainerMD);
+ kernelPortletContainerMD.getUninstalls().add(uninstallPortletContainerMD);
- // Inject the managed portlet application in the managed portlet container
- AbstractDependencyValueMetaData managedPortletApplicationDependencyMD = new
AbstractDependencyValueMetaData(managedPortletApplicationId);
- managedPortletApplicationDependencyMD.setDependentState(ControllerState.START);
- managedPortletContainerMD.getProperties().add(new
AbstractPropertyMetaData("managedPortletApplication",
managedPortletApplicationDependencyMD));
+ // Inject the kernel portlet application in the kernel portlet container
+ AbstractDependencyValueMetaData kernelPortletApplicationDependencyMD = new
AbstractDependencyValueMetaData(kernelPortletApplicationId);
+ kernelPortletApplicationDependencyMD.setDependentState(ControllerState.START);
+ kernelPortletContainerMD.getProperties().add(new
AbstractPropertyMetaData("kernelPortletApplication",
kernelPortletApplicationDependencyMD));
- // Install the managed portlet container on the managed portlet application
- AbstractInstallMetaData installManagedPortletContainerMD = new
AbstractInstallMetaData();
- installManagedPortletContainerMD.setBean(managedPortletApplicationId);
-
installManagedPortletContainerMD.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
-
installManagedPortletContainerMD.setMethodName("addManagedPortletContainer");
- installManagedPortletContainerMD.setDependentState(ControllerState.START);
- managedPortletContainerMD.getInstalls().add(installManagedPortletContainerMD);
+ // Install the kernel portlet container on the kernel portlet application
+ AbstractInstallMetaData installKernelPortletContainerMD = new
AbstractInstallMetaData();
+ installKernelPortletContainerMD.setBean(kernelPortletApplicationId);
+
installKernelPortletContainerMD.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
+
installKernelPortletContainerMD.setMethodName("addKernelPortletContainer");
+ installKernelPortletContainerMD.setDependentState(ControllerState.START);
+ kernelPortletContainerMD.getInstalls().add(installKernelPortletContainerMD);
- // Uninstall the managed portlet container from the managed portlet application
- AbstractInstallMetaData uninstallManagedPortletContainerMD = new
AbstractInstallMetaData();
- uninstallManagedPortletContainerMD.setBean(managedPortletApplicationId);
-
uninstallManagedPortletContainerMD.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
-
uninstallManagedPortletContainerMD.setMethodName("removeManagedPortletContainer");
- uninstallManagedPortletContainerMD.setDependentState(ControllerState.START);
-
managedPortletContainerMD.getUninstalls().add(uninstallManagedPortletContainerMD);
+ // Uninstall the kernel portlet container from the kernel portlet application
+ AbstractInstallMetaData uninstallKernelPortletContainerMD = new
AbstractInstallMetaData();
+ uninstallKernelPortletContainerMD.setBean(kernelPortletApplicationId);
+
uninstallKernelPortletContainerMD.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
+
uninstallKernelPortletContainerMD.setMethodName("removeKernelPortletContainer");
+ uninstallKernelPortletContainerMD.setDependentState(ControllerState.START);
+
kernelPortletContainerMD.getUninstalls().add(uninstallKernelPortletContainerMD);
//
toInstall.add(portletContainerMD);
- toInstall.add(managedPortletContainerMD);
+ toInstall.add(kernelPortletContainerMD);
}
//
AbstractBeanMetaData portletApplicationMD =
createPortletApplicationMetaData(builder.getApplication(), portletApplicationId);
- AbstractBeanMetaData managedPortletApplicationMD =
createManagedPortletApplicationMetaData(managedPortletApplicationId);
+ AbstractBeanMetaData kernelPortletApplicationMD =
createKernelPortletApplicationMetaData(kernelPortletApplicationId);
//
- AbstractDependencyValueMetaData portletApplicationContextDependencyMD = new
AbstractDependencyValueMetaData(managedPortletApplicationId);
+ AbstractDependencyValueMetaData portletApplicationContextDependencyMD = new
AbstractDependencyValueMetaData(kernelPortletApplicationId);
portletApplicationContextDependencyMD.setDependentState(ControllerState.INSTANTIATED);
portletApplicationMD.getProperties().add(new
AbstractPropertyMetaData("context", portletApplicationContextDependencyMD));
//
AbstractDependencyValueMetaData portletApplicationDependencyMD = new
AbstractDependencyValueMetaData(portletApplicationId);
portletApplicationDependencyMD.setDependentState(ControllerState.START);
- managedPortletApplicationMD.getProperties().add(new
AbstractPropertyMetaData("portletApplication",
portletApplicationDependencyMD));
+ kernelPortletApplicationMD.getProperties().add(new
AbstractPropertyMetaData("portletApplication",
portletApplicationDependencyMD));
//
toInstall.add(portletApplicationMD);
- toInstall.add(managedPortletApplicationMD);
+ toInstall.add(kernelPortletApplicationMD);
// Install beans
for (AbstractBeanMetaData beanMetaData : toInstall)