incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r836196 - in /sling/trunk/bundles/extensions/fsresource: pom.xml src/main/java/org/apache/sling/fsprovider/internal/FsResourceProvider.java
Date Sat, 14 Nov 2009 15:51:46 GMT
Author: fmeschbe
Date: Sat Nov 14 15:51:46 2009
New Revision: 836196

URL: http://svn.apache.org/viewvc?rev=836196&view=rev
Log:
SLING-1186 Upgrade to Sling Parent POM 8-SNAPSHOT (to use SCR plugin 1.4.0), set
DS specification version of components to 1.1, convert component into a regular
(non-ComponentFactory) component and ensure meta type descriptor is generated
with factoryPid set to the same value as the PID to have factory configuration
support.

Modified:
    sling/trunk/bundles/extensions/fsresource/pom.xml
    sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal/FsResourceProvider.java

Modified: sling/trunk/bundles/extensions/fsresource/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/fsresource/pom.xml?rev=836196&r1=836195&r2=836196&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/fsresource/pom.xml (original)
+++ sling/trunk/bundles/extensions/fsresource/pom.xml Sat Nov 14 15:51:46 2009
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>6</version>
+        <version>8-SNAPSHOT</version>
         <relativePath>../../parent/pom.xml</relativePath>
     </parent>
 
@@ -47,6 +47,9 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-scr-plugin</artifactId>
+                <configuration>
+                    <specVersion>1.1</specVersion>
+                </configuration>
             </plugin>
             <plugin>
                 <groupId>org.apache.felix</groupId>
@@ -82,14 +85,10 @@
             <version>2.0.4</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.felix</groupId>
+            <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.apache.felix</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
         </dependency>

Modified: sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal/FsResourceProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal/FsResourceProvider.java?rev=836196&r1=836195&r2=836196&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal/FsResourceProvider.java
(original)
+++ sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal/FsResourceProvider.java
Sat Nov 14 15:51:46 2009
@@ -20,8 +20,8 @@
 
 import java.io.File;
 import java.util.Collections;
-import java.util.Dictionary;
 import java.util.Iterator;
+import java.util.Map;
 import java.util.NoSuchElementException;
 
 import javax.jcr.RepositoryException;
@@ -32,7 +32,6 @@
 import org.apache.sling.api.resource.ResourceProvider;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.osgi.framework.BundleContext;
-import org.osgi.service.component.ComponentContext;
 
 /**
  * The <code>FsResourceProvider</code> is a resource provider which maps
@@ -48,7 +47,7 @@
  * @scr.component name="org.apache.sling.fsprovider.internal.FsResourceProvider"
  *                label="%resource.resolver.name"
  *                description="%resource.resolver.description"
- *                factory="org.apache.sling.fsprovider.internal.FsResourceProviderFactory"
+ *                configurationFactory="true"
  * @scr.service
  * @scr.property name="service.description" value="Sling Filesystem Resource
  *               Provider"
@@ -184,8 +183,7 @@
 
     // ---------- SCR Integration
 
-    protected void activate(ComponentContext context) {
-        Dictionary<?, ?> props = context.getProperties();
+    protected void activate(BundleContext bundleContext, Map<?, ?> props) {
 
         String providerRoot = (String) props.get(ROOTS);
         if (providerRoot == null || providerRoot.length() == 0) {
@@ -200,11 +198,10 @@
 
         this.providerRoot = providerRoot;
         this.providerRootPrefix = providerRoot.concat("/");
-        this.providerFile = getProviderFile(providerFileName,
-            context.getBundleContext());
+        this.providerFile = getProviderFile(providerFileName, bundleContext);
     }
 
-    protected void deactivate(ComponentContext context) {
+    protected void deactivate() {
         this.providerRoot = null;
         this.providerRootPrefix = null;
         this.providerFile = null;



Mime
View raw message