sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject [sling-org-apache-sling-scripting-sightly-js-provider] 02/18: SLING-4206 Refactor Sightly and Sightly JS
Date Tue, 07 Nov 2017 10:10:59 GMT
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.scripting.sightly.js.provider-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-js-provider.git

commit d05bbfa038e39625bd2f0392708ef258972668ec
Author: Felix Meschberger <fmeschbe@apache.org>
AuthorDate: Fri Nov 28 10:18:01 2014 +0000

    SLING-4206 Refactor Sightly and Sightly JS
    
     - Cleanup API
     - Structure API
     - Move implementations into impl folders
    
    Applying patch by Radu Cotescu (thank you very much)
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/scripting/sightly/js-use-provider@1642281
13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            |  7 ++++
 .../scripting/sightly/js/{ => impl}/Console.java   |  2 +-
 .../sightly/js/{ => impl}/JsEnvironment.java       | 25 +++++++--------
 .../sightly/js/{ => impl}/JsUseProvider.java       | 37 +++++++++++++++-------
 .../scripting/sightly/js/{ => impl}/Utils.java     |  2 +-
 .../scripting/sightly/js/{ => impl}/Variables.java |  2 +-
 .../js/{ => impl}/async/AsyncContainer.java        |  2 +-
 .../js/{ => impl}/async/AsyncExtractor.java        |  7 ++--
 .../async/TimingBindingsValuesProvider.java        |  5 ++-
 .../js/{ => impl}/async/TimingFunction.java        |  7 ++--
 .../sightly/js/{ => impl}/async/UnaryCallback.java |  2 +-
 .../sightly/js/{ => impl}/cjs/CommonJsModule.java  |  2 +-
 .../sightly/js/{ => impl}/cjs/ExportsObject.java   |  2 +-
 .../jsapi/SlyBindingsValuesProvider.java           | 21 ++++++------
 .../sightly/js/{ => impl}/loop/EventLoop.java      |  4 +--
 .../js/{ => impl}/loop/EventLoopInterop.java       |  2 +-
 .../scripting/sightly/js/{ => impl}/loop/Task.java |  2 +-
 .../sightly/js/{ => impl}/rhino/HybridObject.java  |  4 +--
 .../sightly/js/{ => impl}/rhino/JsUtils.java       |  2 +-
 .../js/{ => impl}/rhino/JsValueAdapter.java        |  7 ++--
 .../js/{ => impl}/use/DependencyResolver.java      | 11 +++----
 .../sightly/js/{ => impl}/use/UseFunction.java     | 12 +++----
 22 files changed, 91 insertions(+), 76 deletions(-)

diff --git a/pom.xml b/pom.xml
index 8fbe66a..3ac4e73 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,11 +79,18 @@
     <!-- D E P E N D E N C I E S                                                 -->
     <!-- ======================================================================= -->
     <dependencies>
+        <!-- OSGI -->
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <scope>provided</scope>
+        </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.compendium</artifactId>
             <scope>provided</scope>
         </dependency>
+
         <!-- Sling -->
         <dependency>
             <groupId>org.apache.sling</groupId>
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/Console.java b/src/main/java/org/apache/sling/scripting/sightly/js/impl/Console.java
similarity index 96%
rename from src/main/java/org/apache/sling/scripting/sightly/js/Console.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/Console.java
index 885c602..355e253 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/Console.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/Console.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js;
+package org.apache.sling.scripting.sightly.js.impl;
 
 import org.slf4j.Logger;
 
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/JsEnvironment.java b/src/main/java/org/apache/sling/scripting/sightly/js/impl/JsEnvironment.java
similarity index 89%
rename from src/main/java/org/apache/sling/scripting/sightly/js/JsEnvironment.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/JsEnvironment.java
index 58686a7..f1979fb 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/JsEnvironment.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/JsEnvironment.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js;
+package org.apache.sling.scripting.sightly.js.impl;
 
 import java.io.InputStream;
 import java.io.InputStreamReader;
@@ -33,20 +33,19 @@ import org.apache.commons.io.IOUtils;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.scripting.SlingBindings;
 import org.apache.sling.api.scripting.SlingScriptHelper;
-import org.apache.sling.scripting.sightly.api.ResourceResolution;
-import org.apache.sling.scripting.sightly.api.SightlyUseException;
+import org.apache.sling.scripting.sightly.ResourceResolution;
 import org.mozilla.javascript.Context;
 import org.slf4j.LoggerFactory;
-
-import org.apache.sling.scripting.sightly.js.async.AsyncContainer;
-import org.apache.sling.scripting.sightly.js.async.TimingBindingsValuesProvider;
-import org.apache.sling.scripting.sightly.js.async.UnaryCallback;
-import org.apache.sling.scripting.sightly.js.cjs.CommonJsModule;
-import org.apache.sling.scripting.sightly.js.loop.EventLoop;
-import org.apache.sling.scripting.sightly.js.loop.EventLoopInterop;
-import org.apache.sling.scripting.sightly.js.loop.Task;
-import org.apache.sling.scripting.sightly.js.use.DependencyResolver;
-import org.apache.sling.scripting.sightly.js.use.UseFunction;
+import org.apache.sling.scripting.sightly.js.impl.async.AsyncContainer;
+import org.apache.sling.scripting.sightly.js.impl.async.TimingBindingsValuesProvider;
+import org.apache.sling.scripting.sightly.js.impl.async.UnaryCallback;
+import org.apache.sling.scripting.sightly.js.impl.cjs.CommonJsModule;
+import org.apache.sling.scripting.sightly.js.impl.loop.EventLoop;
+import org.apache.sling.scripting.sightly.js.impl.loop.EventLoopInterop;
+import org.apache.sling.scripting.sightly.js.impl.loop.Task;
+import org.apache.sling.scripting.sightly.js.impl.use.DependencyResolver;
+import org.apache.sling.scripting.sightly.js.impl.use.UseFunction;
+import org.apache.sling.scripting.sightly.use.SightlyUseException;
 
 /**
  * Environment for running JS scripts
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/JsUseProvider.java b/src/main/java/org/apache/sling/scripting/sightly/js/impl/JsUseProvider.java
similarity index 76%
rename from src/main/java/org/apache/sling/scripting/sightly/js/JsUseProvider.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/JsUseProvider.java
index 85f5627..fa8b0ec 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/JsUseProvider.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/JsUseProvider.java
@@ -16,13 +16,14 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js;
+package org.apache.sling.scripting.sightly.js.impl;
 
 import javax.script.Bindings;
 import javax.script.ScriptEngine;
 import javax.script.ScriptEngineManager;
 
 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;
@@ -31,24 +32,36 @@ import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.api.resource.ResourceResolverFactory;
 import org.apache.sling.api.scripting.SlingScriptHelper;
-import org.apache.sling.scripting.sightly.api.ProviderOutcome;
-import org.apache.sling.scripting.sightly.api.RenderContext;
-import org.apache.sling.scripting.sightly.api.UseProvider;
-import org.apache.sling.scripting.sightly.api.UseProviderComponent;
+import org.apache.sling.scripting.sightly.js.impl.async.AsyncContainer;
+import org.apache.sling.scripting.sightly.js.impl.async.AsyncExtractor;
+import org.apache.sling.scripting.sightly.js.impl.rhino.JsValueAdapter;
+import org.apache.sling.scripting.sightly.render.RenderContext;
+import org.apache.sling.scripting.sightly.use.ProviderOutcome;
+import org.apache.sling.scripting.sightly.use.UseProvider;
+import org.osgi.framework.Constants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.sling.scripting.sightly.js.async.AsyncContainer;
-import org.apache.sling.scripting.sightly.js.async.AsyncExtractor;
-import org.apache.sling.scripting.sightly.js.rhino.JsValueAdapter;
-
 /**
  * Use provider for JS scripts. Ensures proper integration between Sightly & JS code-behind.
  */
-@Component
+@Component(
+        metatype = true,
+        label = "Apache Sling Scripting Sightly JavaScript Use Provider",
+        description = "The JavaScript Use Provider is responsible for instantiating JavaScript
Use-API objects."
+)
 @Service(UseProvider.class)
-@Property(name = UseProviderComponent.PRIORITY, intValue = -1)
-public class JsUseProvider extends UseProviderComponent {
+@Properties({
+        @Property(
+                name = Constants.SERVICE_RANKING,
+                label = "Service Ranking",
+                description = "The Service Ranking value acts as the priority with which
this Use Provider is queried to return an " +
+                        "Use-object. A higher value represents a higher priority.",
+                intValue = 90,
+                propertyPrivate = false
+        )
+})
+public class JsUseProvider implements UseProvider {
 
     private static final String JS_ENGINE_NAME = "javascript";
 
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/Utils.java b/src/main/java/org/apache/sling/scripting/sightly/js/impl/Utils.java
similarity index 97%
rename from src/main/java/org/apache/sling/scripting/sightly/js/Utils.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/Utils.java
index 1f8128b..7d22159 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/Utils.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/Utils.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js;
+package org.apache.sling.scripting.sightly.js.impl;
 
 import javax.script.Bindings;
 import javax.script.SimpleBindings;
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/Variables.java b/src/main/java/org/apache/sling/scripting/sightly/js/impl/Variables.java
similarity index 96%
rename from src/main/java/org/apache/sling/scripting/sightly/js/Variables.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/Variables.java
index 1e1673d..176e85f 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/Variables.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/Variables.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js;
+package org.apache.sling.scripting.sightly.js.impl;
 
 /**
  * Variables exposed to js scripts
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/async/AsyncContainer.java
b/src/main/java/org/apache/sling/scripting/sightly/js/impl/async/AsyncContainer.java
similarity index 98%
rename from src/main/java/org/apache/sling/scripting/sightly/js/async/AsyncContainer.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/async/AsyncContainer.java
index e4f39dd..b9bbd5c 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/async/AsyncContainer.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/async/AsyncContainer.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js.async;
+package org.apache.sling.scripting.sightly.js.impl.async;
 
 import java.util.ArrayList;
 import java.util.List;
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/async/AsyncExtractor.java
b/src/main/java/org/apache/sling/scripting/sightly/js/impl/async/AsyncExtractor.java
similarity index 94%
rename from src/main/java/org/apache/sling/scripting/sightly/js/async/AsyncExtractor.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/async/AsyncExtractor.java
index fe43556..bf2d933 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/async/AsyncExtractor.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/async/AsyncExtractor.java
@@ -16,16 +16,15 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js.async;
+package org.apache.sling.scripting.sightly.js.impl.async;
 
-import org.apache.sling.scripting.sightly.api.SightlyUseException;
 import org.mozilla.javascript.BaseFunction;
 import org.mozilla.javascript.Context;
 import org.mozilla.javascript.Function;
 import org.mozilla.javascript.Scriptable;
 import org.mozilla.javascript.ScriptableObject;
-
-import org.apache.sling.scripting.sightly.js.loop.EventLoopInterop;
+import org.apache.sling.scripting.sightly.js.impl.loop.EventLoopInterop;
+import org.apache.sling.scripting.sightly.use.SightlyUseException;
 
 /**
  *
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/async/TimingBindingsValuesProvider.java
b/src/main/java/org/apache/sling/scripting/sightly/js/impl/async/TimingBindingsValuesProvider.java
similarity index 92%
rename from src/main/java/org/apache/sling/scripting/sightly/js/async/TimingBindingsValuesProvider.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/async/TimingBindingsValuesProvider.java
index c823405..623de69 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/async/TimingBindingsValuesProvider.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/async/TimingBindingsValuesProvider.java
@@ -16,13 +16,12 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js.async;
+package org.apache.sling.scripting.sightly.js.impl.async;
 
 import javax.script.Bindings;
 
 import org.apache.sling.scripting.api.BindingsValuesProvider;
-
-import org.apache.sling.scripting.sightly.js.Variables;
+import org.apache.sling.scripting.sightly.js.impl.Variables;
 
 /**
  * Value provider for timing functions
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/async/TimingFunction.java
b/src/main/java/org/apache/sling/scripting/sightly/js/impl/async/TimingFunction.java
similarity index 91%
rename from src/main/java/org/apache/sling/scripting/sightly/js/async/TimingFunction.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/async/TimingFunction.java
index 2755782..5cf43b7 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/async/TimingFunction.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/async/TimingFunction.java
@@ -16,15 +16,14 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js.async;
+package org.apache.sling.scripting.sightly.js.impl.async;
 
 import org.mozilla.javascript.BaseFunction;
 import org.mozilla.javascript.Context;
 import org.mozilla.javascript.Function;
 import org.mozilla.javascript.Scriptable;
-
-import org.apache.sling.scripting.sightly.js.loop.EventLoopInterop;
-import org.apache.sling.scripting.sightly.js.rhino.JsUtils;
+import org.apache.sling.scripting.sightly.js.impl.loop.EventLoopInterop;
+import org.apache.sling.scripting.sightly.js.impl.rhino.JsUtils;
 
 /**
  * Timing function for JS scripts that use async constructs
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/async/UnaryCallback.java
b/src/main/java/org/apache/sling/scripting/sightly/js/impl/async/UnaryCallback.java
similarity index 95%
rename from src/main/java/org/apache/sling/scripting/sightly/js/async/UnaryCallback.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/async/UnaryCallback.java
index 48e1aee..0ec0e61 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/async/UnaryCallback.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/async/UnaryCallback.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js.async;
+package org.apache.sling.scripting.sightly.js.impl.async;
 
 /**
  * Unary callback function
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/cjs/CommonJsModule.java b/src/main/java/org/apache/sling/scripting/sightly/js/impl/cjs/CommonJsModule.java
similarity index 97%
rename from src/main/java/org/apache/sling/scripting/sightly/js/cjs/CommonJsModule.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/cjs/CommonJsModule.java
index 3d1683e..9b1c675 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/cjs/CommonJsModule.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/cjs/CommonJsModule.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js.cjs;
+package org.apache.sling.scripting.sightly.js.impl.cjs;
 
 import org.mozilla.javascript.Scriptable;
 import org.mozilla.javascript.ScriptableObject;
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/cjs/ExportsObject.java b/src/main/java/org/apache/sling/scripting/sightly/js/impl/cjs/ExportsObject.java
similarity index 96%
rename from src/main/java/org/apache/sling/scripting/sightly/js/cjs/ExportsObject.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/cjs/ExportsObject.java
index 58257f5..3822861 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/cjs/ExportsObject.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/cjs/ExportsObject.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js.cjs;
+package org.apache.sling.scripting.sightly.js.impl.cjs;
 
 
 import org.mozilla.javascript.Scriptable;
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/jsapi/SlyBindingsValuesProvider.java
b/src/main/java/org/apache/sling/scripting/sightly/js/impl/jsapi/SlyBindingsValuesProvider.java
similarity index 94%
rename from src/main/java/org/apache/sling/scripting/sightly/js/jsapi/SlyBindingsValuesProvider.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/jsapi/SlyBindingsValuesProvider.java
index 4333c4a..72b99a2 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/jsapi/SlyBindingsValuesProvider.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/jsapi/SlyBindingsValuesProvider.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js.jsapi;
+package org.apache.sling.scripting.sightly.js.impl.jsapi;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -24,6 +24,7 @@ import java.io.InputStreamReader;
 import java.util.Dictionary;
 import java.util.HashMap;
 import java.util.Map;
+
 import javax.script.Bindings;
 import javax.script.ScriptEngine;
 import javax.script.ScriptEngineManager;
@@ -45,15 +46,15 @@ import org.apache.sling.api.resource.ResourceResolverFactory;
 import org.apache.sling.api.scripting.SlingBindings;
 import org.apache.sling.commons.osgi.PropertiesUtil;
 import org.apache.sling.scripting.api.BindingsValuesProvider;
-import org.apache.sling.scripting.sightly.js.JsEnvironment;
-import org.apache.sling.scripting.sightly.js.Variables;
-import org.apache.sling.scripting.sightly.js.async.AsyncContainer;
-import org.apache.sling.scripting.sightly.js.async.AsyncExtractor;
-import org.apache.sling.scripting.sightly.js.async.TimingBindingsValuesProvider;
-import org.apache.sling.scripting.sightly.js.async.TimingFunction;
-import org.apache.sling.scripting.sightly.js.cjs.CommonJsModule;
-import org.apache.sling.scripting.sightly.js.rhino.HybridObject;
-import org.apache.sling.scripting.sightly.js.rhino.JsValueAdapter;
+import org.apache.sling.scripting.sightly.js.impl.JsEnvironment;
+import org.apache.sling.scripting.sightly.js.impl.Variables;
+import org.apache.sling.scripting.sightly.js.impl.async.AsyncContainer;
+import org.apache.sling.scripting.sightly.js.impl.async.AsyncExtractor;
+import org.apache.sling.scripting.sightly.js.impl.async.TimingBindingsValuesProvider;
+import org.apache.sling.scripting.sightly.js.impl.async.TimingFunction;
+import org.apache.sling.scripting.sightly.js.impl.cjs.CommonJsModule;
+import org.apache.sling.scripting.sightly.js.impl.rhino.HybridObject;
+import org.apache.sling.scripting.sightly.js.impl.rhino.JsValueAdapter;
 import org.mozilla.javascript.Context;
 import org.mozilla.javascript.Function;
 import org.mozilla.javascript.Script;
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/loop/EventLoop.java b/src/main/java/org/apache/sling/scripting/sightly/js/impl/loop/EventLoop.java
similarity index 95%
rename from src/main/java/org/apache/sling/scripting/sightly/js/loop/EventLoop.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/loop/EventLoop.java
index ef4c6d5..29480f2 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/loop/EventLoop.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/loop/EventLoop.java
@@ -16,12 +16,12 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js.loop;
+package org.apache.sling.scripting.sightly.js.impl.loop;
 
 import java.util.LinkedList;
 import java.util.Queue;
 
-import org.apache.sling.scripting.sightly.api.SightlyUseException;
+import org.apache.sling.scripting.sightly.use.SightlyUseException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/loop/EventLoopInterop.java
b/src/main/java/org/apache/sling/scripting/sightly/js/impl/loop/EventLoopInterop.java
similarity index 97%
rename from src/main/java/org/apache/sling/scripting/sightly/js/loop/EventLoopInterop.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/loop/EventLoopInterop.java
index d847f53..af9b8d5 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/loop/EventLoopInterop.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/loop/EventLoopInterop.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js.loop;
+package org.apache.sling.scripting.sightly.js.impl.loop;
 
 import org.mozilla.javascript.Context;
 
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/loop/Task.java b/src/main/java/org/apache/sling/scripting/sightly/js/impl/loop/Task.java
similarity index 95%
rename from src/main/java/org/apache/sling/scripting/sightly/js/loop/Task.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/loop/Task.java
index e218e78..1a96a12 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/loop/Task.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/loop/Task.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js.loop;
+package org.apache.sling.scripting.sightly.js.impl.loop;
 
 /**
  * Task in an event loop
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/rhino/HybridObject.java b/src/main/java/org/apache/sling/scripting/sightly/js/impl/rhino/HybridObject.java
similarity index 97%
rename from src/main/java/org/apache/sling/scripting/sightly/js/rhino/HybridObject.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/rhino/HybridObject.java
index 77875fc..8318543 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/rhino/HybridObject.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/rhino/HybridObject.java
@@ -16,12 +16,12 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js.rhino;
+package org.apache.sling.scripting.sightly.js.impl.rhino;
 
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.sling.scripting.sightly.api.Record;
+import org.apache.sling.scripting.sightly.Record;
 import org.mozilla.javascript.Context;
 import org.mozilla.javascript.Function;
 import org.mozilla.javascript.Scriptable;
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/rhino/JsUtils.java b/src/main/java/org/apache/sling/scripting/sightly/js/impl/rhino/JsUtils.java
similarity index 96%
rename from src/main/java/org/apache/sling/scripting/sightly/js/rhino/JsUtils.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/rhino/JsUtils.java
index aa5325f..cfc6cad 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/rhino/JsUtils.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/rhino/JsUtils.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js.rhino;
+package org.apache.sling.scripting.sightly.js.impl.rhino;
 
 import org.mozilla.javascript.Context;
 import org.mozilla.javascript.Function;
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/rhino/JsValueAdapter.java
b/src/main/java/org/apache/sling/scripting/sightly/js/impl/rhino/JsValueAdapter.java
similarity index 96%
rename from src/main/java/org/apache/sling/scripting/sightly/js/rhino/JsValueAdapter.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/rhino/JsValueAdapter.java
index 814a7e4..81226c6 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/rhino/JsValueAdapter.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/rhino/JsValueAdapter.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  ******************************************************************************/
-package org.apache.sling.scripting.sightly.js.rhino;
+package org.apache.sling.scripting.sightly.js.impl.rhino;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -30,9 +30,8 @@ import org.mozilla.javascript.Function;
 import org.mozilla.javascript.NativeArray;
 import org.mozilla.javascript.ScriptableObject;
 import org.mozilla.javascript.Wrapper;
-
-import org.apache.sling.scripting.sightly.js.async.AsyncContainer;
-import org.apache.sling.scripting.sightly.js.async.AsyncExtractor;
+import org.apache.sling.scripting.sightly.js.impl.async.AsyncContainer;
+import org.apache.sling.scripting.sightly.js.impl.async.AsyncExtractor;
 
 /**
  * Converts JS objects to Java objects
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/use/DependencyResolver.java
b/src/main/java/org/apache/sling/scripting/sightly/js/impl/use/DependencyResolver.java
similarity index 86%
rename from src/main/java/org/apache/sling/scripting/sightly/js/use/DependencyResolver.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/use/DependencyResolver.java
index 5df0a86..bc43005 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/use/DependencyResolver.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/use/DependencyResolver.java
@@ -17,16 +17,15 @@
  * under the License.
  ******************************************************************************/
 
-package org.apache.sling.scripting.sightly.js.use;
+package org.apache.sling.scripting.sightly.js.impl.use;
 
 import javax.script.Bindings;
 
 import org.apache.sling.api.resource.Resource;
-import org.apache.sling.scripting.sightly.api.SightlyUseException;
-
-import org.apache.sling.scripting.sightly.js.JsEnvironment;
-import org.apache.sling.scripting.sightly.js.Utils;
-import org.apache.sling.scripting.sightly.js.async.UnaryCallback;
+import org.apache.sling.scripting.sightly.js.impl.JsEnvironment;
+import org.apache.sling.scripting.sightly.js.impl.Utils;
+import org.apache.sling.scripting.sightly.js.impl.async.UnaryCallback;
+import org.apache.sling.scripting.sightly.use.SightlyUseException;
 
 /**
  * Resolves dependencies specified by the Use function
diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/use/UseFunction.java b/src/main/java/org/apache/sling/scripting/sightly/js/impl/use/UseFunction.java
similarity index 93%
rename from src/main/java/org/apache/sling/scripting/sightly/js/use/UseFunction.java
rename to src/main/java/org/apache/sling/scripting/sightly/js/impl/use/UseFunction.java
index 2fe1b22..fbfe132 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/use/UseFunction.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/use/UseFunction.java
@@ -17,9 +17,10 @@
  * under the License.
  ******************************************************************************/
 
-package org.apache.sling.scripting.sightly.js.use;
+package org.apache.sling.scripting.sightly.js.impl.use;
 
 import javax.script.Bindings;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -32,11 +33,10 @@ import org.mozilla.javascript.NativeArray;
 import org.mozilla.javascript.NativeObject;
 import org.mozilla.javascript.Scriptable;
 import org.mozilla.javascript.ScriptableObject;
-
-import org.apache.sling.scripting.sightly.js.async.AsyncContainer;
-import org.apache.sling.scripting.sightly.js.async.UnaryCallback;
-import org.apache.sling.scripting.sightly.js.loop.EventLoopInterop;
-import org.apache.sling.scripting.sightly.js.rhino.JsUtils;
+import org.apache.sling.scripting.sightly.js.impl.async.AsyncContainer;
+import org.apache.sling.scripting.sightly.js.impl.async.UnaryCallback;
+import org.apache.sling.scripting.sightly.js.impl.loop.EventLoopInterop;
+import org.apache.sling.scripting.sightly.js.impl.rhino.JsUtils;
 
 /**
  * The JavaScript {@code use} function

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <commits@sling.apache.org>.

Mime
View raw message