This is an automated email from the ASF dual-hosted git repository.
enorman pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-testing-content.git
The following commit(s) were added to refs/heads/master by this push:
new 7f8f5f3 SLING-10683 add integration content for testing (#5)
7f8f5f3 is described below
commit 7f8f5f3b089f9d021c39f8faf7119e2f7da49404
Author: Eric Norman <[email protected]>
AuthorDate: Sat Aug 7 17:14:30 2021 -0700
SLING-10683 add integration content for testing (#5)
---
.../scripting/sightly/testing/models/TestEnum.java | 34 ++++++++++++++++++++++
.../sightly/testing/models/package-info.java | 2 +-
.../SLING-INF/apps/sightly/scripts/use/use.html | 9 ++++--
3 files changed, 42 insertions(+), 3 deletions(-)
diff --git
a/src/main/java/org/apache/sling/scripting/sightly/testing/models/TestEnum.java
b/src/main/java/org/apache/sling/scripting/sightly/testing/models/TestEnum.java
new file mode 100644
index 0000000..1549b9e
--- /dev/null
+++
b/src/main/java/org/apache/sling/scripting/sightly/testing/models/TestEnum.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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
+ *
+ * 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.sightly.testing.models;
+
+/**
+ * For testing SLING-10677
+ */
+public enum TestEnum {
+
+ ENUM_CONSTANT,
+ ENUM_CONSTANT2;
+
+ public static final String STATIC_FIELD1 = "static field1";
+ public static String something() {
+ return "something";
+ }
+
+}
diff --git
a/src/main/java/org/apache/sling/scripting/sightly/testing/models/package-info.java
b/src/main/java/org/apache/sling/scripting/sightly/testing/models/package-info.java
index 0f0d95b..f9048a2 100644
---
a/src/main/java/org/apache/sling/scripting/sightly/testing/models/package-info.java
+++
b/src/main/java/org/apache/sling/scripting/sightly/testing/models/package-info.java
@@ -15,7 +15,7 @@
* limitations under the License.
******************************************************************************/
-@Version("1.3.0")
+@Version("1.4.0")
package org.apache.sling.scripting.sightly.testing.models;
import org.osgi.annotation.versioning.Version;
diff --git a/src/main/resources/SLING-INF/apps/sightly/scripts/use/use.html
b/src/main/resources/SLING-INF/apps/sightly/scripts/use/use.html
index 255c846..50f6532 100644
--- a/src/main/resources/SLING-INF/apps/sightly/scripts/use/use.html
+++ b/src/main/resources/SLING-INF/apps/sightly/scripts/use/use.html
@@ -28,7 +28,8 @@
data-sly-use.rradapt="${'org.apache.sling.scripting.sightly.testing.adaptable.ResourceResolverAdapterUseObject'
@ adaptable = request.resourceResolver}"
data-sly-use.osgi="org.apache.sling.scripting.sightly.testing.use.TestService"
data-sly-use.repoNoPkg="RepoPojoNoPkg"
- data-sly-use.testEnum="TestEnumHolder">
+ data-sly-use.testEnumHolder="TestEnumHolder"
+
data-sly-use.testEnum="org.apache.sling.scripting.sightly.testing.models.TestEnum">
<div id="reqmodel">${reqmodel.title}</div>
<div id="reqmodel-reqarg">${reqmodel.requestArgument}</div>
<div id="reqmodel-bindings">${reqmodel.getJCRType}</div>
@@ -37,7 +38,11 @@
<div id="resadapt">${resadapt.title}</div>
<div id="osgi">${osgi.sayHello}</div>
<div id="repopojo-nopkg">${repoNoPkg.FIELD}</div>
- <div id="test-enum">${testEnum.constantValue}</div>
+ <div id="test-enum">${testEnumHolder.constantValue}</div>
+ <div id="test-enum-value">${testEnum.ENUM_CONSTANT}</div>
+ <div id="test-enum-staticfield">${testEnum.STATIC_FIELD1}</div>
+ <div id="test-enum-staticmethod">${testEnum.something}</div>
+ <div id="test-enum-value2-${v.ordinal}"
data-sly-repeat.v="${testEnum.values}">${v}</div>
<div id="rradapt">${rradapt.title}</div>
</body>
</html>