incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1357137 - in /sling/trunk/contrib/extensions/obr: pom.xml src/main/java/org/apache/sling/osgi/obr/OSGiBundleRepositoryServlet.java
Date Wed, 04 Jul 2012 07:51:10 GMT
Author: cziegeler
Date: Wed Jul  4 07:51:09 2012
New Revision: 1357137

URL: http://svn.apache.org/viewvc?rev=1357137&view=rev
Log:
SLING-2363 : Replace JavaDoc SCR annotations with Java SCR annotations

Modified:
    sling/trunk/contrib/extensions/obr/pom.xml
    sling/trunk/contrib/extensions/obr/src/main/java/org/apache/sling/osgi/obr/OSGiBundleRepositoryServlet.java

Modified: sling/trunk/contrib/extensions/obr/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/obr/pom.xml?rev=1357137&r1=1357136&r2=1357137&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/obr/pom.xml (original)
+++ sling/trunk/contrib/extensions/obr/pom.xml Wed Jul  4 07:51:09 2012
@@ -139,6 +139,10 @@
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

Modified: sling/trunk/contrib/extensions/obr/src/main/java/org/apache/sling/osgi/obr/OSGiBundleRepositoryServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/obr/src/main/java/org/apache/sling/osgi/obr/OSGiBundleRepositoryServlet.java?rev=1357137&r1=1357136&r2=1357137&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/obr/src/main/java/org/apache/sling/osgi/obr/OSGiBundleRepositoryServlet.java
(original)
+++ sling/trunk/contrib/extensions/obr/src/main/java/org/apache/sling/osgi/obr/OSGiBundleRepositoryServlet.java
Wed Jul  4 07:51:09 2012
@@ -49,6 +49,12 @@ import org.apache.commons.fileupload.ser
 import org.apache.commons.fileupload.servlet.ServletRequestContext;
 import org.apache.commons.io.IOUtils;
 import org.apache.felix.bundlerepository.RepositoryAdminImpl;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
+import org.apache.felix.scr.annotations.ReferencePolicy;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.component.ComponentContext;
 import org.osgi.service.http.HttpContext;
@@ -60,14 +66,14 @@ import org.osgi.service.obr.Resolver;
 /**
  * The <code>OSGiBundleRepositoryServlet</code> TODO
  *
- * @scr.component immediate="true"
- * @scr.property name="service.vendor" value="The Apache Software Foundation"
- * @scr.property name="service.description" value="OSGi Bundle Repository (OBR)"
- * @scr.property name="manager.root" value="/"
- * @scr.property name="obrLocation" value="obr"
- * @scr.property name="obrName" value="internal"
- * @author fmeschbe
  */
+@Component(metatype=true, immediate=true)
+@Properties({
+    @Property(name="service.description", value="OSGi Bundle Repository (OBR)"),
+    @Property(name="manager.root", value="/"),
+    @Property(name="obrLocation", value="obr"),
+    @Property(name="obrName", value="internal")
+})
 public class OSGiBundleRepositoryServlet extends HttpServlet {
 
     /**
@@ -87,10 +93,10 @@ public class OSGiBundleRepositoryServlet
         "org.apache.sling.sling-servlet-bridge"
     };
 
-    /** @scr.reference cardinality="0..1" policy="dynamic" */
+    @Reference(cardinality=ReferenceCardinality.OPTIONAL_UNARY, policy=ReferencePolicy.DYNAMIC)
     private LogService log;
 
-    /** @scr.reference */
+    @Reference
     private HttpService httpService;
 
     private ComponentContext ctx;



Mime
View raw message