[jboss-cvs] JBossAS SVN: r94453 - projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 7 05:47:31 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-10-07 05:47:31 -0400 (Wed, 07 Oct 2009)
New Revision: 94453
Added:
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/WebAppCapability.java
Modified:
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/Capability.java
Log:
Add WebAppCapability
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/Capability.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/Capability.java 2009-10-07 08:41:49 UTC (rev 94452)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/Capability.java 2009-10-07 09:47:31 UTC (rev 94453)
@@ -55,6 +55,11 @@
*
* If the service name is already registered with the {@link OSGiRuntime} adding this capability
* does nothing.
+ *
+ * If the service name is null the capability will install each associated bundle unless a bundle with the
+ * same symbolic name is already installed.
+ *
+ * @param serviceName The service that would be registered by this capability.
*/
public Capability(String serviceName)
{
Added: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/WebAppCapability.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/WebAppCapability.java (rev 0)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/WebAppCapability.java 2009-10-07 09:47:31 UTC (rev 94453)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.osgi.spi.capability;
+
+//$Id: $
+
+import org.jboss.osgi.spi.testing.OSGiRuntime;
+
+/**
+ * Adds the WebApp (WAR) capability to the {@link OSGiRuntime}
+ * under test.
+ *
+ * Dependent Capability: {@link HttpServiceCapability}
+ * Installed bundles: pax-web-extender-war.jar
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 07-Oct-2009
+ */
+public class WebAppCapability extends Capability
+{
+ public WebAppCapability()
+ {
+ super(null);
+
+ addDependency(new HttpServiceCapability());
+
+ addBundle("bundles/pax-web-extender-war.jar");
+ }
+}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list