[jboss-osgi-commits] JBoss-OSGI SVN: r89657 - in projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer: audit and 5 other directories.

jboss-osgi-commits at lists.jboss.org jboss-osgi-commits at lists.jboss.org
Tue Jun 2 06:03:02 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-06-02 06:03:01 -0400 (Tue, 02 Jun 2009)
New Revision: 89657

Added:
   projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/creditcard/CreditCardServiceActivator.java
   projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/paypal/PayPalServiceActivator.java
   projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/pets/PetStoreActivator.java
   projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/sports/ClimbingStoreActivator.java
Removed:
   projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/creditcard/ServiceActivator.java
   projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/paypal/ServiceActivator.java
   projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/pets/ServiceActivator.java
   projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/sports/ServiceActivator.java
Modified:
   projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/PaymentService.java
   projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/Product.java
   projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/ShoppingMall.java
   projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/audit/AuditServiceMBean.java
   projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/frontend/RequestHandler.java
   projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/creditcard/CreditCardService.java
   projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/paypal/PayPalService.java
   projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/pets/PetStore.java
   projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/sports/ClimbingStore.java
Log:
Add javadoc

Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/PaymentService.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/PaymentService.java	2009-06-02 09:45:09 UTC (rev 89656)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/PaymentService.java	2009-06-02 10:03:01 UTC (rev 89657)
@@ -3,12 +3,23 @@
 import java.util.Collection;
 
 /**
- * [TODO]
+ * A payment service used by the various {@link Shop}s.
+ *  
+ * A shop can define specific requirements on a payment service
+ * i.e. must support VISA
  * 
  * @author thomas.diesler at jboss.com
  * @since 10-May-2009
  */
 public interface PaymentService
 {
+   /**
+    * The type of the payment service. (type=[credit|paypal])
+    */
+   String SERVICE_PROPERTY_TYPE = "type";
+   
+   /**
+    * Returns the list of supported payment types
+    */
    Collection<String> listPaymentTypes();
 }
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/Product.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/Product.java	2009-06-02 09:45:09 UTC (rev 89656)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/Product.java	2009-06-02 10:03:01 UTC (rev 89657)
@@ -21,14 +21,12 @@
  */
 package org.jboss.test.osgi.trailblazer;
 
-import java.io.Serializable;
-
-
 //$Id$
 
+import java.io.Serializable;
 
 /**
- * [TODO]
+ * A product sold by the various {@link Shop}s. 
  * 
  * @author thomas.diesler at jboss.com
  * @since 10-May-2009

Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/ShoppingMall.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/ShoppingMall.java	2009-06-02 09:45:09 UTC (rev 89656)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/ShoppingMall.java	2009-06-02 10:03:01 UTC (rev 89657)
@@ -1,10 +1,11 @@
 package org.jboss.test.osgi.trailblazer;
 
+// $Id$
+
 import java.util.Collection;
 
-
 /**
- * [TODO]
+ * the trailblazer shopping mall.
  * 
  * @author thomas.diesler at jboss.com
  * @since 10-May-2009

Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/audit/AuditServiceMBean.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/audit/AuditServiceMBean.java	2009-06-02 09:45:09 UTC (rev 89656)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/audit/AuditServiceMBean.java	2009-06-02 10:03:01 UTC (rev 89657)
@@ -1,9 +1,32 @@
+/*
+ * 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.test.osgi.trailblazer.audit;
 
+//$Id$
 
+import org.jboss.test.osgi.trailblazer.AuditService;
 
 /**
- * [TODO]
+ * The management interface for the {@link AuditService}.
  * 
  * @author thomas.diesler at jboss.com
  * @since 10-May-2009

Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/frontend/RequestHandler.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/frontend/RequestHandler.java	2009-06-02 09:45:09 UTC (rev 89656)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/frontend/RequestHandler.java	2009-06-02 10:03:01 UTC (rev 89657)
@@ -37,7 +37,7 @@
 import org.jboss.test.osgi.trailblazer.ShoppingMall;
 
 /**
- * [TODO]
+ * An HTML request handler.
  * 
  * @author thomas.diesler at jboss.com
  * @since 10-May-2009

Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/creditcard/CreditCardService.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/creditcard/CreditCardService.java	2009-06-02 09:45:09 UTC (rev 89656)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/creditcard/CreditCardService.java	2009-06-02 10:03:01 UTC (rev 89657)
@@ -7,7 +7,7 @@
 
 
 /**
- * [TODO]
+ * A {@link PaymentService} that supports credit cards.
  * 
  * @author thomas.diesler at jboss.com
  * @since 10-May-2009

Copied: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/creditcard/CreditCardServiceActivator.java (from rev 89649, projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/creditcard/ServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/creditcard/CreditCardServiceActivator.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/creditcard/CreditCardServiceActivator.java	2009-06-02 10:03:01 UTC (rev 89657)
@@ -0,0 +1,69 @@
+/*
+ * 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.test.osgi.trailblazer.pay.creditcard;
+
+//$Id$
+
+import static org.jboss.test.osgi.trailblazer.PaymentService.SERVICE_PROPERTY_TYPE;
+
+import java.util.Hashtable;
+
+import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.test.osgi.trailblazer.PaymentService;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.log.LogService;
+
+/**
+ * The activator for the {@link CreditCardService}
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 10-May-2009
+ */
+public class CreditCardServiceActivator implements BundleActivator
+{
+   private LogService log;
+   private ServiceRegistration serviceReg;
+   
+   @SuppressWarnings("unchecked")
+   public void start(BundleContext context)
+   {
+      this.log = new LogServiceTracker(context);
+      
+      Hashtable props = new Hashtable();
+      props.put(SERVICE_PROPERTY_TYPE, "credit");
+      
+      serviceReg = context.registerService(PaymentService.class.getName(), new CreditCardService(), props);
+      log.log(LogService.LOG_INFO, "Register the CreditCardService");
+   }
+
+   public void stop(BundleContext context)
+   {
+      if (serviceReg != null)
+      {
+         log.log(LogService.LOG_INFO, "Unregister the CreditCardService");
+         serviceReg.unregister();
+         serviceReg = null;
+      }
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/creditcard/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/creditcard/ServiceActivator.java	2009-06-02 09:45:09 UTC (rev 89656)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/creditcard/ServiceActivator.java	2009-06-02 10:03:01 UTC (rev 89657)
@@ -1,68 +0,0 @@
-/*
- * 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.test.osgi.trailblazer.pay.creditcard;
-
-//$Id$
-
-import java.util.Hashtable;
-
-import org.jboss.osgi.common.log.LogServiceTracker;
-import org.jboss.test.osgi.trailblazer.PaymentService;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.service.log.LogService;
-
-
-/**
- * [TODO]
- * 
- * @author thomas.diesler at jboss.com
- * @since 10-May-2009
- */
-public class ServiceActivator implements BundleActivator
-{
-   private LogService log;
-   private ServiceRegistration serviceReg;
-   
-   @SuppressWarnings("unchecked")
-   public void start(BundleContext context)
-   {
-      this.log = new LogServiceTracker(context);
-      
-      Hashtable props = new Hashtable();
-      props.put("type", "credit");
-      
-      serviceReg = context.registerService(PaymentService.class.getName(), new CreditCardService(), props);
-      log.log(LogService.LOG_INFO, "Register the CreditCardService");
-   }
-
-   public void stop(BundleContext context)
-   {
-      if (serviceReg != null)
-      {
-         log.log(LogService.LOG_INFO, "Unregister the CreditCardService");
-         serviceReg.unregister();
-         serviceReg = null;
-      }
-   }
-}
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/paypal/PayPalService.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/paypal/PayPalService.java	2009-06-02 09:45:09 UTC (rev 89656)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/paypal/PayPalService.java	2009-06-02 10:03:01 UTC (rev 89657)
@@ -1,13 +1,35 @@
+/*
+ * 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.test.osgi.trailblazer.pay.paypal;
 
+// $Id$
+
 import java.util.ArrayList;
 import java.util.Collection;
 
 import org.jboss.test.osgi.trailblazer.PaymentService;
 
-
 /**
- * [TODO]
+ * A {@link PaymentService} that supports paypal.
  * 
  * @author thomas.diesler at jboss.com
  * @since 10-May-2009

Copied: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/paypal/PayPalServiceActivator.java (from rev 89649, projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/paypal/ServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/paypal/PayPalServiceActivator.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/paypal/PayPalServiceActivator.java	2009-06-02 10:03:01 UTC (rev 89657)
@@ -0,0 +1,69 @@
+/*
+ * 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.test.osgi.trailblazer.pay.paypal;
+
+//$Id$
+
+import static org.jboss.test.osgi.trailblazer.PaymentService.SERVICE_PROPERTY_TYPE;
+
+import java.util.Hashtable;
+
+import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.test.osgi.trailblazer.PaymentService;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.log.LogService;
+
+/**
+ * The activator for the {@link PayPalService}
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 10-May-2009
+ */
+public class PayPalServiceActivator implements BundleActivator
+{
+   private LogService log;
+   private ServiceRegistration serviceReg;
+   
+   @SuppressWarnings("unchecked")
+   public void start(BundleContext context)
+   {
+      this.log = new LogServiceTracker(context);
+      
+      Hashtable props = new Hashtable();
+      props.put(SERVICE_PROPERTY_TYPE, "paypal");
+      
+      serviceReg = context.registerService(PaymentService.class.getName(), new PayPalService(), props);
+      log.log(LogService.LOG_INFO, "Register the PayPalService");
+   }
+
+   public void stop(BundleContext context)
+   {
+      if (serviceReg != null)
+      {
+         log.log(LogService.LOG_INFO, "Unregister the PayPalService");
+         serviceReg.unregister();
+         serviceReg = null;
+      }
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/paypal/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/paypal/ServiceActivator.java	2009-06-02 09:45:09 UTC (rev 89656)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/paypal/ServiceActivator.java	2009-06-02 10:03:01 UTC (rev 89657)
@@ -1,68 +0,0 @@
-/*
- * 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.test.osgi.trailblazer.pay.paypal;
-
-//$Id$
-
-import java.util.Hashtable;
-
-import org.jboss.osgi.common.log.LogServiceTracker;
-import org.jboss.test.osgi.trailblazer.PaymentService;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.service.log.LogService;
-
-
-/**
- * [TODO]
- * 
- * @author thomas.diesler at jboss.com
- * @since 10-May-2009
- */
-public class ServiceActivator implements BundleActivator
-{
-   private LogService log;
-   private ServiceRegistration serviceReg;
-   
-   @SuppressWarnings("unchecked")
-   public void start(BundleContext context)
-   {
-      this.log = new LogServiceTracker(context);
-      
-      Hashtable props = new Hashtable();
-      props.put("type", "paypal");
-      
-      serviceReg = context.registerService(PaymentService.class.getName(), new PayPalService(), props);
-      log.log(LogService.LOG_INFO, "Register the PayPalService");
-   }
-
-   public void stop(BundleContext context)
-   {
-      if (serviceReg != null)
-      {
-         log.log(LogService.LOG_INFO, "Unregister the PayPalService");
-         serviceReg.unregister();
-         serviceReg = null;
-      }
-   }
-}
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/pets/PetStore.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/pets/PetStore.java	2009-06-02 09:45:09 UTC (rev 89656)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/pets/PetStore.java	2009-06-02 10:03:01 UTC (rev 89657)
@@ -36,7 +36,7 @@
 import org.osgi.framework.ServiceReference;
 
 /**
- * [TODO]
+ * The pet store requires a {@link PaymentService} that supports PayPal.
  * 
  * @author thomas.diesler at jboss.com
  * @since 10-May-2009

Copied: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/pets/PetStoreActivator.java (from rev 89649, projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/pets/ServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/pets/PetStoreActivator.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/pets/PetStoreActivator.java	2009-06-02 10:03:01 UTC (rev 89657)
@@ -0,0 +1,54 @@
+/*
+ * 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.test.osgi.trailblazer.shop.pets;
+
+//$Id$
+
+import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.test.osgi.trailblazer.Shop;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.log.LogService;
+
+
+/**
+ * Activates the {@link PetStore}.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 10-May-2009
+ */
+public class PetStoreActivator implements BundleActivator
+{
+   private LogService log;
+   
+   public void start(BundleContext context)
+   {
+      this.log = new LogServiceTracker(context);
+      
+      log.log(LogService.LOG_INFO, "Register the PetStore");
+      context.registerService(Shop.class.getName(), new PetStore(context), null);
+   }
+
+   public void stop(BundleContext context)
+   {
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/pets/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/pets/ServiceActivator.java	2009-06-02 09:45:09 UTC (rev 89656)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/pets/ServiceActivator.java	2009-06-02 10:03:01 UTC (rev 89657)
@@ -1,62 +0,0 @@
-/*
- * 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.test.osgi.trailblazer.shop.pets;
-
-//$Id$
-
-import org.jboss.osgi.common.log.LogServiceTracker;
-import org.jboss.test.osgi.trailblazer.Shop;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.service.log.LogService;
-
-
-/**
- * [TODO]
- * 
- * @author thomas.diesler at jboss.com
- * @since 10-May-2009
- */
-public class ServiceActivator implements BundleActivator
-{
-   private LogService log;
-   private ServiceRegistration serviceReg;
-   
-   public void start(BundleContext context)
-   {
-      this.log = new LogServiceTracker(context);
-      
-      log.log(LogService.LOG_INFO, "Register the PetStore");
-      serviceReg = context.registerService(Shop.class.getName(), new PetStore(context), null);
-   }
-
-   public void stop(BundleContext context)
-   {
-      if (serviceReg != null)
-      {
-         log.log(LogService.LOG_INFO, "Unregister the PetStore");
-         serviceReg.unregister();
-         serviceReg = null;
-      }
-   }
-}
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/sports/ClimbingStore.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/sports/ClimbingStore.java	2009-06-02 09:45:09 UTC (rev 89656)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/sports/ClimbingStore.java	2009-06-02 10:03:01 UTC (rev 89657)
@@ -40,8 +40,10 @@
 import org.osgi.framework.ServiceReference;
 
 /**
- * this climbing store uses JNDI to bind product information.
+ * The climbing store uses JNDI to bind product information.
  * 
+ * It requires a {@link PaymentService} that supports credit cards.
+ * 
  * @author thomas.diesler at jboss.com
  * @since 10-May-2009
  */

Copied: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/sports/ClimbingStoreActivator.java (from rev 89649, projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/sports/ServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/sports/ClimbingStoreActivator.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/sports/ClimbingStoreActivator.java	2009-06-02 10:03:01 UTC (rev 89657)
@@ -0,0 +1,54 @@
+/*
+ * 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.test.osgi.trailblazer.shop.sports;
+
+//$Id$
+
+import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.test.osgi.trailblazer.Shop;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.log.LogService;
+
+
+/**
+ * The {@link ClimbingStore} bundle activator.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 10-May-2009
+ */
+public class ClimbingStoreActivator implements BundleActivator
+{
+   private LogService log;
+   
+   public void start(BundleContext context)
+   {
+      this.log = new LogServiceTracker(context);
+      
+      log.log(LogService.LOG_INFO, "Register the ClimbingStore");
+      context.registerService(Shop.class.getName(), new ClimbingStore(context), null);
+   }
+
+   public void stop(BundleContext context)
+   {
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/sports/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/sports/ServiceActivator.java	2009-06-02 09:45:09 UTC (rev 89656)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/sports/ServiceActivator.java	2009-06-02 10:03:01 UTC (rev 89657)
@@ -1,62 +0,0 @@
-/*
- * 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.test.osgi.trailblazer.shop.sports;
-
-//$Id$
-
-import org.jboss.osgi.common.log.LogServiceTracker;
-import org.jboss.test.osgi.trailblazer.Shop;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.service.log.LogService;
-
-
-/**
- * [TODO]
- * 
- * @author thomas.diesler at jboss.com
- * @since 10-May-2009
- */
-public class ServiceActivator implements BundleActivator
-{
-   private LogService log;
-   private ServiceRegistration serviceReg;
-   
-   public void start(BundleContext context)
-   {
-      this.log = new LogServiceTracker(context);
-      
-      log.log(LogService.LOG_INFO, "Register the ClimbingStore");
-      serviceReg = context.registerService(Shop.class.getName(), new ClimbingStore(context), null);
-   }
-
-   public void stop(BundleContext context)
-   {
-      if (serviceReg != null)
-      {
-         log.log(LogService.LOG_INFO, "Unregister the ClimbingStore");
-         serviceReg.unregister();
-         serviceReg = null;
-      }
-   }
-}
\ No newline at end of file




More information about the jboss-osgi-commits mailing list