You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:24:25 UTC

[sling-org-apache-sling-validation-test-services] annotated tag org.apache.sling.validation.test-services-1.0.0 created (now 7284f8c)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a change to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git.


      at 7284f8c  (tag)
 tagging 93d67067b90ac5dfee57c43eaad78f8a33df3a5e (commit)
      by Konrad Windszus
      on Wed Apr 5 13:33:08 2017 +0000

- Log -----------------------------------------------------------------
org.apache.sling.validation.test-services-1.0.0
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new 591fdd9  SLING-2803 - validation module contribution, by Radu Cotescu, thanks!
     new efa2bce  SLING-4187 Move XSS and Validation to Extensions
     new 1a5800b  SLING 4606 move validation from contrib to /
     new cc433c4  use newest parent, get rid of JCR dependency, clean up POMs
     new f94bae1  Set relative path
     new b3b013a  Add missing licence headers
     new a431c3d  SLING-4777 decouple model provider from the validation service
     new 045cfb8  Update to Sling Parent 23
     new ce95a6a  Remove superflous sling.java.version=6 as it's the default now
     new a115116  set parent version to 24 and add empty relativePath where missing
     new b04ec15  SLING-4876 support resource type inheritance for validator models
     new c74ba4f  Update the main reactor to parent 25
     new 0a324bc  SLING-5026 - refactor validator interface to allow to set multiple failure messages
     new cbdf22a  Switch to parent pom 26
     new e62bde3  SLING-4213 leverage sling-i18n for validation failure messages
     new a449cb4  SLING-5373 allow to set severity per validator in the model
     new 9944da0  use Sling parent 29
     new 7f86595  SLING-5590 Move Sling HTTP Servlet Request Adaptor Factory out of Validation Core
     new 7fa5eef  use OSGi R6 annotations and add resource presence (wip)
     new 75ce997  SLING-6578 use dedicated service property "validator.id" for referencing the validator from models
     new b152b95  use Sling Parent 30
     new 3909dcb  fix scm property
     new 163cab1  clean up pom's for release
     new 9a03d09  remove resource presence and presenter
     new 5fd6395  prevent overwriting of parts of the repository which are not affected by test content
     new 6271cfe  fix path parameter directive (fixes IT)
     new 533713d  SLING-6515 provide a PostProcessor which validates the newly generated resouce
     new 494a9cc  SLING-6727 adjust test validation model to new property name
     new 4f1ab77  [maven-release-plugin] prepare for next development iteration
     new 335e596  revert failed release 1.0.0
     new 1a7dca7  rely on latest release
     new 52733ee  [maven-release-plugin] prepare release org.apache.sling.validation.test-services-1.0.0
     new 93d6706  [maven-release-plugin] copy for tag org.apache.sling.validation.test-services-1.0.0

The 33 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.


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

[sling-org-apache-sling-validation-test-services] 22/33: fix scm property

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 3909dcb20544fee686342b04ad9e012e3ebf155a
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Thu Mar 16 14:49:52 2017 +0000

    fix scm property
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1787196 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 23d27ee..bac3680 100644
--- a/pom.xml
+++ b/pom.xml
@@ -37,7 +37,7 @@
     <scm>
         <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services</connection>
         <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/validation/core</url>
+        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/validation/test-services</url>
     </scm>
 
     <build>

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

[sling-org-apache-sling-validation-test-services] 20/33: SLING-6578 use dedicated service property "validator.id" for referencing the validator from models

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 75ce9972e9029b13bfce40899c3ded06f0b9dad1
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Thu Mar 2 07:14:34 2017 +0000

    SLING-6578 use dedicated service property "validator.id" for referencing the validator from models
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1785073 13f79535-47bb-0310-9956-ffa450edef68
---
 .../resources/SLING-CONTENT/apps/sling/validation/models/model1.json    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json b/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
index c7a70be..008025c 100644
--- a/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
+++ b/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
@@ -11,7 +11,7 @@
             "propertyType": "string",
             "validators": {
                 "jcr:primaryType" : "nt:unstructured",
-                "org.apache.sling.validation.impl.validators.RegexValidator": {
+                "org.apache.sling.validation.core.RegexValidator": {
                     "jcr:primaryType" : "nt:unstructured",
                     "validatorArguments" : ["regex=^\\\p{Upper}+$"],
                     "severity" : "10"

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

[sling-org-apache-sling-validation-test-services] 13/33: SLING-5026 - refactor validator interface to allow to set multiple failure messages

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 0a324bc101a5b977696f6f88c14a51c14f888a75
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Fri Dec 18 14:50:39 2015 +0000

    SLING-5026 - refactor validator interface to allow to set multiple failure messages
    
    This closes #117
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1720802 13f79535-47bb-0310-9956-ffa450edef68
---
 .../sling/validation/testservices/ValidationPostResponse.java | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java b/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
index f535c15..4b71762 100644
--- a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
+++ b/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
@@ -25,9 +25,11 @@ import java.util.Map;
 
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.sling.commons.json.JSONArray;
 import org.apache.sling.commons.json.JSONException;
 import org.apache.sling.commons.json.JSONObject;
 import org.apache.sling.servlets.post.AbstractPostResponse;
+import org.apache.sling.validation.ValidationFailure;
 import org.apache.sling.validation.ValidationResult;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -50,9 +52,14 @@ public class ValidationPostResponse extends AbstractPostResponse {
         if (validationResult != null) {
             try {
                 jsonResponse.put("valid", validationResult.isValid());
-                for (Map.Entry<String, List<String>> entry : validationResult.getFailureMessages().entrySet()) {
-                    jsonResponse.put(entry.getKey(), entry.getValue());
+                JSONArray failures = new JSONArray();
+                for (ValidationFailure failure : validationResult.getFailures()) {
+                    JSONObject failureJson = new JSONObject();
+                    failureJson.put("message", failure.getMessage());
+                    failureJson.put("location", failure.getLocation());
+                    failures.put(failureJson);
                 }
+                jsonResponse.put("failures", failures);
             } catch (JSONException e) {
                 LOG.error("JSON error during response send operation.", e);
             }

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

[sling-org-apache-sling-validation-test-services] 06/33: Add missing licence headers

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit b3b013aaae6209e0605033a8bbdce42fdbf07778
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Apr 27 15:18:24 2015 +0000

    Add missing licence headers
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1676297 13f79535-47bb-0310-9956-ffa450edef68
---
 .../testservices/ValidationPostResponseCreator.java  | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponseCreator.java b/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponseCreator.java
index 27967ae..d96c201 100644
--- a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponseCreator.java
+++ b/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponseCreator.java
@@ -1,4 +1,22 @@
-package org.apache.sling.validation.testservices;
+/*
+ * 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.validation.testservices;
 
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Service;

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

[sling-org-apache-sling-validation-test-services] 04/33: use newest parent, get rid of JCR dependency, clean up POMs

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit cc433c480c79d01900bdea568cb8c6609ee8bfa3
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Sat Apr 11 17:54:36 2015 +0000

    use newest parent, get rid of JCR dependency, clean up POMs
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1672911 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            | 29 +++++++++++-----------
 .../testservices/ValidationPostOperation.java      | 11 +++-----
 2 files changed, 19 insertions(+), 21 deletions(-)

diff --git a/pom.xml b/pom.xml
index f484157..005de3b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,13 +20,12 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>15</version>
-        <relativePath />
+        <version>22</version>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
 
     <artifactId>org.apache.sling.validation.test-services</artifactId>
     <version>1.0.0-SNAPSHOT</version>
@@ -37,21 +36,18 @@
     <properties>
         <sling.java.version>6</sling.java.version>
     </properties>
+    
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services</connection>
+        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/validation/core</url>
+    </scm>
 
     <build>
         <plugins>
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-scr-plugin</artifactId>
-                <version>1.11.0</version>
-                <executions>
-                    <execution>
-                        <id>generate-scr-descriptor</id>
-                        <goals>
-                            <goal>scr</goal>
-                        </goals>
-                    </execution>
-                </executions>
             </plugin>
             <plugin>
                 <groupId>org.apache.felix</groupId>
@@ -91,7 +87,6 @@
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.scr.annotations</artifactId>
-            <version>1.9.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -106,6 +101,12 @@
             <version>2.2.0</version>
             <scope>provided</scope>
         </dependency>
+        <!-- transitive dependency of org.apache.sling.servlets.post, used in AbstractPostOperation -->
+        <dependency>
+            <groupId>javax.jcr</groupId>
+            <artifactId>jcr</artifactId>
+            <version>2.0</version>
+        </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.validation.api</artifactId>
@@ -127,7 +128,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.commons.testing</artifactId>
-            <version>2.0.14</version>
+            <version>2.0.16</version>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java b/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java
index 408c058..c350cea 100644
--- a/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java
+++ b/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java
@@ -18,6 +18,8 @@
  */
 package org.apache.sling.validation.testservices;
 
+import java.util.List;
+
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Properties;
 import org.apache.felix.scr.annotations.Property;
@@ -25,7 +27,6 @@ import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.resource.ValueMap;
-import org.apache.sling.commons.json.JSONObject;
 import org.apache.sling.servlets.post.AbstractPostOperation;
 import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.PostOperation;
@@ -36,16 +37,12 @@ import org.apache.sling.validation.api.ValidationService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.jcr.RepositoryException;
-import java.util.List;
-
 @Component()
 @Service(PostOperation.class)
 @Properties({
         @Property(
                 name = PostOperation.PROP_OPERATION_NAME,
-                value = "validation",
-                propertyPrivate = true
+                value = "validation"
         )
 })
 public class ValidationPostOperation extends AbstractPostOperation {
@@ -56,7 +53,7 @@ public class ValidationPostOperation extends AbstractPostOperation {
     private ValidationService validationService;
 
     @Override
-    protected void doRun(SlingHttpServletRequest request, PostResponse response, List<Modification> changes) throws RepositoryException {
+    protected void doRun(SlingHttpServletRequest request, PostResponse response, List<Modification> changes) {
         if (response instanceof ValidationPostResponse) {
             ValidationPostResponse vpr = (ValidationPostResponse) response;
             ValueMap requestParameters = request.adaptTo(ValueMap.class);

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

[sling-org-apache-sling-validation-test-services] 08/33: Update to Sling Parent 23

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 045cfb85d0bcc4f0507618d77a2a042bb7e16231
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Jun 25 13:08:16 2015 +0000

    Update to Sling Parent 23
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1687500 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index a09cb2b..8372fc5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>22</version>
+        <version>23</version>
         <relativePath/>
     </parent>
 

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

[sling-org-apache-sling-validation-test-services] 19/33: use OSGi R6 annotations and add resource presence (wip)

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 7fa5eef75af9bb79a8dacceb0ece5fc13204fa77
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Sun Feb 26 18:52:27 2017 +0000

    use OSGi R6 annotations and add resource presence (wip)
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1784469 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            |  25 +---
 .../validation/testservices/ResourcePresence.java  |  26 ++++
 .../testservices/internal/ResourcePresenter.java   | 131 +++++++++++++++++++++
 .../{ => internal}/ValidationPostOperation.java    |  23 ++--
 .../{ => internal}/ValidationPostResponse.java     |   2 +-
 .../ValidationPostResponseCreator.java             |  19 ++-
 6 files changed, 182 insertions(+), 44 deletions(-)

diff --git a/pom.xml b/pom.xml
index 9102cc5..d386827 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,21 +44,11 @@
         <plugins>
             <plugin>
                 <groupId>org.apache.felix</groupId>
-                <artifactId>maven-scr-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
                         <Sling-Initial-Content>SLING-CONTENT;overwrite:=true</Sling-Initial-Content>
-                        <Export-Package>
-                            !org.apache.sling.validation.testservices
-                        </Export-Package>
-                        <Private-Package>
-                            org.apache.sling.validation.testservices
-                        </Private-Package>
                     </instructions>
                 </configuration>
             </plugin>
@@ -82,11 +72,6 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.felix</groupId>
-            <artifactId>org.apache.felix.scr.annotations</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
             <groupId>com.google.code.findbugs</groupId>
             <artifactId>jsr305</artifactId>
             <scope>provided</scope>
@@ -94,7 +79,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.api</artifactId>
-            <version>2.4.2</version>
+            <version>2.11.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -108,6 +93,7 @@
             <groupId>javax.jcr</groupId>
             <artifactId>jcr</artifactId>
             <version>2.0</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
@@ -126,12 +112,5 @@
             <artifactId>slf4j-api</artifactId>
             <scope>provided</scope>
         </dependency>
-        <!-- test dependencies -->
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.commons.testing</artifactId>
-            <version>2.0.16</version>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 </project>
diff --git a/src/main/java/org/apache/sling/validation/testservices/ResourcePresence.java b/src/main/java/org/apache/sling/validation/testservices/ResourcePresence.java
new file mode 100644
index 0000000..6a414a1
--- /dev/null
+++ b/src/main/java/org/apache/sling/validation/testservices/ResourcePresence.java
@@ -0,0 +1,26 @@
+/*
+ * 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.validation.testservices;
+
+import org.osgi.annotation.versioning.ProviderType;
+
+@ProviderType
+public interface ResourcePresence {
+
+}
diff --git a/src/main/java/org/apache/sling/validation/testservices/internal/ResourcePresenter.java b/src/main/java/org/apache/sling/validation/testservices/internal/ResourcePresenter.java
new file mode 100644
index 0000000..7043488
--- /dev/null
+++ b/src/main/java/org/apache/sling/validation/testservices/internal/ResourcePresenter.java
@@ -0,0 +1,131 @@
+/*
+ * 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.validation.testservices.internal;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+import java.util.List;
+
+import javax.annotation.Nonnull;
+
+import org.apache.sling.api.resource.LoginException;
+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.resource.observation.ResourceChange;
+import org.apache.sling.api.resource.observation.ResourceChangeListener;
+import org.apache.sling.validation.testservices.ResourcePresence;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Reference;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Component(
+    service = ResourceChangeListener.class,
+    immediate = true,
+    property = {
+        "resource.paths=/apps/sling/validation"
+    }
+)
+public class ResourcePresenter implements ResourceChangeListener {
+
+    @Reference
+    private ResourceResolverFactory resourceResolverFactory;
+
+    private ServiceRegistration<ResourcePresence> model;
+
+    private DefaultResourcePresence resourcePresence = new DefaultResourcePresence("/apps/sling/validation/models/model1");
+
+    private BundleContext bundleContext;
+
+    private final Logger logger = LoggerFactory.getLogger(ResourcePresenter.class);
+
+    @Activate
+    public void activate(final BundleContext bundleContext) {
+        this.bundleContext = bundleContext;
+        try (final ResourceResolver resourceResolver = getServiceResourceResolver()) {
+            final Resource validation = resourceResolver.getResource("/apps/sling/validation/models/model1");
+            if (validation != null) {
+                registerResourcePresence();
+            }
+        } catch (LoginException e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+    @Deactivate
+    public void deactivate(final BundleContext bundleContext) {
+        unregisterResourcePresence();
+    }
+
+    @Override
+    public void onChange(@Nonnull List<ResourceChange> list) {
+        for (ResourceChange resourceChange : list) {
+            logger.info("resource change at {}: {}", resourceChange.getPath(), resourceChange.getType());
+            if (resourcePresence.getPath().equals(resourceChange.getPath())) {
+                switch (resourceChange.getType()) {
+                    case ADDED:
+                        registerResourcePresence();
+                        break;
+                    case REMOVED:
+                        unregisterResourcePresence();
+                        break;
+                    default:
+                        break;
+                }
+            }
+        }
+    }
+
+    private ResourceResolver getServiceResourceResolver() throws LoginException {
+        return resourceResolverFactory.getServiceResourceResolver(null);
+    }
+
+    private void registerResourcePresence() {
+        final Dictionary<String, Object> properties = new Hashtable<>();
+        properties.put("path", resourcePresence.getPath());
+        this.model = bundleContext.registerService(ResourcePresence.class, resourcePresence, properties);
+        logger.info("resource presence for {} registered", resourcePresence.getPath());
+    }
+
+    private void unregisterResourcePresence() {
+        if (model != null) {
+            model.unregister();
+            logger.info("resource presence for {} unregistered", resourcePresence.getPath());
+        }
+    }
+
+    private class DefaultResourcePresence implements ResourcePresence {
+
+        private final String path;
+
+        DefaultResourcePresence(final String path) {
+            this.path = path;
+        }
+
+        public String getPath() {
+            return path;
+        }
+    }
+
+}
diff --git a/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java b/src/main/java/org/apache/sling/validation/testservices/internal/ValidationPostOperation.java
similarity index 87%
rename from src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java
rename to src/main/java/org/apache/sling/validation/testservices/internal/ValidationPostOperation.java
index a05008e..a829340 100644
--- a/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java
+++ b/src/main/java/org/apache/sling/validation/testservices/internal/ValidationPostOperation.java
@@ -16,18 +16,13 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.validation.testservices;
+package org.apache.sling.validation.testservices.internal;
 
 import java.util.Enumeration;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
-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;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.wrappers.ValueMapDecorator;
 import org.apache.sling.servlets.post.AbstractPostOperation;
@@ -37,17 +32,17 @@ import org.apache.sling.servlets.post.PostResponse;
 import org.apache.sling.validation.ValidationResult;
 import org.apache.sling.validation.ValidationService;
 import org.apache.sling.validation.model.ValidationModel;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@Component()
-@Service(PostOperation.class)
-@Properties({
-    @Property(
-        name = PostOperation.PROP_OPERATION_NAME,
-        value = "validation"
-    )
-})
+@Component(
+    service = PostOperation.class,
+    property = {
+        PostOperation.PROP_OPERATION_NAME + "=validation"
+    }
+)
 public class ValidationPostOperation extends AbstractPostOperation {
 
     private final Logger logger = LoggerFactory.getLogger(ValidationPostOperation.class);
diff --git a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java b/src/main/java/org/apache/sling/validation/testservices/internal/ValidationPostResponse.java
similarity index 98%
rename from src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
rename to src/main/java/org/apache/sling/validation/testservices/internal/ValidationPostResponse.java
index c023f0e..ed04681 100644
--- a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
+++ b/src/main/java/org/apache/sling/validation/testservices/internal/ValidationPostResponse.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.validation.testservices;
+package org.apache.sling.validation.testservices.internal;
 
 import java.io.IOException;
 import java.io.PrintWriter;
diff --git a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponseCreator.java b/src/main/java/org/apache/sling/validation/testservices/internal/ValidationPostResponseCreator.java
similarity index 71%
rename from src/main/java/org/apache/sling/validation/testservices/ValidationPostResponseCreator.java
rename to src/main/java/org/apache/sling/validation/testservices/internal/ValidationPostResponseCreator.java
index a884749..7446b42 100644
--- a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponseCreator.java
+++ b/src/main/java/org/apache/sling/validation/testservices/internal/ValidationPostResponseCreator.java
@@ -16,26 +16,33 @@
  * specific language governing permissions and limitations
  * under the License.
  */
- package org.apache.sling.validation.testservices;
+ package org.apache.sling.validation.testservices.internal;
 
 import java.util.Locale;
+import java.util.ResourceBundle;
 
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.servlets.post.PostResponse;
 import org.apache.sling.servlets.post.PostResponseCreator;
 import org.apache.sling.servlets.post.SlingPostConstants;
+import org.osgi.service.component.annotations.Component;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
-@Component()
-@Service(PostResponseCreator.class)
+@Component(
+    service = PostResponseCreator.class
+)
 public class ValidationPostResponseCreator implements PostResponseCreator {
 
+    private final Logger logger = LoggerFactory.getLogger(ValidationPostResponseCreator.class);
+
     @Override
     public PostResponse createPostResponse(SlingHttpServletRequest request) {
         String operation = request.getParameter(SlingPostConstants.RP_OPERATION);
         if (operation != null && "validation".equals(operation)) {
-            return new ValidationPostResponse(request.getResourceBundle(Locale.US));
+            final ResourceBundle resourceBundle = request.getResourceBundle(Locale.US);
+            logger.debug("resource bundle: {}", resourceBundle);
+            return new ValidationPostResponse(resourceBundle);
         }
         return null;
     }

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

[sling-org-apache-sling-validation-test-services] 05/33: Set relative path

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit f94bae1178764cfc247633d2a7de4dc935c76c7e
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Apr 15 07:58:51 2015 +0000

    Set relative path
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1673672 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pom.xml b/pom.xml
index 005de3b..a09cb2b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,6 +25,7 @@
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
         <version>22</version>
+        <relativePath/>
     </parent>
 
     <artifactId>org.apache.sling.validation.test-services</artifactId>

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

[sling-org-apache-sling-validation-test-services] 11/33: SLING-4876 support resource type inheritance for validator models

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit b04ec15f3efcf0ff451924665d32a877f16ccbce
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Wed Jul 29 07:22:46 2015 +0000

    SLING-4876 support resource type inheritance for validator models
    
    This closes #100
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1693191 13f79535-47bb-0310-9956-ffa450edef68
---
 .../apache/sling/validation/testservices/ValidationPostOperation.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java b/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java
index 2866318..84faec2 100644
--- a/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java
+++ b/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java
@@ -64,7 +64,7 @@ public class ValidationPostOperation extends AbstractPostOperation {
             }
             if (resourceType != null && !"".equals(resourceType)) {
                 String resourcePath = request.getRequestPathInfo().getResourcePath();
-                ValidationModel vm = validationService.getValidationModel(resourceType, resourcePath);
+                ValidationModel vm = validationService.getValidationModel(resourceType, resourcePath, false);
                 if (vm != null) {
                     ValidationResult vr = validationService.validate(requestParameters, vm);
                     vpr.setValidationResult(vr);

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

[sling-org-apache-sling-validation-test-services] 10/33: set parent version to 24 and add empty relativePath where missing

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit a1151169e2f9cd60740da45d22492e2a72546044
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Jul 7 08:09:17 2015 +0000

    set parent version to 24 and add empty relativePath where missing
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1689593 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index c4984a6..419ec2f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>23</version>
+        <version>24</version>
         <relativePath/>
     </parent>
 

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

[sling-org-apache-sling-validation-test-services] 21/33: use Sling Parent 30

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit b152b95064a30b21a67692cb25c86245992b7042
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Mon Mar 6 10:22:30 2017 +0000

    use Sling Parent 30
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1785621 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index d386827..23d27ee 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>29</version>
+        <version>30</version>
         <relativePath/>
     </parent>
 

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

[sling-org-apache-sling-validation-test-services] 17/33: use Sling parent 29

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 9944da0412f278b8ebf87cf6466ea273bc3ad109
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Thu Feb 2 15:26:12 2017 +0000

    use Sling parent 29
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1781404 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index 1f50b5c..9102cc5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>26</version>
+        <version>29</version>
         <relativePath/>
     </parent>
 
@@ -68,17 +68,17 @@
     <dependencies>
         <dependency>
             <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
+            <artifactId>javax.servlet-api</artifactId>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
+            <artifactId>osgi.cmpn</artifactId>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
+            <artifactId>osgi.core</artifactId>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -89,7 +89,6 @@
         <dependency>
             <groupId>com.google.code.findbugs</groupId>
             <artifactId>jsr305</artifactId>
-            <version>3.0.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

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

[sling-org-apache-sling-validation-test-services] 12/33: Update the main reactor to parent 25

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit c74ba4f890b9e111265f29513d6f65695261abe1
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Oct 5 10:03:45 2015 +0000

    Update the main reactor to parent 25
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1706780 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 419ec2f..891c214 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>24</version>
+        <version>25</version>
         <relativePath/>
     </parent>
 

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

[sling-org-apache-sling-validation-test-services] 25/33: prevent overwriting of parts of the repository which are not affected by test content

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 5fd6395fea7a14879a30b150109e54efdf3cdac1
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Thu Mar 23 13:48:17 2017 +0000

    prevent overwriting of parts of the repository which are not affected by test content
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1788240 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 72cd222..9988adf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -46,7 +46,7 @@
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
-                        <Sling-Initial-Content>SLING-CONTENT;overwrite:=true</Sling-Initial-Content>
+                        <Sling-Initial-Content>SLING-CONTENT/apps/sling/validation;overwrite:=true;path=/apps/sling/validation</Sling-Initial-Content>
                     </instructions>
                 </configuration>
             </plugin>

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

[sling-org-apache-sling-validation-test-services] 03/33: SLING 4606 move validation from contrib to /

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 1a5800b9496be40fe669d0b48e3fb34b275bb36d
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Fri Apr 10 13:22:08 2015 +0000

    SLING 4606 move validation from contrib to /
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1672647 13f79535-47bb-0310-9956-ffa450edef68

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

[sling-org-apache-sling-validation-test-services] 18/33: SLING-5590 Move Sling HTTP Servlet Request Adaptor Factory out of Validation Core

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 7f86595d7cc537a3fa3513cfe9959dbd04165c4a
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Thu Feb 2 15:34:58 2017 +0000

    SLING-5590 Move Sling HTTP Servlet Request Adaptor Factory out of Validation Core
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1781406 13f79535-47bb-0310-9956-ffa450edef68
---
 .../testservices/ValidationPostOperation.java      | 45 +++++++++++++---------
 1 file changed, 27 insertions(+), 18 deletions(-)

diff --git a/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java b/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java
index 84faec2..a05008e 100644
--- a/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java
+++ b/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java
@@ -18,7 +18,10 @@
  */
 package org.apache.sling.validation.testservices;
 
+import java.util.Enumeration;
+import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Properties;
@@ -26,7 +29,7 @@ import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.api.SlingHttpServletRequest;
-import org.apache.sling.api.resource.ValueMap;
+import org.apache.sling.api.wrappers.ValueMapDecorator;
 import org.apache.sling.servlets.post.AbstractPostOperation;
 import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.PostOperation;
@@ -40,14 +43,14 @@ import org.slf4j.LoggerFactory;
 @Component()
 @Service(PostOperation.class)
 @Properties({
-        @Property(
-                name = PostOperation.PROP_OPERATION_NAME,
-                value = "validation"
-        )
+    @Property(
+        name = PostOperation.PROP_OPERATION_NAME,
+        value = "validation"
+    )
 })
 public class ValidationPostOperation extends AbstractPostOperation {
 
-    private static final Logger LOG = LoggerFactory.getLogger(ValidationPostOperation.class);
+    private final Logger logger = LoggerFactory.getLogger(ValidationPostOperation.class);
 
     @Reference
     private ValidationService validationService;
@@ -55,23 +58,29 @@ public class ValidationPostOperation extends AbstractPostOperation {
     @Override
     protected void doRun(SlingHttpServletRequest request, PostResponse response, List<Modification> changes) {
         if (response instanceof ValidationPostResponse) {
-            ValidationPostResponse vpr = (ValidationPostResponse) response;
-            ValueMap requestParameters = request.adaptTo(ValueMap.class);
-            String[] resourceTypeValues = requestParameters.get("sling:resourceType", String[].class);
-            String resourceType = null;
-            if (resourceTypeValues != null && resourceTypeValues.length > 0) {
-                resourceType = resourceTypeValues[0];
+            final Map<String, Object> base = new LinkedHashMap<>();
+            final ValueMapDecorator valueMap = new ValueMapDecorator(base);
+            final Enumeration<String> names = request.getParameterNames();
+            while (names.hasMoreElements()) {
+                final String name = names.nextElement();
+                valueMap.put(name, request.getRequestParameter(name).getString());
             }
+
+            final String resourceType = request.getRequestParameter("sling:resourceType").getString();
             if (resourceType != null && !"".equals(resourceType)) {
-                String resourcePath = request.getRequestPathInfo().getResourcePath();
-                ValidationModel vm = validationService.getValidationModel(resourceType, resourcePath, false);
-                if (vm != null) {
-                    ValidationResult vr = validationService.validate(requestParameters, vm);
-                    vpr.setValidationResult(vr);
+                final String resourcePath = request.getRequestPathInfo().getResourcePath();
+                final ValidationModel validationModel = validationService.getValidationModel(resourceType, resourcePath, false);
+                if (validationModel != null) {
+                    final ValidationResult validationResult = validationService.validate(valueMap, validationModel);
+                    final ValidationPostResponse validationPostResponse = (ValidationPostResponse) response;
+                    validationPostResponse.setValidationResult(validationResult);
                 } else {
-                    LOG.error("No validation model for resourceType {} and resourcePath {} ", resourceType, resourcePath);
+                    logger.error("No validation model for resourceType {} and resourcePath {} ", resourceType, resourcePath);
                 }
+            } else {
+                logger.error("resource type is empty");
             }
         }
     }
+
 }

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

[sling-org-apache-sling-validation-test-services] 09/33: Remove superflous sling.java.version=6 as it's the default now

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit ce95a6a32f18fb3f288c1ffe9706d92d1d1adff3
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Jun 25 13:14:53 2015 +0000

    Remove superflous sling.java.version=6 as it's the default now
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1687505 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 8372fc5..c4984a6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,10 +34,6 @@
 
     <name>Apache Sling Validation Framework Testing Services</name>
 
-    <properties>
-        <sling.java.version>6</sling.java.version>
-    </properties>
-    
     <scm>
         <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services</connection>
         <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services</developerConnection>

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

[sling-org-apache-sling-validation-test-services] 28/33: SLING-6727 adjust test validation model to new property name

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 494a9cc0a651542f73bc61dd5e3eb2e54ba779e0
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Wed Mar 29 12:43:00 2017 +0000

    SLING-6727 adjust test validation model to new property name
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1789351 13f79535-47bb-0310-9956-ffa450edef68
---
 .../resources/SLING-CONTENT/apps/sling/validation/models/model1.json    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json b/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
index 4a0fc61..c568966 100644
--- a/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
+++ b/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
@@ -1,5 +1,5 @@
 {
-    "validatedResourceType": "validation/test/resourceType1",
+    "validatingResourceType": "validation/test/resourceType1",
     "applicablePaths": [
         "/validation/testing/fakeFolder1",
 		"/content/validated"

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

[sling-org-apache-sling-validation-test-services] 16/33: SLING-5373 allow to set severity per validator in the model

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit a449cb4b8d6d68bb31ebed83354f4e2a0ec36f16
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Fri Mar 11 11:13:32 2016 +0000

    SLING-5373 allow to set severity per validator in the model
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1734530 13f79535-47bb-0310-9956-ffa450edef68
---
 .../apache/sling/validation/testservices/ValidationPostResponse.java   | 1 +
 .../resources/SLING-CONTENT/apps/sling/validation/models/model1.json   | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java b/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
index 8cd45d8..c023f0e 100644
--- a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
+++ b/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
@@ -62,6 +62,7 @@ public class ValidationPostResponse extends AbstractPostResponse {
                     JSONObject failureJson = new JSONObject();
                     failureJson.put("message", failure.getMessage(resourceBundle));
                     failureJson.put("location", failure.getLocation());
+                    failureJson.put("severity", failure.getSeverity());
                     failures.put(failureJson);
                 }
                 jsonResponse.put("failures", failures);
diff --git a/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json b/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
index 85ad3bc..c7a70be 100644
--- a/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
+++ b/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
@@ -13,7 +13,8 @@
                 "jcr:primaryType" : "nt:unstructured",
                 "org.apache.sling.validation.impl.validators.RegexValidator": {
                     "jcr:primaryType" : "nt:unstructured",
-                    "validatorArguments" : ["regex=^\\\p{Upper}+$"]
+                    "validatorArguments" : ["regex=^\\\p{Upper}+$"],
+                    "severity" : "10"
                 }
             }
         },

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

[sling-org-apache-sling-validation-test-services] 27/33: SLING-6515 provide a PostProcessor which validates the newly generated resouce

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 533713d510b31f123aef16364eb40a1d797566ba
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Wed Mar 29 09:12:37 2017 +0000

    SLING-6515 provide a PostProcessor which validates the newly generated resouce
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1789300 13f79535-47bb-0310-9956-ffa450edef68
---
 .../resources/SLING-CONTENT/apps/sling/validation/models/model1.json   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json b/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
index 008025c..4a0fc61 100644
--- a/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
+++ b/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
@@ -1,7 +1,8 @@
 {
     "validatedResourceType": "validation/test/resourceType1",
     "applicablePaths": [
-        "/validation/testing/fakeFolder1"
+        "/validation/testing/fakeFolder1",
+		"/content/validated"
     ],
     "sling:resourceType": "sling/validation/model",
     "properties": {

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

[sling-org-apache-sling-validation-test-services] 14/33: Switch to parent pom 26

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit cbdf22a4c63ecca99e224a27931cfd4fd7636075
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun Jan 3 14:07:46 2016 +0000

    Switch to parent pom 26
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1722720 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 891c214..0081deb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>25</version>
+        <version>26</version>
         <relativePath/>
     </parent>
 

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

[sling-org-apache-sling-validation-test-services] 01/33: SLING-2803 - validation module contribution, by Radu Cotescu, thanks!

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 591fdd962b18c9cea8f5ca7ecbb4c958cb5c5033
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Tue Oct 7 15:10:37 2014 +0000

    SLING-2803 - validation module contribution, by Radu Cotescu, thanks!
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/validation/test-services@1629907 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            | 134 +++++++++++++++++++++
 .../testservices/ValidationPostOperation.java      |  80 ++++++++++++
 .../testservices/ValidationPostResponse.java       |  71 +++++++++++
 .../ValidationPostResponseCreator.java             |  22 ++++
 .../apps/sling/validation/models.json              |   3 +
 .../apps/sling/validation/models/model1.json       |  25 ++++
 6 files changed, 335 insertions(+)

diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..f484157
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>org.apache.sling</groupId>
+        <artifactId>sling</artifactId>
+        <version>15</version>
+        <relativePath />
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>org.apache.sling.validation.test-services</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>Apache Sling Validation Framework Testing Services</name>
+
+    <properties>
+        <sling.java.version>6</sling.java.version>
+    </properties>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+                <version>1.11.0</version>
+                <executions>
+                    <execution>
+                        <id>generate-scr-descriptor</id>
+                        <goals>
+                            <goal>scr</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Sling-Initial-Content>SLING-CONTENT;overwrite:=true</Sling-Initial-Content>
+                        <Export-Package>
+                            !org.apache.sling.validation.testservices
+                        </Export-Package>
+                        <Private-Package>
+                            org.apache.sling.validation.testservices
+                        </Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+            <version>1.9.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.api</artifactId>
+            <version>2.4.2</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.servlets.post</artifactId>
+            <version>2.2.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.validation.api</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.commons.json</artifactId>
+            <version>2.0.6</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.commons.testing</artifactId>
+            <version>2.0.14</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java b/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java
new file mode 100644
index 0000000..408c058
--- /dev/null
+++ b/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java
@@ -0,0 +1,80 @@
+/*
+ * 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.validation.testservices;
+
+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;
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.resource.ValueMap;
+import org.apache.sling.commons.json.JSONObject;
+import org.apache.sling.servlets.post.AbstractPostOperation;
+import org.apache.sling.servlets.post.Modification;
+import org.apache.sling.servlets.post.PostOperation;
+import org.apache.sling.servlets.post.PostResponse;
+import org.apache.sling.validation.api.ValidationModel;
+import org.apache.sling.validation.api.ValidationResult;
+import org.apache.sling.validation.api.ValidationService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.jcr.RepositoryException;
+import java.util.List;
+
+@Component()
+@Service(PostOperation.class)
+@Properties({
+        @Property(
+                name = PostOperation.PROP_OPERATION_NAME,
+                value = "validation",
+                propertyPrivate = true
+        )
+})
+public class ValidationPostOperation extends AbstractPostOperation {
+
+    private static final Logger LOG = LoggerFactory.getLogger(ValidationPostOperation.class);
+
+    @Reference
+    private ValidationService validationService;
+
+    @Override
+    protected void doRun(SlingHttpServletRequest request, PostResponse response, List<Modification> changes) throws RepositoryException {
+        if (response instanceof ValidationPostResponse) {
+            ValidationPostResponse vpr = (ValidationPostResponse) response;
+            ValueMap requestParameters = request.adaptTo(ValueMap.class);
+            String[] resourceTypeValues = requestParameters.get("sling:resourceType", String[].class);
+            String resourceType = null;
+            if (resourceTypeValues != null && resourceTypeValues.length > 0) {
+                resourceType = resourceTypeValues[0];
+            }
+            if (resourceType != null && !"".equals(resourceType)) {
+                String resourcePath = request.getRequestPathInfo().getResourcePath();
+                ValidationModel vm = validationService.getValidationModel(resourceType, resourcePath);
+                if (vm != null) {
+                    ValidationResult vr = validationService.validate(requestParameters, vm);
+                    vpr.setValidationResult(vr);
+                } else {
+                    LOG.error("No validation model for resourceType {} and resourcePath {} ", resourceType, resourcePath);
+                }
+            }
+        }
+    }
+}
diff --git a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java b/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
new file mode 100644
index 0000000..be9a64d
--- /dev/null
+++ b/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
@@ -0,0 +1,71 @@
+/*
+ * 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.validation.testservices;
+
+import org.apache.sling.commons.json.JSONException;
+import org.apache.sling.commons.json.JSONObject;
+import org.apache.sling.servlets.post.AbstractPostResponse;
+import org.apache.sling.validation.api.ValidationResult;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.List;
+import java.util.Map;
+
+public class ValidationPostResponse extends AbstractPostResponse {
+
+    private ValidationResult validationResult;
+    private static final Logger LOG = LoggerFactory.getLogger(ValidationPostResponse.class);
+
+    public void setValidationResult(ValidationResult validationResult) {
+        this.validationResult = validationResult;
+    }
+
+    @Override
+    protected void doSend(HttpServletResponse response) throws IOException {
+        response.setContentType("application/json");
+        PrintWriter printWriter = response.getWriter();
+        JSONObject jsonResponse = new JSONObject();
+        boolean validationError = false;
+        if (validationResult != null) {
+            try {
+                jsonResponse.put("valid", validationResult.isValid());
+                for (Map.Entry<String, List<String>> entry : validationResult.getFailureMessages().entrySet()) {
+                    jsonResponse.put(entry.getKey(), entry.getValue());
+                }
+            } catch (JSONException e) {
+                LOG.error("JSON error during response send operation.", e);
+            }
+        } else {
+            validationError = true;
+        }
+        printWriter.write(jsonResponse.toString());
+        if (validationError) {
+            response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
+        }
+    }
+
+    @Override
+    public void onChange(String type, String... arguments) {
+        // NOOP
+    }
+}
diff --git a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponseCreator.java b/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponseCreator.java
new file mode 100644
index 0000000..27967ae
--- /dev/null
+++ b/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponseCreator.java
@@ -0,0 +1,22 @@
+package org.apache.sling.validation.testservices;
+
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Service;
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.servlets.post.PostResponse;
+import org.apache.sling.servlets.post.PostResponseCreator;
+import org.apache.sling.servlets.post.SlingPostConstants;
+
+@Component()
+@Service(PostResponseCreator.class)
+public class ValidationPostResponseCreator implements PostResponseCreator {
+
+    @Override
+    public PostResponse createPostResponse(SlingHttpServletRequest request) {
+        String operation = request.getParameter(SlingPostConstants.RP_OPERATION);
+        if (operation != null && "validation".equals(operation)) {
+            return new ValidationPostResponse();
+        }
+        return null;
+    }
+}
diff --git a/src/main/resources/SLING-CONTENT/apps/sling/validation/models.json b/src/main/resources/SLING-CONTENT/apps/sling/validation/models.json
new file mode 100644
index 0000000..225e5ce
--- /dev/null
+++ b/src/main/resources/SLING-CONTENT/apps/sling/validation/models.json
@@ -0,0 +1,3 @@
+{
+    "jcr:primaryType" : "sling:Folder"
+}
diff --git a/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json b/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
new file mode 100644
index 0000000..8b59679
--- /dev/null
+++ b/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
@@ -0,0 +1,25 @@
+{
+    "validatedResourceType": "validation/test/resourceType1",
+    "applicablePaths": [
+        "/validation/testing/fakeFolder1"
+    ],
+    "sling:resourceType": "sling/validation/model",
+    "properties": {
+        "jcr:primaryType" : "nt:unstructured",
+        "field1": {
+            "jcr:primaryType" : "nt:unstructured",
+            "propertyType": "string",
+            "validators": {
+                "jcr:primaryType" : "nt:unstructured",
+                "org.apache.sling.validation.impl.validators.RegexValidator": {
+                    "jcr:primaryType" : "nt:unstructured",
+                    "validatorArguments" : ["regex=^\\p{L}+$"]
+                }
+            }
+        },
+        "field2" : {
+            "jcr:primaryType" : "nt:unstructured",
+            "propertyType" : "date"
+        }
+    }
+}

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

[sling-org-apache-sling-validation-test-services] 29/33: [maven-release-plugin] prepare for next development iteration

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 4f1ab77f1f3c318605a5be3eeb5d7f9bb0a92132
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Wed Apr 5 12:53:17 2017 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1790227 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index b2918c5..b1503fa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
     </parent>
 
     <artifactId>org.apache.sling.validation.test-services</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
+    <version>1.0.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Validation Framework Testing Services</name>

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

[sling-org-apache-sling-validation-test-services] 24/33: remove resource presence and presenter

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 9a03d09aa6aa643908e63a76227a16be81571bc7
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Sat Mar 18 15:42:01 2017 +0000

    remove resource presence and presenter
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1787571 13f79535-47bb-0310-9956-ffa450edef68
---
 .../validation/testservices/ResourcePresence.java  |  26 ----
 .../testservices/internal/ResourcePresenter.java   | 131 ---------------------
 2 files changed, 157 deletions(-)

diff --git a/src/main/java/org/apache/sling/validation/testservices/ResourcePresence.java b/src/main/java/org/apache/sling/validation/testservices/ResourcePresence.java
deleted file mode 100644
index 6a414a1..0000000
--- a/src/main/java/org/apache/sling/validation/testservices/ResourcePresence.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.validation.testservices;
-
-import org.osgi.annotation.versioning.ProviderType;
-
-@ProviderType
-public interface ResourcePresence {
-
-}
diff --git a/src/main/java/org/apache/sling/validation/testservices/internal/ResourcePresenter.java b/src/main/java/org/apache/sling/validation/testservices/internal/ResourcePresenter.java
deleted file mode 100644
index 7043488..0000000
--- a/src/main/java/org/apache/sling/validation/testservices/internal/ResourcePresenter.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * 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.validation.testservices.internal;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-import java.util.List;
-
-import javax.annotation.Nonnull;
-
-import org.apache.sling.api.resource.LoginException;
-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.resource.observation.ResourceChange;
-import org.apache.sling.api.resource.observation.ResourceChangeListener;
-import org.apache.sling.validation.testservices.ResourcePresence;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.service.component.annotations.Activate;
-import org.osgi.service.component.annotations.Component;
-import org.osgi.service.component.annotations.Deactivate;
-import org.osgi.service.component.annotations.Reference;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@Component(
-    service = ResourceChangeListener.class,
-    immediate = true,
-    property = {
-        "resource.paths=/apps/sling/validation"
-    }
-)
-public class ResourcePresenter implements ResourceChangeListener {
-
-    @Reference
-    private ResourceResolverFactory resourceResolverFactory;
-
-    private ServiceRegistration<ResourcePresence> model;
-
-    private DefaultResourcePresence resourcePresence = new DefaultResourcePresence("/apps/sling/validation/models/model1");
-
-    private BundleContext bundleContext;
-
-    private final Logger logger = LoggerFactory.getLogger(ResourcePresenter.class);
-
-    @Activate
-    public void activate(final BundleContext bundleContext) {
-        this.bundleContext = bundleContext;
-        try (final ResourceResolver resourceResolver = getServiceResourceResolver()) {
-            final Resource validation = resourceResolver.getResource("/apps/sling/validation/models/model1");
-            if (validation != null) {
-                registerResourcePresence();
-            }
-        } catch (LoginException e) {
-            logger.error(e.getMessage(), e);
-        }
-    }
-
-    @Deactivate
-    public void deactivate(final BundleContext bundleContext) {
-        unregisterResourcePresence();
-    }
-
-    @Override
-    public void onChange(@Nonnull List<ResourceChange> list) {
-        for (ResourceChange resourceChange : list) {
-            logger.info("resource change at {}: {}", resourceChange.getPath(), resourceChange.getType());
-            if (resourcePresence.getPath().equals(resourceChange.getPath())) {
-                switch (resourceChange.getType()) {
-                    case ADDED:
-                        registerResourcePresence();
-                        break;
-                    case REMOVED:
-                        unregisterResourcePresence();
-                        break;
-                    default:
-                        break;
-                }
-            }
-        }
-    }
-
-    private ResourceResolver getServiceResourceResolver() throws LoginException {
-        return resourceResolverFactory.getServiceResourceResolver(null);
-    }
-
-    private void registerResourcePresence() {
-        final Dictionary<String, Object> properties = new Hashtable<>();
-        properties.put("path", resourcePresence.getPath());
-        this.model = bundleContext.registerService(ResourcePresence.class, resourcePresence, properties);
-        logger.info("resource presence for {} registered", resourcePresence.getPath());
-    }
-
-    private void unregisterResourcePresence() {
-        if (model != null) {
-            model.unregister();
-            logger.info("resource presence for {} unregistered", resourcePresence.getPath());
-        }
-    }
-
-    private class DefaultResourcePresence implements ResourcePresence {
-
-        private final String path;
-
-        DefaultResourcePresence(final String path) {
-            this.path = path;
-        }
-
-        public String getPath() {
-            return path;
-        }
-    }
-
-}

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

[sling-org-apache-sling-validation-test-services] 26/33: fix path parameter directive (fixes IT)

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 6271cfe2f1a6400b0e9577c92417c65cd5d887f6
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Mon Mar 27 12:12:13 2017 +0000

    fix path parameter directive (fixes IT)
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1788918 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 9988adf..b2918c5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -46,7 +46,7 @@
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
-                        <Sling-Initial-Content>SLING-CONTENT/apps/sling/validation;overwrite:=true;path=/apps/sling/validation</Sling-Initial-Content>
+                        <Sling-Initial-Content>SLING-CONTENT/apps/sling/validation;overwrite:=true;path:=/apps/sling/validation</Sling-Initial-Content>
                     </instructions>
                 </configuration>
             </plugin>

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

[sling-org-apache-sling-validation-test-services] 33/33: [maven-release-plugin] copy for tag org.apache.sling.validation.test-services-1.0.0

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 93d67067b90ac5dfee57c43eaad78f8a33df3a5e
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Wed Apr 5 13:33:08 2017 +0000

    [maven-release-plugin] copy for tag org.apache.sling.validation.test-services-1.0.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.validation.test-services-1.0.0@1790251 13f79535-47bb-0310-9956-ffa450edef68

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

[sling-org-apache-sling-validation-test-services] 02/33: SLING-4187 Move XSS and Validation to Extensions

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit efa2bce2a11008362e748b27ad7aaca4fde85cc3
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Wed Nov 19 11:19:23 2014 +0000

    SLING-4187 Move XSS and Validation to Extensions
    
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/validation/test-services@1640525 13f79535-47bb-0310-9956-ffa450edef68

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

[sling-org-apache-sling-validation-test-services] 15/33: SLING-4213 leverage sling-i18n for validation failure messages

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit e62bde346ad31052bf62fad5b963c7aa51e08db4
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Fri Jan 8 08:51:00 2016 +0000

    SLING-4213 leverage sling-i18n for validation failure messages
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1723664 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                                       |  6 ++++++
 .../sling/validation/testservices/ValidationPostResponse.java | 11 ++++++++---
 .../testservices/ValidationPostResponseCreator.java           |  4 +++-
 .../SLING-CONTENT/apps/sling/validation/models/model1.json    |  5 ++---
 4 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/pom.xml b/pom.xml
index 0081deb..1f50b5c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -87,6 +87,12 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>jsr305</artifactId>
+            <version>3.0.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.api</artifactId>
             <version>2.4.2</version>
diff --git a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java b/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
index 4b71762..8cd45d8 100644
--- a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
+++ b/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
@@ -20,9 +20,9 @@ package org.apache.sling.validation.testservices;
 
 import java.io.IOException;
 import java.io.PrintWriter;
-import java.util.List;
-import java.util.Map;
+import java.util.ResourceBundle;
 
+import javax.annotation.Nonnull;
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.sling.commons.json.JSONArray;
@@ -37,8 +37,13 @@ import org.slf4j.LoggerFactory;
 public class ValidationPostResponse extends AbstractPostResponse {
 
     private ValidationResult validationResult;
+    private final ResourceBundle resourceBundle;
     private static final Logger LOG = LoggerFactory.getLogger(ValidationPostResponse.class);
 
+    public ValidationPostResponse(@Nonnull ResourceBundle resourceBundle) {
+        this.resourceBundle = resourceBundle;
+    }
+
     public void setValidationResult(ValidationResult validationResult) {
         this.validationResult = validationResult;
     }
@@ -55,7 +60,7 @@ public class ValidationPostResponse extends AbstractPostResponse {
                 JSONArray failures = new JSONArray();
                 for (ValidationFailure failure : validationResult.getFailures()) {
                     JSONObject failureJson = new JSONObject();
-                    failureJson.put("message", failure.getMessage());
+                    failureJson.put("message", failure.getMessage(resourceBundle));
                     failureJson.put("location", failure.getLocation());
                     failures.put(failureJson);
                 }
diff --git a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponseCreator.java b/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponseCreator.java
index d96c201..a884749 100644
--- a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponseCreator.java
+++ b/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponseCreator.java
@@ -18,6 +18,8 @@
  */
  package org.apache.sling.validation.testservices;
 
+import java.util.Locale;
+
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.api.SlingHttpServletRequest;
@@ -33,7 +35,7 @@ public class ValidationPostResponseCreator implements PostResponseCreator {
     public PostResponse createPostResponse(SlingHttpServletRequest request) {
         String operation = request.getParameter(SlingPostConstants.RP_OPERATION);
         if (operation != null && "validation".equals(operation)) {
-            return new ValidationPostResponse();
+            return new ValidationPostResponse(request.getResourceBundle(Locale.US));
         }
         return null;
     }
diff --git a/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json b/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
index 8b59679..85ad3bc 100644
--- a/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
+++ b/src/main/resources/SLING-CONTENT/apps/sling/validation/models/model1.json
@@ -13,13 +13,12 @@
                 "jcr:primaryType" : "nt:unstructured",
                 "org.apache.sling.validation.impl.validators.RegexValidator": {
                     "jcr:primaryType" : "nt:unstructured",
-                    "validatorArguments" : ["regex=^\\p{L}+$"]
+                    "validatorArguments" : ["regex=^\\\p{Upper}+$"]
                 }
             }
         },
         "field2" : {
-            "jcr:primaryType" : "nt:unstructured",
-            "propertyType" : "date"
+            "jcr:primaryType" : "nt:unstructured"
         }
     }
 }

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

[sling-org-apache-sling-validation-test-services] 32/33: [maven-release-plugin] prepare release org.apache.sling.validation.test-services-1.0.0

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 52733ee16b7db1562c2cfdc3d2ab9723605a55ca
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Wed Apr 5 13:32:54 2017 +0000

    [maven-release-plugin] prepare release org.apache.sling.validation.test-services-1.0.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1790250 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 21e3b01..5a76963 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,15 +27,15 @@
     </parent>
 
     <artifactId>org.apache.sling.validation.test-services</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
+    <version>1.0.0</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Validation Framework Testing Services</name>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services</connection>
-        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/validation/test-services</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.validation.test-services-1.0.0</connection>
+        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.validation.test-services-1.0.0</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.validation.test-services-1.0.0</url>
     </scm>
 
     <build>

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

[sling-org-apache-sling-validation-test-services] 30/33: revert failed release 1.0.0

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 335e596dd819b8b8488a38eaa9ded33abf1f729b
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Wed Apr 5 13:19:26 2017 +0000

    revert failed release 1.0.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1790242 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index b1503fa..b2918c5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
     </parent>
 
     <artifactId>org.apache.sling.validation.test-services</artifactId>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>1.0.0-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Validation Framework Testing Services</name>

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

[sling-org-apache-sling-validation-test-services] 31/33: rely on latest release

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 1a7dca7a3a3b43f0810c4ed8d8bb7424163add21
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Wed Apr 5 13:30:59 2017 +0000

    rely on latest release
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1790249 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index b2918c5..21e3b01 100644
--- a/pom.xml
+++ b/pom.xml
@@ -96,7 +96,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.validation.api</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
+            <version>1.0.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

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

[sling-org-apache-sling-validation-test-services] 23/33: clean up pom's for release

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit 163cab120a08980a7b69522081c2e313c03261be
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Thu Mar 16 14:53:52 2017 +0000

    clean up pom's for release
    
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1787198 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index bac3680..72cd222 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,15 +17,13 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
         <version>30</version>
-        <relativePath/>
+        <relativePath />
     </parent>
 
     <artifactId>org.apache.sling.validation.test-services</artifactId>

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

[sling-org-apache-sling-validation-test-services] 07/33: SLING-4777 decouple model provider from the validation service

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.validation.test-services-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-test-services.git

commit a431c3d94cbe741c55d4ab2558b44c2b9c80b03e
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Thu Jun 11 09:33:41 2015 +0000

    SLING-4777 decouple model provider from the validation service
    
    This closes #95
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/test-services@1684841 13f79535-47bb-0310-9956-ffa450edef68
---
 .../validation/testservices/ValidationPostOperation.java  |  6 +++---
 .../validation/testservices/ValidationPostResponse.java   | 15 ++++++++-------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java b/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java
index c350cea..2866318 100644
--- a/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java
+++ b/src/main/java/org/apache/sling/validation/testservices/ValidationPostOperation.java
@@ -31,9 +31,9 @@ import org.apache.sling.servlets.post.AbstractPostOperation;
 import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.PostOperation;
 import org.apache.sling.servlets.post.PostResponse;
-import org.apache.sling.validation.api.ValidationModel;
-import org.apache.sling.validation.api.ValidationResult;
-import org.apache.sling.validation.api.ValidationService;
+import org.apache.sling.validation.ValidationResult;
+import org.apache.sling.validation.ValidationService;
+import org.apache.sling.validation.model.ValidationModel;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java b/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
index be9a64d..f535c15 100644
--- a/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
+++ b/src/main/java/org/apache/sling/validation/testservices/ValidationPostResponse.java
@@ -18,19 +18,20 @@
  */
 package org.apache.sling.validation.testservices;
 
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletResponse;
+
 import org.apache.sling.commons.json.JSONException;
 import org.apache.sling.commons.json.JSONObject;
 import org.apache.sling.servlets.post.AbstractPostResponse;
-import org.apache.sling.validation.api.ValidationResult;
+import org.apache.sling.validation.ValidationResult;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.List;
-import java.util.Map;
-
 public class ValidationPostResponse extends AbstractPostResponse {
 
     private ValidationResult validationResult;

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