Author: ivol37 at gmail.com
Date: Fri Jan 21 11:15:57 2011
New Revision: 680

Log:
[AMDATU-135] Moved example gadgets to example bundles

Added:
   trunk/amdatu-example/gadgetrepository/
   trunk/amdatu-example/gadgetrepository/pom.xml
   trunk/amdatu-example/gadgetrepository/src/
   trunk/amdatu-example/gadgetrepository/src/main/
   trunk/amdatu-example/gadgetrepository/src/main/java/
   trunk/amdatu-example/gadgetrepository/src/main/java/org/
   trunk/amdatu-example/gadgetrepository/src/main/java/org/amdatu/
   trunk/amdatu-example/gadgetrepository/src/main/java/org/amdatu/example/
   
trunk/amdatu-example/gadgetrepository/src/main/java/org/amdatu/example/gadgetrepository/
   
trunk/amdatu-example/gadgetrepository/src/main/java/org/amdatu/example/gadgetrepository/ExampleGadgetRepositoryService.java
   
trunk/amdatu-example/gadgetrepository/src/main/java/org/amdatu/example/gadgetrepository/osgi/
   
trunk/amdatu-example/gadgetrepository/src/main/java/org/amdatu/example/gadgetrepository/osgi/Activator.java
   
trunk/amdatu-example/gadgetrepository/src/main/java/org/amdatu/example/gadgetrepository/service/
   
trunk/amdatu-example/gadgetrepository/src/main/java/org/amdatu/example/gadgetrepository/service/ExampleGadgetRepositoryServiceImpl.java
Removed:
   
trunk/amdatu-opensocial/gadgetmanagement/src/main/java/org/amdatu/opensocial/gadgetmanagement/DefaultGadgetRepository.java
Modified:
   trunk/amdatu-example/course-gadget/pom.xml
   
trunk/amdatu-example/course-gadget/src/main/java/org/amdatu/example/course/gadget/service/CourseGadgetServiceImpl.java
   trunk/amdatu-example/friends-gadget/pom.xml
   
trunk/amdatu-example/friends-gadget/src/main/java/org/amdatu/example/friend/sgadget/service/FriendsGadgetServiceImpl.java
   trunk/amdatu-example/oauth/pom.xml
   
trunk/amdatu-example/oauth/src/main/java/org/amdatu/example/oauth/service/OAuthGadgetsRegistrationServiceImpl.java
   trunk/amdatu-example/pom.xml
   
trunk/amdatu-opensocial/gadgetmanagement/src/main/java/org/amdatu/opensocial/gadgetmanagement/service/GadgetManagementServiceImpl.java
   
trunk/amdatu-opensocial/shindig/src/main/java/org/amdatu/opensocial/shindig/GadgetCategory.java

Modified: trunk/amdatu-example/course-gadget/pom.xml
==============================================================================
--- trunk/amdatu-example/course-gadget/pom.xml  (original)
+++ trunk/amdatu-example/course-gadget/pom.xml  Fri Jan 21 11:15:57 2011
@@ -12,10 +12,10 @@
   <packaging>bundle</packaging>
   <name>Amdatu Example - Course gadget</name>
   <description>This gadget provides an example gadget to display courses 
relevant for a particular student</description>
-  <dependencies>  
-    <dependency>    
+  <dependencies>
+    <dependency>
       <groupId>org.amdatu.opensocial</groupId>
-      <artifactId>gadgetmanagement</artifactId>   
+      <artifactId>gadgetmanagement</artifactId>
       <scope>provided</scope>
       <type>bundle</type>
     </dependency>
@@ -25,15 +25,22 @@
       <scope>provided</scope>
       <type>bundle</type>
     </dependency>
-    <dependency>    
+    <dependency>
       <groupId>org.amdatu.authentication.oauth</groupId>
-      <artifactId>api</artifactId>   
+      <artifactId>api</artifactId>
+      <version>${platform.version}</version>
+      <scope>provided</scope>
+      <type>bundle</type>
+    </dependency>
+    <dependency>
+      <groupId>org.amdatu.example</groupId>
+      <artifactId>gadgetrepository</artifactId>
       <version>${platform.version}</version>
       <scope>provided</scope>
       <type>bundle</type>
-    </dependency> 
-  </dependencies> 
-  
+    </dependency>
+  </dependencies>
+
   <build>
     <plugins>
       <plugin>
@@ -46,9 +53,9 @@
           </instructions>
         </configuration>
       </plugin>
-      
+
     </plugins>
-    
+
     <resources>
       <resource>
         <directory>src/main/resources</directory>
@@ -65,6 +72,6 @@
         </includes>
       </resource>
     </resources>
-    
-  </build> 
+
+  </build>
 </project>

Modified: 
trunk/amdatu-example/course-gadget/src/main/java/org/amdatu/example/course/gadget/service/CourseGadgetServiceImpl.java
==============================================================================
--- 
trunk/amdatu-example/course-gadget/src/main/java/org/amdatu/example/course/gadget/service/CourseGadgetServiceImpl.java
      (original)
+++ 
trunk/amdatu-example/course-gadget/src/main/java/org/amdatu/example/course/gadget/service/CourseGadgetServiceImpl.java
      Fri Jan 21 11:15:57 2011
@@ -25,8 +25,8 @@
 import org.amdatu.authentication.oauth.api.OAuthServiceConsumer;
 import org.amdatu.authentication.oauth.api.OAuthServiceConsumerRegistry;
 import org.amdatu.example.course.gadget.osgi.Activator;
+import org.amdatu.example.gadgetrepository.ExampleGadgetRepositoryService;
 import org.amdatu.opensocial.gadgetmanagement.GadgetManagement;
-import org.amdatu.opensocial.shindig.GadgetCategory;
 import org.amdatu.opensocial.shindig.GadgetDefinition;
 import org.amdatu.web.httpcontext.HttpContextServiceFactory;
 import org.amdatu.web.httpcontext.ResourceProvider;
@@ -65,7 +65,8 @@
         // Create our own http context and register resources
         m_httpContextComponent = 
m_httpContextFactoryService.create(m_bundleContext, this);
 
-        GadgetDefinition gadgetDef = new GadgetDefinition("/" + 
Activator.RESOURCE_ID + "/jsp/CourseGadget.jsp", 
GadgetCategory.AMDATU_EXAMPLES, false);
+        GadgetDefinition gadgetDef = new GadgetDefinition("/" + 
Activator.RESOURCE_ID + "/jsp/CourseGadget.jsp",
+            ExampleGadgetRepositoryService.AMDATU_EXAMPLE_CATEGORY, false);
 
         // Set oAuth parameters
         gadgetDef.setServiceName(CONSUMER_NAME);

Modified: trunk/amdatu-example/friends-gadget/pom.xml
==============================================================================
--- trunk/amdatu-example/friends-gadget/pom.xml (original)
+++ trunk/amdatu-example/friends-gadget/pom.xml Fri Jan 21 11:15:57 2011
@@ -12,22 +12,29 @@
   <packaging>bundle</packaging>
   <name>Amdatu Example - Friends gadget</name>
   <description>Provides an example gadget to display all friends of the user 
currently logged in</description>
-  
-  <dependencies>  
-    <dependency>    
+
+  <dependencies>
+    <dependency>
       <groupId>org.amdatu.opensocial</groupId>
-      <artifactId>gadgetmanagement</artifactId>   
+      <artifactId>gadgetmanagement</artifactId>
       <scope>provided</scope>
       <type>bundle</type>
-    </dependency> 
+    </dependency>
     <dependency>
       <groupId>org.amdatu.opensocial</groupId>
       <artifactId>shindig</artifactId>
       <scope>provided</scope>
       <type>bundle</type>
-    </dependency>       
-  </dependencies> 
-  
+    </dependency>
+    <dependency>
+      <groupId>org.amdatu.example</groupId>
+      <artifactId>gadgetrepository</artifactId>
+      <version>${platform.version}</version>
+      <scope>provided</scope>
+      <type>bundle</type>
+    </dependency>
+  </dependencies>
+
   <build>
     <plugins>
       <plugin>
@@ -40,9 +47,9 @@
           </instructions>
         </configuration>
       </plugin>
-      
+
     </plugins>
-    
+
     <resources>
       <resource>
         <directory>src/main/resources</directory>
@@ -58,6 +65,6 @@
           <include>conf/*.*</include>
         </includes>
       </resource>
-    </resources>    
-  </build> 
+    </resources>
+  </build>
 </project>

Modified: 
trunk/amdatu-example/friends-gadget/src/main/java/org/amdatu/example/friend/sgadget/service/FriendsGadgetServiceImpl.java
==============================================================================
--- 
trunk/amdatu-example/friends-gadget/src/main/java/org/amdatu/example/friend/sgadget/service/FriendsGadgetServiceImpl.java
   (original)
+++ 
trunk/amdatu-example/friends-gadget/src/main/java/org/amdatu/example/friend/sgadget/service/FriendsGadgetServiceImpl.java
   Fri Jan 21 11:15:57 2011
@@ -21,8 +21,8 @@
 import java.net.URL;
 
 import org.amdatu.example.friends.gadget.osgi.Activator;
+import org.amdatu.example.gadgetrepository.ExampleGadgetRepositoryService;
 import org.amdatu.opensocial.gadgetmanagement.GadgetManagement;
-import org.amdatu.opensocial.shindig.GadgetCategory;
 import org.amdatu.opensocial.shindig.GadgetDefinition;
 import org.amdatu.web.httpcontext.HttpContextServiceFactory;
 import org.amdatu.web.httpcontext.ResourceProvider;
@@ -55,7 +55,7 @@
         m_httpContextComponent = 
m_httpContextFactoryService.create(m_bundleContext, this);
 
         GadgetDefinition gadgetDef = new GadgetDefinition("/" + 
Activator.RESOURCE_ID + "/static/xml/FriendsGadget.xml",
-            GadgetCategory.AMDATU_EXAMPLES, false);
+            ExampleGadgetRepositoryService.AMDATU_EXAMPLE_CATEGORY, false);
         gadgetDef.setServiceName("friends");
         m_gadgetManagement.addGadget(gadgetDef);
 

Added: trunk/amdatu-example/gadgetrepository/pom.xml
==============================================================================
--- (empty file)
+++ trunk/amdatu-example/gadgetrepository/pom.xml       Fri Jan 21 11:15:57 2011
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.amdatu</groupId>
+    <artifactId>org.amdatu.example</artifactId>
+    <version>0.1.0-SNAPSHOT</version>
+  </parent>
+  <groupId>org.amdatu.example</groupId>
+  <artifactId>gadgetrepository</artifactId>
+  <packaging>bundle</packaging>
+  <name>Amdatu Example - Gadget repository</name>
+  <description>Provides an example gadget repository</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.amdatu.opensocial</groupId>
+      <artifactId>gadgetmanagement</artifactId>
+      <scope>provided</scope>
+      <type>bundle</type>
+    </dependency>
+    <dependency>
+      <groupId>org.amdatu.opensocial</groupId>
+      <artifactId>shindig</artifactId>
+      <scope>provided</scope>
+      <type>bundle</type>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            
<Bundle-Activator>org.amdatu.example.gadgetrepository.osgi.Activator</Bundle-Activator>
+            
<Bundle-SymbolicName>org.amdatu.example.gadgetrepository</Bundle-SymbolicName>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Added: 
trunk/amdatu-example/gadgetrepository/src/main/java/org/amdatu/example/gadgetrepository/ExampleGadgetRepositoryService.java
==============================================================================
--- (empty file)
+++ 
trunk/amdatu-example/gadgetrepository/src/main/java/org/amdatu/example/gadgetrepository/ExampleGadgetRepositoryService.java
 Fri Jan 21 11:15:57 2011
@@ -0,0 +1,26 @@
+/*
+    Copyright (C) 2010 Amdatu.org
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program 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 General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.amdatu.example.gadgetrepository;
+
+import org.amdatu.opensocial.shindig.GadgetCategory;
+
+public interface ExampleGadgetRepositoryService {
+    /**
+     * Default category for Amdatu example gadgets.
+     */
+    final static GadgetCategory AMDATU_EXAMPLE_CATEGORY = new 
GadgetCategory("amdatu_examples", "Amdatu Examples");
+}

Added: 
trunk/amdatu-example/gadgetrepository/src/main/java/org/amdatu/example/gadgetrepository/osgi/Activator.java
==============================================================================
--- (empty file)
+++ 
trunk/amdatu-example/gadgetrepository/src/main/java/org/amdatu/example/gadgetrepository/osgi/Activator.java
 Fri Jan 21 11:15:57 2011
@@ -0,0 +1,43 @@
+/*
+    Copyright (C) 2010 Amdatu.org
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program 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 General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.amdatu.example.gadgetrepository.osgi;
+
+import org.amdatu.example.gadgetrepository.ExampleGadgetRepositoryService;
+import 
org.amdatu.example.gadgetrepository.service.ExampleGadgetRepositoryServiceImpl;
+import org.apache.felix.dm.DependencyActivatorBase;
+import org.apache.felix.dm.DependencyManager;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.log.LogService;
+
+/**
+ * This is the activator for the example gadget repository bundle
+ * @author ivol
+ */
+public class Activator extends DependencyActivatorBase {
+    @Override
+    public void init(BundleContext context, DependencyManager manager) throws 
Exception {
+        manager.add(
+            createComponent()
+            .setInterface(ExampleGadgetRepositoryService.class.getName(), null)
+            .setImplementation(ExampleGadgetRepositoryServiceImpl.class)
+            
.add(createServiceDependency().setService(LogService.class).setRequired(true)));
+    }
+
+    @Override
+    public void destroy(BundleContext bundleContext, DependencyManager 
dependencyManager) throws Exception {
+    }
+}

Added: 
trunk/amdatu-example/gadgetrepository/src/main/java/org/amdatu/example/gadgetrepository/service/ExampleGadgetRepositoryServiceImpl.java
==============================================================================
--- (empty file)
+++ 
trunk/amdatu-example/gadgetrepository/src/main/java/org/amdatu/example/gadgetrepository/service/ExampleGadgetRepositoryServiceImpl.java
     Fri Jan 21 11:15:57 2011
@@ -0,0 +1,72 @@
+/*
+    Copyright (C) 2010 Amdatu.org
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program 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 General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.amdatu.example.gadgetrepository.service;
+
+import org.amdatu.example.gadgetrepository.ExampleGadgetRepositoryService;
+import org.amdatu.opensocial.gadgetmanagement.GadgetManagement;
+import org.amdatu.opensocial.shindig.GadgetCategory;
+import org.amdatu.opensocial.shindig.GadgetDefinition;
+import org.osgi.service.log.LogService;
+
+/**
+ * This service provides an example gadget repository. It registers some 
example gadgets which
+ * can be used in the Amdatu OpenSocial container.
+ * 
+ * @author ivol
+ */
+public class ExampleGadgetRepositoryServiceImpl implements 
ExampleGadgetRepositoryService {
+    /**
+     * List of all default gadget URLs.
+     */
+    final static String[] EXAMPLE_GADGETS = new String[] {
+        "http://www.heywhatsthat.com/mapplets/profiler.xml";, // Path profiler
+        "http://www.vertaalwoord.nl/google/vertaalwoord.xml";, // Vertalen 
Woorden
+        "http://blah.appspot.com/wave/sudoku/sudoku.xml";,  // Sudoko
+        "http://pesta.appspot.com/gadgets/ratings/ratings.xml";, // Ratings
+        "http://igooglegadget.buienradar.nl/buienradar.xml";, // Buienradar
+        "http://www.google.com/ig/modules/datetime_v2/datetime_v2.xml";, // 
Date and time
+        "http://www.google.com/ig/modules/tabnews.xml"; // Google news
+    };
+
+    // Services injected by the Felix dependency manager
+    private volatile LogService m_logService;
+    private volatile GadgetManagement m_gadgetManagement;
+
+    /**
+     * The init() method is invoked by the Felix dependency manager.
+     */
+    public void init() {
+        m_logService.log(LogService.LOG_INFO, getClass().getName() + " service 
initialized");
+    }
+
+    public void start() {
+        // initialize the default gadget categories.
+        m_gadgetManagement.addCategory(AMDATU_EXAMPLE_CATEGORY);
+
+        for (String gadgetUrl : EXAMPLE_GADGETS) {
+            GadgetDefinition gadget = new GadgetDefinition(gadgetUrl, 
GadgetCategory.THIRDPARTY, false);
+            m_gadgetManagement.addGadget(gadget);
+        }
+    }
+
+    /**
+     * The destroy() method is invoked by the Felix dependency manager.
+     */
+    public void destroy() {
+        m_logService.log(LogService.LOG_INFO, getClass().getName() + " service 
destroyed");
+    }
+}

Modified: trunk/amdatu-example/oauth/pom.xml
==============================================================================
--- trunk/amdatu-example/oauth/pom.xml  (original)
+++ trunk/amdatu-example/oauth/pom.xml  Fri Jan 21 11:15:57 2011
@@ -12,30 +12,30 @@
   <packaging>bundle</packaging>
   <name>Amdatu Example - oAuth</name>
   <description>Provides example services and gadgets using oAuth 
authentication</description>
-  
-  <dependencies>  
-    <dependency>    
+
+  <dependencies>
+    <dependency>
       <groupId>org.amdatu.opensocial</groupId>
-      <artifactId>gadgetmanagement</artifactId>   
+      <artifactId>gadgetmanagement</artifactId>
       <scope>provided</scope>
       <type>bundle</type>
-    </dependency> 
+    </dependency>
     <dependency>
       <groupId>org.amdatu.opensocial</groupId>
       <artifactId>shindig</artifactId>
       <scope>provided</scope>
       <type>bundle</type>
     </dependency>
-    <dependency>    
+    <dependency>
       <groupId>org.amdatu.authentication.oauth</groupId>
-      <artifactId>api</artifactId>   
+      <artifactId>api</artifactId>
       <version>${platform.version}</version>
       <scope>provided</scope>
       <type>bundle</type>
     </dependency>
-    <dependency>    
+    <dependency>
       <groupId>org.amdatu.authentication.oauth</groupId>
-      <artifactId>server</artifactId>   
+      <artifactId>server</artifactId>
       <version>${platform.version}</version>
       <scope>provided</scope>
       <type>bundle</type>
@@ -59,8 +59,15 @@
       <version>${platform.version}</version>
       <scope>compile</scope>
     </dependency>
-  </dependencies> 
-  
+    <dependency>
+      <groupId>org.amdatu.example</groupId>
+      <artifactId>gadgetrepository</artifactId>
+      <version>${platform.version}</version>
+      <scope>provided</scope>
+      <type>bundle</type>
+    </dependency>
+  </dependencies>
+
   <build>
     <plugins>
       <plugin>
@@ -74,9 +81,9 @@
           </instructions>
         </configuration>
       </plugin>
-      
+
     </plugins>
-    
+
     <resources>
       <resource>
         <directory>src/main/resources</directory>
@@ -92,6 +99,6 @@
           <include>conf/*.*</include>
         </includes>
       </resource>
-    </resources>    
-  </build> 
+    </resources>
+  </build>
 </project>

Modified: 
trunk/amdatu-example/oauth/src/main/java/org/amdatu/example/oauth/service/OAuthGadgetsRegistrationServiceImpl.java
==============================================================================
--- 
trunk/amdatu-example/oauth/src/main/java/org/amdatu/example/oauth/service/OAuthGadgetsRegistrationServiceImpl.java
  (original)
+++ 
trunk/amdatu-example/oauth/src/main/java/org/amdatu/example/oauth/service/OAuthGadgetsRegistrationServiceImpl.java
  Fri Jan 21 11:15:57 2011
@@ -26,8 +26,8 @@
 import org.amdatu.authentication.oauth.api.ConsumerRegistryStorageException;
 import org.amdatu.authentication.oauth.api.OAuthServiceConsumer;
 import org.amdatu.authentication.oauth.api.OAuthServiceConsumerRegistry;
+import org.amdatu.example.gadgetrepository.ExampleGadgetRepositoryService;
 import org.amdatu.opensocial.gadgetmanagement.GadgetManagement;
-import org.amdatu.opensocial.shindig.GadgetCategory;
 import org.amdatu.opensocial.shindig.GadgetDefinition;
 import org.amdatu.web.httpcontext.HttpContextServiceFactory;
 import org.amdatu.web.httpcontext.ResourceProvider;
@@ -68,7 +68,7 @@
         m_httpContextComponent = 
m_httpContextFactoryService.create(m_bundleContext, this);
 
         String gadgetUrl = "/" + RESOURCE_ID + "/jsp/3leggedOAuthGadget.jspf";
-        GadgetDefinition gadgetDef = new GadgetDefinition(gadgetUrl, 
GadgetCategory.AMDATU_EXAMPLES, false);
+        GadgetDefinition gadgetDef = new GadgetDefinition(gadgetUrl, 
ExampleGadgetRepositoryService.AMDATU_EXAMPLE_CATEGORY, false);
 
         // Set oAuth parameters
         gadgetDef.setServiceName(SERVICE_NAME);

Modified: trunk/amdatu-example/pom.xml
==============================================================================
--- trunk/amdatu-example/pom.xml        (original)
+++ trunk/amdatu-example/pom.xml        Fri Jan 21 11:15:57 2011
@@ -107,6 +107,7 @@
     <module>course-gadget</module>
     <module>course-service</module>
     <module>friends-gadget</module>
+    <module>gadgetrepository</module>
     <module>oauth</module>
   </modules>
 

Modified: 
trunk/amdatu-opensocial/gadgetmanagement/src/main/java/org/amdatu/opensocial/gadgetmanagement/service/GadgetManagementServiceImpl.java
==============================================================================
--- 
trunk/amdatu-opensocial/gadgetmanagement/src/main/java/org/amdatu/opensocial/gadgetmanagement/service/GadgetManagementServiceImpl.java
      (original)
+++ 
trunk/amdatu-opensocial/gadgetmanagement/src/main/java/org/amdatu/opensocial/gadgetmanagement/service/GadgetManagementServiceImpl.java
      Fri Jan 21 11:15:57 2011
@@ -54,7 +54,6 @@
 import org.amdatu.authorization.login.service.LoginService;
 import org.amdatu.cassandra.persistencemanager.CassandraException;
 import org.amdatu.libraries.utilities.ConversionUtil;
-import org.amdatu.opensocial.gadgetmanagement.DefaultGadgetRepository;
 import org.amdatu.opensocial.gadgetmanagement.GadgetManagement;
 import org.amdatu.opensocial.gadgetmanagement.osgi.Activator;
 import org.amdatu.opensocial.shindig.GadgetCategory;
@@ -139,13 +138,7 @@
     public void start() {
         // initialize the default gadget categories.
         addCategory(GadgetCategory.AMDATU_PLATFORM);
-        addCategory(GadgetCategory.AMDATU_EXAMPLES);
         addCategory(GadgetCategory.THIRDPARTY);
-
-        for (String gadgetUrl : DefaultGadgetRepository.DEFAULT_GADGETS) {
-            GadgetDefinition gadget = new GadgetDefinition(gadgetUrl, 
GadgetCategory.THIRDPARTY, false);
-            addGadget(gadget);
-        }
     }
 
     /**

Modified: 
trunk/amdatu-opensocial/shindig/src/main/java/org/amdatu/opensocial/shindig/GadgetCategory.java
==============================================================================
--- 
trunk/amdatu-opensocial/shindig/src/main/java/org/amdatu/opensocial/shindig/GadgetCategory.java
     (original)
+++ 
trunk/amdatu-opensocial/shindig/src/main/java/org/amdatu/opensocial/shindig/GadgetCategory.java
     Fri Jan 21 11:15:57 2011
@@ -20,22 +20,17 @@
  * Represents a gadget category.
  * @author ivol
  */
-public class GadgetCategory {   
+public class GadgetCategory {
     /**
      * Default category for third party gadgets.
      */
     public static GadgetCategory THIRDPARTY = new GadgetCategory("3rdparty", 
"Third Party");
-    
+
     /**
      * Default category for Amdatu platform gadgets.
      */
     public static GadgetCategory AMDATU_PLATFORM = new 
GadgetCategory("amdatu_platform", "Amdatu Platform");
-    
-    /**
-     * Default category for Amdatu example gadgets.
-     */
-    public static GadgetCategory AMDATU_EXAMPLES = new 
GadgetCategory("amdatu_examples", "Amdatu Examples");
-    
+
     // Instance variables
     private String m_id;
     private String m_name;
@@ -57,7 +52,7 @@
     public String getId() {
         return m_id;
     }
-    
+
     /**
      * Returns the name of the category, i.e. "Third Party".
      * @return the name of the category.

Reply via email to