incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jus...@apache.org
Subject svn commit: r1351645 - in /sling/trunk/bundles/jcr/contentloader: pom.xml src/main/java/org/apache/sling/jcr/contentloader/internal/ContentLoaderService.java src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentImporter.java
Date Tue, 19 Jun 2012 10:38:04 GMT
Author: justin
Date: Tue Jun 19 10:38:03 2012
New Revision: 1351645

URL: http://svn.apache.org/viewvc?rev=1351645&view=rev
Log:
SLING-2363 - replacing javadoc with real annotations in content loader bundle

Modified:
    sling/trunk/bundles/jcr/contentloader/pom.xml
    sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentLoaderService.java
    sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentImporter.java

Modified: sling/trunk/bundles/jcr/contentloader/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/contentloader/pom.xml?rev=1351645&r1=1351644&r2=1351645&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/contentloader/pom.xml (original)
+++ sling/trunk/bundles/jcr/contentloader/pom.xml Tue Jun 19 10:38:03 2012
@@ -91,6 +91,10 @@
             <artifactId>org.osgi.compendium</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
+        <dependency>
             <groupId>javax.jcr</groupId>
             <artifactId>jcr</artifactId>
             <version>2.0</version>

Modified: sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentLoaderService.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentLoaderService.java?rev=1351645&r1=1351644&r2=1351645&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentLoaderService.java
(original)
+++ sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentLoaderService.java
Tue Jun 19 10:38:03 2012
@@ -32,6 +32,10 @@ import javax.jcr.Session;
 import javax.jcr.Value;
 import javax.jcr.lock.LockException;
 
+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.sling.commons.mime.MimeTypeService;
 import org.apache.sling.engine.SlingSettingsService;
 import org.apache.sling.jcr.api.SlingRepository;
@@ -50,11 +54,12 @@ import org.slf4j.LoggerFactory;
  * <li>Fires OSGi EventAdmin events on behalf of internal helper objects
  * </ul>
  *
- * @scr.component metatype="no"
- * @scr.property name="service.description" value="Sling
- *               Content Loader Implementation"
- * @scr.property name="service.vendor" value="The Apache Software Foundation"
  */
+@Component(metatype=false)
+@Properties({
+    @Property(name="service.vendor", value="The Apache Software Foundation"),
+    @Property(name="service.description", value="Apache Sling Content Loader Implementation")
+})
 public class ContentLoaderService implements SynchronousBundleListener, JcrContentHelper
{
 
     public static final String PROPERTY_CONTENT_LOADED = "content-loaded";
@@ -71,17 +76,15 @@ public class ContentLoaderService implem
 
     /**
      * The JCR Repository we access to resolve resources
-     *
-     * @scr.reference
      */
+    @Reference
     private SlingRepository repository;
 
     /**
      * The MimeTypeService used by the initial content initialContentLoader to
      * resolve MIME types for files to be installed.
-     *
-     * @scr.reference
      */
+    @Reference
     private MimeTypeService mimeTypeService;
 
     /**
@@ -100,8 +103,8 @@ public class ContentLoaderService implem
      */
     private final Set<String> updatedBundles = new HashSet<String>();
 
-    /** @scr.reference
-     *  Sling settings service. */
+    /** Sling settings service. */
+    @Reference
     protected SlingSettingsService settingsService;
 
     // ---------- BundleListener -----------------------------------------------

Modified: sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentImporter.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentImporter.java?rev=1351645&r1=1351644&r2=1351645&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentImporter.java
(original)
+++ sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentImporter.java
Tue Jun 19 10:38:03 2012
@@ -30,6 +30,11 @@ import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
+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.Service;
 import org.apache.sling.commons.mime.MimeTypeService;
 import org.apache.sling.jcr.contentloader.ContentImportListener;
 import org.apache.sling.jcr.contentloader.ContentImporter;
@@ -43,14 +48,13 @@ import org.slf4j.LoggerFactory;
  * <ul>
  * <li>Import content into the content repository.
  * </ul>
- *
- * @scr.component immediate="false" label="%content.import.service.name"
- *                description="%content.import.service.description"
- * @scr.property name="service.vendor" value="The Apache Software Foundation"
- * @scr.property name="service.description"
- *               value="Apache Sling JCR Content Import Service"
- * @scr.service interface="org.apache.sling.jcr.contentloader.ContentImporter"
  */
+@Component(metatype=true, immediate=false, label="%content.import.service.name", description="%content.import.service.description")
+@Properties({
+    @Property(name="service.vendor", value="The Apache Software Foundation"),
+    @Property(name="service.description", value="Apache Sling JCR Content Import Service")
+})
+@Service(ContentImporter.class)
 public class DefaultContentImporter extends BaseImportLoader implements JcrContentHelper,
ContentImporter {
 
     /** default log */
@@ -59,9 +63,8 @@ public class DefaultContentImporter exte
     /**
      * The MimeTypeService used by the initial content initialContentLoader to
      * resolve MIME types for files to be installed.
-     *
-     * @scr.reference
      */
+    @Reference
     private MimeTypeService mimeTypeService;
 
     /* (non-Javadoc)



Mime
View raw message