incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1143319 - in /sling/trunk/bundles/jcr/base: pom.xml src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java
Date Wed, 06 Jul 2011 09:46:57 GMT
Author: cziegeler
Date: Wed Jul  6 09:46:56 2011
New Revision: 1143319

URL: http://svn.apache.org/viewvc?rev=1143319&view=rev
Log:
Switch to scr annotations - no functional changes.

Modified:
    sling/trunk/bundles/jcr/base/pom.xml
    sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java

Modified: sling/trunk/bundles/jcr/base/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/base/pom.xml?rev=1143319&r1=1143318&r2=1143319&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/base/pom.xml (original)
+++ sling/trunk/bundles/jcr/base/pom.xml Wed Jul  6 09:46:56 2011
@@ -85,6 +85,10 @@
 
     <dependencies>
         <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.jcr.api</artifactId>
             <version>2.1.0</version>

Modified: sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java?rev=1143319&r1=1143318&r2=1143319&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java
(original)
+++ sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java
Wed Jul  6 09:46:56 2011
@@ -30,6 +30,9 @@ import javax.jcr.SimpleCredentials;
 import javax.jcr.Value;
 import javax.jcr.Workspace;
 
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Reference;
 import org.apache.sling.jcr.api.NamespaceMapper;
 import org.apache.sling.jcr.api.SlingRepository;
 import org.apache.sling.jcr.base.internal.loader.Loader;
@@ -48,40 +51,34 @@ import org.osgi.util.tracker.ServiceTrac
  * interface may wish to extend this class to benefit from a default
  * implementation.
  *
- * @scr.component metatype="no"
  */
+@Component(componentAbstract=true)
 public abstract class AbstractSlingRepository implements SlingRepository,
         Runnable {
 
-    /** @scr.property value="" */
+    public static final String DEFAULT_ANONYMOUS_USER = "anonymous";
+
+    public static final String DEFAULT_ANONYMOUS_PASS = "anonymous";
+
+    public static final String DEFAULT_ADMIN_USER = "admin";
+
+    public static final String DEFAULT_ADMIN_PASS = "admin";
+
+    @Property
     public static final String PROPERTY_DEFAULT_WORKSPACE = "defaultWorkspace";
 
-    /** @scr.property valueRef="DEFAULT_ANONYMOUS_USER" */
+    @Property(value=DEFAULT_ANONYMOUS_USER)
     public static final String PROPERTY_ANONYMOUS_USER = "anonymous.name";
 
-    /** @scr.property valueRef="DEFAULT_ANONYMOUS_PASS" */
+    @Property(value=DEFAULT_ANONYMOUS_PASS)
     public static final String PROPERTY_ANONYMOUS_PASS = "anonymous.password";
 
-    /** @scr.property valueRef="DEFAULT_ADMIN_USER" */
+    @Property(value=DEFAULT_ADMIN_USER)
     public static final String PROPERTY_ADMIN_USER = "admin.name";
 
-    /** @scr.property valueRef="DEFAULT_ADMIN_PASS" */
+    @Property(value=DEFAULT_ADMIN_PASS)
     public static final String PROPERTY_ADMIN_PASS = "admin.password";
 
-    /** @scr.property valueRef="DEFAULT_POLL_ACTIVE" */
-    public static final String PROPERTY_POLL_ACTIVE = "poll.active";
-
-    /** @scr.property valueRef="DEFAULT_POLL_INACTIVE" */
-    public static final String PROPERTY_POLL_INACTIVE = "poll.inactive";
-
-    public static final String DEFAULT_ANONYMOUS_USER = "anonymous";
-
-    public static final String DEFAULT_ANONYMOUS_PASS = "anonymous";
-
-    public static final String DEFAULT_ADMIN_USER = "admin";
-
-    public static final String DEFAULT_ADMIN_PASS = "admin";
-
     /**
      * The default value for the number of seconds to wait between two
      * consecutive checks while the repository is active (value is 10).
@@ -94,10 +91,16 @@ public abstract class AbstractSlingRepos
      */
     public static final int DEFAULT_POLL_INACTIVE = 10;
 
+    @Property(intValue=DEFAULT_POLL_ACTIVE)
+    public static final String PROPERTY_POLL_ACTIVE = "poll.active";
+
+    @Property(intValue=DEFAULT_POLL_INACTIVE)
+    public static final String PROPERTY_POLL_INACTIVE = "poll.inactive";
+
     /** The minimum number of seconds allowed for any of the two poll times */
     public static final int MIN_POLL = 2;
 
-    /** @scr.reference bind="bindLog" unbind="unbindLog" */
+    @Reference
     private LogService log;
 
     private ComponentContext componentContext;



Mime
View raw message