incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1356376 - in /sling/trunk/bundles/scripting/javascript: pom.xml src/main/java/org/apache/sling/scripting/javascript/internal/RhinoJavaScriptEngineFactory.java
Date Mon, 02 Jul 2012 17:45:28 GMT
Author: cziegeler
Date: Mon Jul  2 17:45:27 2012
New Revision: 1356376

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

Modified:
    sling/trunk/bundles/scripting/javascript/pom.xml
    sling/trunk/bundles/scripting/javascript/src/main/java/org/apache/sling/scripting/javascript/internal/RhinoJavaScriptEngineFactory.java

Modified: sling/trunk/bundles/scripting/javascript/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/javascript/pom.xml?rev=1356376&r1=1356375&r2=1356376&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/javascript/pom.xml (original)
+++ sling/trunk/bundles/scripting/javascript/pom.xml Mon Jul  2 17:45:27 2012
@@ -152,5 +152,9 @@
             <version>2.0.4-incubator</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+        	<groupId>org.apache.felix</groupId>
+        	<artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
     </dependencies>
 </project>

Modified: sling/trunk/bundles/scripting/javascript/src/main/java/org/apache/sling/scripting/javascript/internal/RhinoJavaScriptEngineFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/javascript/src/main/java/org/apache/sling/scripting/javascript/internal/RhinoJavaScriptEngineFactory.java?rev=1356376&r1=1356375&r2=1356376&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/javascript/src/main/java/org/apache/sling/scripting/javascript/internal/RhinoJavaScriptEngineFactory.java
(original)
+++ sling/trunk/bundles/scripting/javascript/src/main/java/org/apache/sling/scripting/javascript/internal/RhinoJavaScriptEngineFactory.java
Mon Jul  2 17:45:27 2012
@@ -24,6 +24,11 @@ import java.util.Set;
 
 import javax.script.ScriptEngine;
 
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
+import org.apache.felix.scr.annotations.ReferencePolicy;
+import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.commons.classloader.DynamicClassLoaderManager;
 import org.apache.sling.scripting.api.AbstractScriptEngineFactory;
 import org.apache.sling.scripting.javascript.RhinoHostObjectProvider;
@@ -54,13 +59,12 @@ import org.slf4j.LoggerFactory;
 /**
  * The <code>RhinoJavaScriptEngineFactory</code> TODO
  *
- * @scr.component metatype="no"
- * @scr.service interface="javax.script.ScriptEngineFactory"
- * @scr.reference name="HostObjectProvider"
- *                interface="org.apache.sling.scripting.javascript.RhinoHostObjectProvider"
- *                cardinality="0..n" policy="dynamic"
- *                bind="addHostObjectProvider" unbind="removeHostObjectProvider"
  */
+@Component
+@Service(value=javax.script.ScriptEngineFactory.class)
+@Reference(name="HostObjectProvider", referenceInterface=RhinoHostObjectProvider.class,
+           cardinality=ReferenceCardinality.OPTIONAL_MULTIPLE, policy=ReferencePolicy.DYNAMIC,
+           bind="addHostObjectProvider", unbind="removeHostObjectProvider")
 public class RhinoJavaScriptEngineFactory extends AbstractScriptEngineFactory
         implements ScopeProvider {
 
@@ -85,7 +89,7 @@ public class RhinoJavaScriptEngineFactor
 
     private final Set<RhinoHostObjectProvider> hostObjectProvider = new HashSet<RhinoHostObjectProvider>();
 
-    /** @scr.reference */
+    @Reference
     private DynamicClassLoaderManager dynamicClassLoaderManager;
 
     public ScriptEngine getScriptEngine() {



Mime
View raw message