Author: mir
Date: Mon Feb 15 16:32:30 2010
New Revision: 910253

URL: http://svn.apache.org/viewvc?rev=910253&view=rev
Log:
CLEREZZA-126: deleted too much

Modified:
    
incubator/clerezza/issues/CLEREZZA-126/org.apache.clerezza.platform.content.representations/org.apache.clerezza.platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/ThumbnailService.java

Modified: 
incubator/clerezza/issues/CLEREZZA-126/org.apache.clerezza.platform.content.representations/org.apache.clerezza.platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/ThumbnailService.java
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/issues/CLEREZZA-126/org.apache.clerezza.platform.content.representations/org.apache.clerezza.platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/ThumbnailService.java?rev=910253&r1=910252&r2=910253&view=diff
==============================================================================
--- 
incubator/clerezza/issues/CLEREZZA-126/org.apache.clerezza.platform.content.representations/org.apache.clerezza.platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/ThumbnailService.java
 (original)
+++ 
incubator/clerezza/issues/CLEREZZA-126/org.apache.clerezza.platform.content.representations/org.apache.clerezza.platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/ThumbnailService.java
 Mon Feb 15 16:32:30 2010
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -46,13 +46,14 @@
 import org.apache.felix.scr.annotations.Service;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
+import org.osgi.service.component.ComponentContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * This JAX-RS resource provides a method to retrieve the uri to
  * the thumbnail or a other small representation of a InfoDiscoBit.
- * 
+ *
  * @author mir
  */
 @Component
@@ -70,6 +71,10 @@
        private String STATICWEB_PATH = 
"/org/apache/clerezza/web/resources/style/staticweb/";
        private String BASE_PATH = STATICWEB_PATH + "images/icons/mediatype/";
 
+       protected void activate(ComponentContext context) {
+               bundleContext = context.getBundleContext();
+       }
+
        /**
         * Returns the thumbnail uri for a InfoDiscoBit which is located at the 
uri
         * specified over the query parameter "uri". The thumbnails
@@ -122,7 +127,7 @@
                        throw new RuntimeException("no style bundle found");
                }
                String path = BASE_PATH + mediaType.getType() + "/";
-               Enumeration entries = styleBundle.findEntries(path, 
+               Enumeration entries = styleBundle.findEntries(path,
                                mediaType.getSubtype() + ".*", false);
                URI iconUri = createIconUri(entries, baseUri);
                if (iconUri != null) {


Reply via email to