You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2024/12/12 10:38:16 UTC
(sling-org-apache-sling-scripting-api) branch feature/SLING-12544-parent-62 created (now ff0c8e0)
This is an automated email from the ASF dual-hosted git repository.
sseifert pushed a change to branch feature/SLING-12544-parent-62
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git
at ff0c8e0 SLING-12544 apply spotless formatting
This branch includes the following new commits:
new eb4c5ec SLING-12544 update to parent 62
new ff0c8e0 SLING-12544 apply spotless formatting
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(sling-org-apache-sling-scripting-api) 02/02: SLING-12544 apply spotless formatting
Posted by ss...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sseifert pushed a commit to branch feature/SLING-12544-parent-62
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git
commit ff0c8e02a58edda89b1cbf22d7b4ed7134243faf
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Thu Dec 12 11:38:08 2024 +0100
SLING-12544 apply spotless formatting
---
pom.xml | 8 +++---
.../scripting/api/AbstractScriptEngineFactory.java | 10 +++-----
.../scripting/api/AbstractSlingScriptEngine.java | 5 ++--
.../scripting/api/BindingsValuesProvider.java | 9 +++----
.../api/BindingsValuesProvidersByContext.java | 15 +++++------
.../apache/sling/scripting/api/CachedScript.java | 12 ++++-----
.../apache/sling/scripting/api/ScriptCache.java | 12 ++++-----
.../sling/scripting/api/ScriptNameAware.java | 12 ++++-----
.../ScriptingResourceResolverProvider.java | 30 ++++++++++++----------
9 files changed, 51 insertions(+), 62 deletions(-)
diff --git a/pom.xml b/pom.xml
index cfce41d..995e973 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,16 +34,16 @@
<name>Apache Sling Scripting API</name>
<description>This bundle provides the internal API to implement scripting.</description>
- <properties>
- <sling.java.version>8</sling.java.version>
- </properties>
-
<scm>
<connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git</developerConnection>
<url>https://github.com/apache/sling-org-apache-sling-scripting-api.git</url>
</scm>
+ <properties>
+ <sling.java.version>8</sling.java.version>
+ </properties>
+
<dependencies>
<!-- OSGi -->
<dependency>
diff --git a/src/main/java/org/apache/sling/scripting/api/AbstractScriptEngineFactory.java b/src/main/java/org/apache/sling/scripting/api/AbstractScriptEngineFactory.java
index 6889d93..e86895d 100644
--- a/src/main/java/org/apache/sling/scripting/api/AbstractScriptEngineFactory.java
+++ b/src/main/java/org/apache/sling/scripting/api/AbstractScriptEngineFactory.java
@@ -18,6 +18,9 @@
*/
package org.apache.sling.scripting.api;
+import javax.script.ScriptEngine;
+import javax.script.ScriptEngineFactory;
+
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
@@ -26,15 +29,11 @@ import java.util.List;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
-import javax.script.ScriptEngine;
-import javax.script.ScriptEngineFactory;
-
/**
* This abstract class can be used for own script engine
* factory implementations.
*/
-public abstract class AbstractScriptEngineFactory
- implements ScriptEngineFactory {
+public abstract class AbstractScriptEngineFactory implements ScriptEngineFactory {
/** The engine name. */
private String engineName;
@@ -226,5 +225,4 @@ public abstract class AbstractScriptEngineFactory
public String getProgram(String... arg0) {
return null;
}
-
}
diff --git a/src/main/java/org/apache/sling/scripting/api/AbstractSlingScriptEngine.java b/src/main/java/org/apache/sling/scripting/api/AbstractSlingScriptEngine.java
index 2586bbc..8629239 100644
--- a/src/main/java/org/apache/sling/scripting/api/AbstractSlingScriptEngine.java
+++ b/src/main/java/org/apache/sling/scripting/api/AbstractSlingScriptEngine.java
@@ -18,14 +18,14 @@
*/
package org.apache.sling.scripting.api;
-import java.io.StringReader;
-
import javax.script.AbstractScriptEngine;
import javax.script.Bindings;
import javax.script.ScriptContext;
import javax.script.ScriptEngineFactory;
import javax.script.ScriptException;
+import java.io.StringReader;
+
import org.apache.sling.api.scripting.LazyBindings;
public abstract class AbstractSlingScriptEngine extends AbstractScriptEngine {
@@ -48,5 +48,4 @@ public abstract class AbstractSlingScriptEngine extends AbstractScriptEngine {
public ScriptEngineFactory getFactory() {
return scriptEngineFactory;
}
-
}
diff --git a/src/main/java/org/apache/sling/scripting/api/BindingsValuesProvider.java b/src/main/java/org/apache/sling/scripting/api/BindingsValuesProvider.java
index 5c6b666..d783637 100644
--- a/src/main/java/org/apache/sling/scripting/api/BindingsValuesProvider.java
+++ b/src/main/java/org/apache/sling/scripting/api/BindingsValuesProvider.java
@@ -26,17 +26,17 @@ import javax.script.Bindings;
*/
public interface BindingsValuesProvider {
- /** The name of the multi-value service property that defines the context(s) to which
+ /** The name of the multi-value service property that defines the context(s) to which
* a BindingsValuesProvider applies. This service property is optional, if not set
* the default value is {@link #DEFAULT_CONTEXT}
*/
String CONTEXT = "context";
-
+
/** The default value of the CONTEXT service property, used for compatibility with
- * previous versions of this bundle that didn't require it.
+ * previous versions of this bundle that didn't require it.
*/
String DEFAULT_CONTEXT = "request";
-
+
/**
* Add objects to the Bindings object. The Bindings
* object passed to this method does not support replacing
@@ -48,5 +48,4 @@ public interface BindingsValuesProvider {
* @param bindings the Bindings object
*/
void addBindings(Bindings bindings);
-
}
diff --git a/src/main/java/org/apache/sling/scripting/api/BindingsValuesProvidersByContext.java b/src/main/java/org/apache/sling/scripting/api/BindingsValuesProvidersByContext.java
index 1328b86..bdfca13 100644
--- a/src/main/java/org/apache/sling/scripting/api/BindingsValuesProvidersByContext.java
+++ b/src/main/java/org/apache/sling/scripting/api/BindingsValuesProvidersByContext.java
@@ -18,31 +18,28 @@
*/
package org.apache.sling.scripting.api;
-import java.util.Collection;
-
import javax.script.ScriptEngineFactory;
-import org.apache.sling.scripting.api.BindingsValuesProvider;
+import java.util.Collection;
/** Provides {@link BindingsValuesProvider} for specific contexts, based on
* their "context" service property.
* */
public interface BindingsValuesProvidersByContext {
-
+
/** Retrieve the current {@link BindingsValuesProvider} for
* the supplied ScriptEngineFactory and context.
- *
+ *
* @param scriptEngineFactory metadata of the ScriptEngine that's being used
* @param context Only BindingsValuesProviders that have this value in their CONTEXT
* service property are considered. For backwards compatibility, BindingsValuesProviders
- * which do not have a CONTEXT service property are considered to have CONTEXT=request.
+ * which do not have a CONTEXT service property are considered to have CONTEXT=request.
* @return The returned Collection of BindingsValuesProvider is sorted
* so as to give preference to more specific BindingsValuesProvider
* over those that match a compatible.javax.script.name ScriptEngineFactory property,
* for example, in the same way that the SlingScriptAdapterFactory did before
- * this service was implemented.
+ * this service was implemented.
*/
Collection<BindingsValuesProvider> getBindingsValuesProviders(
- ScriptEngineFactory scriptEngineFactory,
- String context);
+ ScriptEngineFactory scriptEngineFactory, String context);
}
diff --git a/src/main/java/org/apache/sling/scripting/api/CachedScript.java b/src/main/java/org/apache/sling/scripting/api/CachedScript.java
index b6eab72..f75033e 100644
--- a/src/main/java/org/apache/sling/scripting/api/CachedScript.java
+++ b/src/main/java/org/apache/sling/scripting/api/CachedScript.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -6,17 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- ******************************************************************************/
-
+ */
package org.apache.sling.scripting.api;
import javax.script.CompiledScript;
@@ -40,5 +39,4 @@ public interface CachedScript {
* @return the compiled script
*/
CompiledScript getCompiledScript();
-
}
diff --git a/src/main/java/org/apache/sling/scripting/api/ScriptCache.java b/src/main/java/org/apache/sling/scripting/api/ScriptCache.java
index 6cfa542..acd127b 100644
--- a/src/main/java/org/apache/sling/scripting/api/ScriptCache.java
+++ b/src/main/java/org/apache/sling/scripting/api/ScriptCache.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -6,17 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- ******************************************************************************/
-
+ */
package org.apache.sling.scripting.api;
/**
@@ -51,5 +50,4 @@ public interface ScriptCache {
* @return {@code true} if a script was cached from that path and was removed, {@code false} otherwise
*/
boolean removeScript(String scriptPath);
-
}
diff --git a/src/main/java/org/apache/sling/scripting/api/ScriptNameAware.java b/src/main/java/org/apache/sling/scripting/api/ScriptNameAware.java
index 61d7404..a93ecd8 100644
--- a/src/main/java/org/apache/sling/scripting/api/ScriptNameAware.java
+++ b/src/main/java/org/apache/sling/scripting/api/ScriptNameAware.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -6,17 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- ******************************************************************************/
-
+ */
package org.apache.sling.scripting.api;
/**
@@ -30,5 +29,4 @@ public interface ScriptNameAware {
* @return the script's name
*/
String getScriptName();
-
}
diff --git a/src/main/java/org/apache/sling/scripting/api/resource/ScriptingResourceResolverProvider.java b/src/main/java/org/apache/sling/scripting/api/resource/ScriptingResourceResolverProvider.java
index e616f88..4fd814c 100644
--- a/src/main/java/org/apache/sling/scripting/api/resource/ScriptingResourceResolverProvider.java
+++ b/src/main/java/org/apache/sling/scripting/api/resource/ScriptingResourceResolverProvider.java
@@ -1,19 +1,21 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.sling.scripting.api.resource;
import org.apache.sling.api.resource.ResourceResolver;
(sling-org-apache-sling-scripting-api) 01/02: SLING-12544 update to parent 62
Posted by ss...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sseifert pushed a commit to branch feature/SLING-12544-parent-62
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git
commit eb4c5ecc7702574f88c91ab602e2372c1e87aead
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Thu Dec 12 11:37:02 2024 +0100
SLING-12544 update to parent 62
---
.sling-module.json | 5 +++++
pom.xml | 6 +++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/.sling-module.json b/.sling-module.json
new file mode 100644
index 0000000..cfad4d2
--- /dev/null
+++ b/.sling-module.json
@@ -0,0 +1,5 @@
+{
+ "jenkins": {
+ "jdks": [17, 21]
+ }
+}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 3c26ebc..cfce41d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling-bundle-parent</artifactId>
- <version>39</version>
+ <version>62</version>
<relativePath />
</parent>
@@ -34,6 +34,10 @@
<name>Apache Sling Scripting API</name>
<description>This bundle provides the internal API to implement scripting.</description>
+ <properties>
+ <sling.java.version>8</sling.java.version>
+ </properties>
+
<scm>
<connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git</developerConnection>