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/10/20 14:39:49 UTC

[sling-org-apache-sling-validation-examples] branch master created (now ccdc6c4)

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

rombert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git.


      at ccdc6c4  SLING-7167 Adjust READMEs

This branch includes the following new commits:

     new 73d0803  SLING 4606 move validation from contrib to /
     new 89994ce  use newest parent, get rid of JCR dependency, clean up POMs
     new 9f0191d  SLING-4609 more null annotations
     new 123e732  set path to parent pom
     new bf2c391  Use latest parent pom
     new e2fb4c0  SLING-4698 - Set parent.relativePath to empty for all modules
     new 00759fc  SLING-4777 decouple model provider from the validation service
     new 3b8a306  Update to Sling Parent 23
     new a3f159c  Remove superflous sling.java.version=6 as it's the default now
     new 3a31eac  set parent version to 24 and add empty relativePath where missing
     new e2a7fe0  SLING-4876 support resource type inheritance for validator models
     new 91cc4c3  Update the main reactor to parent 25
     new 52e4c8b  SLING-5026 - refactor validator interface to allow to set multiple failure messages
     new 81e6d18  Switch to parent pom 26
     new a12e67f  SLING-4213 leverage sling-i18n for validation failure messages
     new 1b36fb8  use Sling parent 29
     new 0236b13  use Sling Parent 30
     new 23495c8  clean up pom's for release
     new 8e51b76  SLING-6727 ValidationModel.getValidatedResourceType -> ValidationModel.getValidatingResourceType
     new 4ee6aae  [maven-release-plugin] prepare for next development iteration
     new 1732d43  revert failed release 1.0.0
     new 4ecde39  validation/examples: reference released version of validation.api
     new 9f4aa15  SLING-6914: Remove commons.json from bundles/extensions/validation/examples
     new ccdc6c4  SLING-7167 Adjust READMEs

The 24 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-examples] 14/24: 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 branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit 81e6d1826b5fed89d13515e99589f48f5fc5004c
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@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 2f5db83..67d26a8 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-examples] 05/24: Use latest parent pom

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

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit bf2c39177e175925334ccc8aab293dc4e5413434
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Apr 27 16:34:19 2015 +0000

    Use latest parent pom
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1676331 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 7eee172..c444b6b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>23-SNAPSHOT</version>
+        <version>22</version>
         <relativePath>../../../../parent/pom.xml</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-examples] 02/24: 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 branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit 89994ce64c797e401d875d1025ca862742dac510
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@1672911 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 27 ++++++++-------------------
 1 file changed, 8 insertions(+), 19 deletions(-)

diff --git a/pom.xml b/pom.xml
index ae1b515..d501ab3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,13 +20,13 @@
 <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>
+        <version>22</version>
         <relativePath/>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
 
     <artifactId>org.apache.sling.validation.examples</artifactId>
     <version>1.0.0-SNAPSHOT</version>
@@ -38,21 +38,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/examples</connection>
+        <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/examples</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/validation/examples</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>
@@ -96,12 +93,6 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>javax.jcr</groupId>
-            <artifactId>jcr</artifactId>
-            <version>2.0</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.api</artifactId>
             <version>2.4.2</version>
@@ -115,7 +106,6 @@
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.scr.annotations</artifactId>
-            <version>1.9.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -137,5 +127,4 @@
             <scope>provided</scope>
         </dependency>
     </dependencies>
-
 </project>

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

[sling-org-apache-sling-validation-examples] 11/24: 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 branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit e2a7fe0c54b2a2acf91f0024c8b7a69e415b0522
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@1693191 13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/org/apache/sling/validation/examples/models/UserModel.java     | 2 +-
 .../apache/sling/validation/examples/servlets/ModifyUserServlet.java    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/validation/examples/models/UserModel.java b/src/main/java/org/apache/sling/validation/examples/models/UserModel.java
index 471bf5d..f07c430 100644
--- a/src/main/java/org/apache/sling/validation/examples/models/UserModel.java
+++ b/src/main/java/org/apache/sling/validation/examples/models/UserModel.java
@@ -80,7 +80,7 @@ public class UserModel {
 
     @PostConstruct
     protected void validate() {
-        ValidationModel model = validationService.getValidationModel(resource);
+        ValidationModel model = validationService.getValidationModel(resource, false);
         if (model != null) {
             ValidationResult result = validationService.validate(resource, model);
             if (!result.isValid()) {
diff --git a/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java b/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
index 5fb92bc..e7a3944 100644
--- a/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
+++ b/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
@@ -58,7 +58,7 @@ public class ModifyUserServlet extends SlingAllMethodsServlet {
         }
         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);
                 if (vr.isValid()) {

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

[sling-org-apache-sling-validation-examples] 01/24: 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 branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit 73d0803df20e7e44a003e9d9fc27d782dcce0db5
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@1672647 13f79535-47bb-0310-9956-ffa450edef68
---
 README.md                                          |  26 ++++
 pom.xml                                            | 141 +++++++++++++++++++++
 .../validation/examples/models/UserModel.java      |  91 +++++++++++++
 .../examples/servlets/ModifyUserServlet.java       |  92 ++++++++++++++
 src/main/resources/SLING-INF/apps/sling.json       |   3 +
 .../resources/SLING-INF/apps/sling/validation.json |   3 +
 .../SLING-INF/apps/sling/validation/models.json    |   3 +
 .../apps/sling/validation/models/user.admin.json   |  57 +++++++++
 .../apps/sling/validation/models/user.regular.json |  44 +++++++
 .../resources/SLING-INF/apps/validationdemo.json   |   3 +
 .../SLING-INF/apps/validationdemo/components.json  |   3 +
 .../apps/validationdemo/components/user.json       |   3 +
 .../apps/validationdemo/components/user/user.jsp   |  42 ++++++
 .../content/validationdemo/users/admin/neo.json    |  11 ++
 .../content/validationdemo/users/johnsmith.json    |   8 ++
 15 files changed, 530 insertions(+)

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..1bc89a7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,26 @@
+## How To Run the Examples
+1. Start a Sling launchpad
+2. Install the `org.apache.sling.validation.api` and `org.apache.sling.validation.core` bundles:
+    
+    ```bash
+    cd ../api
+    mvn clean package sling:install
+    cd ../core
+    mvn clean package sling:install
+    cd ../examples
+    mvn clean package sling:install
+    ```
+
+## Invalid POST request
+```bash
+curl -u admin:admin -Fsling:resourceType=/apps/validationdemo/components/user -Fusername=johnsmith -FfirstName=John204 -FlastName=Smith http://127.0.0.1:8080/content/validationdemo/users/johnsmith.modify.html
+```
+
+Check that the resource has not been modified at http://127.0.0.1:8080/content/validationdemo/users/johnsmith.html.
+
+## Valid POST request
+```bash
+curl -u admin:admin -Fsling:resourceType=/apps/validationdemo/components/user -Fusername=johnsmith -FfirstName=Johnny -FlastName=Bravo http://127.0.0.1:8080/content/validationdemo/users/johnsmith.modify.html
+```
+
+Check that the resource has been modified at http://127.0.0.1:8080/content/validationdemo/users/johnsmith.html.
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..ae1b515
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,141 @@
+<?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.examples</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>Apache Sling Validation Framework Examples</name>
+    <description>Demo Examples for the Apache Sling Validation Framework</description>
+
+    <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>
+                        <Private-Package>
+                            org.apache.sling.validation.examples.*
+                        </Private-Package>
+                        <Export-Package>
+                            org.apache.sling.validation.examples.models;version=1.0.0
+                        </Export-Package>
+                        <Sling-Model-Packages>org.apache.sling.validation.examples.models</Sling-Model-Packages>
+                        <Sling-Initial-Content>SLING-INF;</Sling-Initial-Content>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    <dependencies>
+        <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>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>javax.jcr</groupId>
+            <artifactId>jcr</artifactId>
+            <version>2.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.slf4j</groupId>
+            <artifactId>slf4j-api</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.commons.osgi</artifactId>
+            <version>2.2.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.models.api</artifactId>
+            <version>1.1.0</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>
+    </dependencies>
+
+</project>
diff --git a/src/main/java/org/apache/sling/validation/examples/models/UserModel.java b/src/main/java/org/apache/sling/validation/examples/models/UserModel.java
new file mode 100644
index 0000000..bd6d362
--- /dev/null
+++ b/src/main/java/org/apache/sling/validation/examples/models/UserModel.java
@@ -0,0 +1,91 @@
+/*
+ * 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.examples.models;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.models.annotations.Model;
+import org.apache.sling.validation.api.ValidationModel;
+import org.apache.sling.validation.api.ValidationResult;
+import org.apache.sling.validation.api.ValidationService;
+
+@Model(adaptables = Resource.class)
+public class UserModel {
+
+    private static final String INVALID = "INVALID";
+
+    private Resource resource;
+    private Map<String, List<String>> errors = new HashMap<String, List<String>>();
+
+    @Inject
+    private ValidationService validationService;
+
+    @Inject
+    private String username;
+
+    @Inject
+    private String firstName;
+
+    @Inject
+    private String lastName;
+
+    @Inject
+    private boolean isAdmin;
+
+    public UserModel(Resource resource) {
+        this.resource = resource;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public String getFirstName() {
+        return firstName;
+    }
+
+    public String getLastName() {
+        return lastName;
+    }
+
+    public boolean isAdmin() {
+        return isAdmin;
+    }
+
+    public Map<String, List<String>> getErrors() {
+        return errors;
+    }
+
+    @PostConstruct
+    protected void validate() {
+        ValidationModel model = validationService.getValidationModel(resource);
+        if (model != null) {
+            ValidationResult result = validationService.validate(resource, model);
+            if (!result.isValid()) {
+                errors = result.getFailureMessages();
+            }
+        }
+    }
+}
diff --git a/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java b/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
new file mode 100644
index 0000000..3acc333
--- /dev/null
+++ b/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
@@ -0,0 +1,92 @@
+/*
+ * 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.examples.servlets;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.ServletException;
+
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.sling.SlingServlet;
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.SlingHttpServletResponse;
+import org.apache.sling.api.request.RequestDispatcherOptions;
+import org.apache.sling.api.resource.ValueMap;
+import org.apache.sling.api.servlets.SlingAllMethodsServlet;
+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.validation.api.ValidationModel;
+import org.apache.sling.validation.api.ValidationResult;
+import org.apache.sling.validation.api.ValidationService;
+
+@SlingServlet(
+        resourceTypes = "/apps/validationdemo/components/user",
+        selectors = {"modify"},
+        methods = "POST"
+)
+public class ModifyUserServlet extends SlingAllMethodsServlet {
+
+    @Reference
+    private ValidationService validationService;
+
+    @Override
+    protected void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException {
+        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);
+                if (vr.isValid()) {
+                    RequestDispatcherOptions options = new RequestDispatcherOptions();
+                    options.setReplaceSelectors(" ");
+                    request.getRequestDispatcher(request.getResource(), options).forward(request, response);
+                } else {
+                    response.setContentType("application/json");
+                    JSONObject json = new JSONObject();
+                    try {
+                        json.put("success", false);
+                        JSONObject messages = new JSONObject();
+                        for (Map.Entry<String, List<String>> entry : vr.getFailureMessages().entrySet()) {
+                            String key = entry.getKey();
+                            JSONArray errors = new JSONArray();
+                            for (String message : entry.getValue()) {
+                                errors.put(message);
+                            }
+                            messages.put(key, errors);
+                        }
+                        json.put("messages", messages);
+                        response.getWriter().print(json.toString());
+                        response.setStatus(400);
+                    } catch (JSONException e) {
+                        throw new IOException(e);
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/src/main/resources/SLING-INF/apps/sling.json b/src/main/resources/SLING-INF/apps/sling.json
new file mode 100644
index 0000000..f1d1b47
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/sling.json
@@ -0,0 +1,3 @@
+{
+    "jcr:primaryType":"sling:Folder"
+}
diff --git a/src/main/resources/SLING-INF/apps/sling/validation.json b/src/main/resources/SLING-INF/apps/sling/validation.json
new file mode 100644
index 0000000..f1d1b47
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/sling/validation.json
@@ -0,0 +1,3 @@
+{
+    "jcr:primaryType":"sling:Folder"
+}
diff --git a/src/main/resources/SLING-INF/apps/sling/validation/models.json b/src/main/resources/SLING-INF/apps/sling/validation/models.json
new file mode 100644
index 0000000..f1d1b47
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/sling/validation/models.json
@@ -0,0 +1,3 @@
+{
+    "jcr:primaryType":"sling:Folder"
+}
diff --git a/src/main/resources/SLING-INF/apps/sling/validation/models/user.admin.json b/src/main/resources/SLING-INF/apps/sling/validation/models/user.admin.json
new file mode 100644
index 0000000..03c9ec7
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/sling/validation/models/user.admin.json
@@ -0,0 +1,57 @@
+{
+    "jcr:primaryType": "nt:unstructured",
+    "sling:resourceType": "sling/validation/model",
+    "applicablePaths": [
+        "/content/validationdemo/users/admin"
+    ],
+    "validatedResourceType": "/apps/validationdemo/components/user",
+    "properties": {
+        "jcr:primaryType": "nt:unstructured",
+        "firstName": {
+            "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}+$"]
+                }
+            }
+        },
+        "lastName": {
+            "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}+$"]
+                }
+            }
+        },
+        "username": {
+            "jcr:primaryType": "nt:unstructured",
+            "propertyType": "string",
+            "validators": {
+                "jcr:primaryType": "nt:unstructured",
+                "org.apache.sling.validation.impl.validators.RegexValidator": {
+                    "jcr:primaryType": "nt:unstructured",
+                    "validatorArguments": ["regex=^[a-z.]+$"]
+                }
+            }
+        }
+    },
+    "children": {
+        "jcr:primaryType": "nt:unstructured",
+        "token": {
+            "jcr:primaryType": "nt:unstructured",
+            "properties": {
+                "jcr:primaryType": "nt:unstructured",
+                "id": {
+                    "jcr:primaryType": "nt:unstructured",
+                    "propertyType": "string"
+                }
+            }
+        }
+    }
+}
diff --git a/src/main/resources/SLING-INF/apps/sling/validation/models/user.regular.json b/src/main/resources/SLING-INF/apps/sling/validation/models/user.regular.json
new file mode 100644
index 0000000..35ec247
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/sling/validation/models/user.regular.json
@@ -0,0 +1,44 @@
+{
+    "jcr:primaryType": "nt:unstructured",
+    "sling:resourceType": "sling/validation/model",
+    "applicablePaths": [
+        "/content/validationdemo/users/"
+    ],
+    "validatedResourceType": "/apps/validationdemo/components/user",
+    "properties": {
+        "jcr:primaryType": "nt:unstructured",
+        "firstName": {
+            "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}+$"]
+                }
+            }
+        },
+        "lastName": {
+            "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}+$"]
+                }
+            }
+        },
+        "username": {
+            "jcr:primaryType": "nt:unstructured",
+            "propertyType": "string",
+            "validators": {
+                "jcr:primaryType": "nt:unstructured",
+                "org.apache.sling.validation.impl.validators.RegexValidator": {
+                    "jcr:primaryType": "nt:unstructured",
+                    "validatorArguments": ["regex=^[a-z.]+$"]
+                }
+            }
+        }
+    }
+}
diff --git a/src/main/resources/SLING-INF/apps/validationdemo.json b/src/main/resources/SLING-INF/apps/validationdemo.json
new file mode 100644
index 0000000..f1d1b47
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/validationdemo.json
@@ -0,0 +1,3 @@
+{
+    "jcr:primaryType":"sling:Folder"
+}
diff --git a/src/main/resources/SLING-INF/apps/validationdemo/components.json b/src/main/resources/SLING-INF/apps/validationdemo/components.json
new file mode 100644
index 0000000..f1d1b47
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/validationdemo/components.json
@@ -0,0 +1,3 @@
+{
+    "jcr:primaryType":"sling:Folder"
+}
diff --git a/src/main/resources/SLING-INF/apps/validationdemo/components/user.json b/src/main/resources/SLING-INF/apps/validationdemo/components/user.json
new file mode 100644
index 0000000..f1d1b47
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/validationdemo/components/user.json
@@ -0,0 +1,3 @@
+{
+    "jcr:primaryType":"sling:Folder"
+}
diff --git a/src/main/resources/SLING-INF/apps/validationdemo/components/user/user.jsp b/src/main/resources/SLING-INF/apps/validationdemo/components/user/user.jsp
new file mode 100644
index 0000000..5c585cb
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/validationdemo/components/user/user.jsp
@@ -0,0 +1,42 @@
+<%@page session="false" import="
+    java.util.Map,
+    java.util.List,
+    org.apache.sling.api.resource.Resource,
+    org.apache.sling.validation.examples.models.UserModel
+    "%>
+<%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling" %>
+<sling:defineObjects />
+<%
+    UserModel user = resource.adaptTo(UserModel.class);
+%>
+<table>
+    <tr>
+        <td><strong>Username:</strong></td>
+        <td><%= user.getUsername() %></td>
+    </tr>
+    <tr>
+        <td><strong>First Name:</strong></td>
+        <td><%= user.getFirstName() %></td>
+    </tr>
+    <tr>
+        <td><strong>Last Name:</strong></td>
+        <td><%= user.getLastName() %></td>
+    </tr>
+    <tr>
+        <td><strong>Admin:</strong></td>
+        <td><%= user.isAdmin() %></td>
+    </tr>
+</table>
+<h3>Validation Errors</h3>
+<%
+    for (Map.Entry<String, List<String>> entry : user.getErrors().entrySet()) {
+%>
+<span><strong>Key:</strong> <%= entry.getKey() %></span><br>
+<%
+        for (String message : entry.getValue()) {
+%>
+<span><%= message %></span><br>
+<%
+        }
+    }
+%>
\ No newline at end of file
diff --git a/src/main/resources/SLING-INF/content/validationdemo/users/admin/neo.json b/src/main/resources/SLING-INF/content/validationdemo/users/admin/neo.json
new file mode 100644
index 0000000..9c4048c
--- /dev/null
+++ b/src/main/resources/SLING-INF/content/validationdemo/users/admin/neo.json
@@ -0,0 +1,11 @@
+{
+    "jcr:primaryType":"nt:unstructured",
+    "sling:resourceType":"/apps/validationdemo/components/user",
+    "firstName":"Thomas",
+    "isAdmin":"true",
+    "lastName":"Anderson",
+    "username":"neo",
+    "token" : {
+        "jcr:primaryType":"nt:unstructured"
+    }
+}
diff --git a/src/main/resources/SLING-INF/content/validationdemo/users/johnsmith.json b/src/main/resources/SLING-INF/content/validationdemo/users/johnsmith.json
new file mode 100644
index 0000000..f3b665f
--- /dev/null
+++ b/src/main/resources/SLING-INF/content/validationdemo/users/johnsmith.json
@@ -0,0 +1,8 @@
+{
+    "jcr:primaryType":"nt:unstructured",
+    "sling:resourceType":"/apps/validationdemo/components/user",
+    "firstName":"John",
+    "isAdmin":false,
+    "lastName":"Smith",
+    "username":"johnsmith"
+}

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

[sling-org-apache-sling-validation-examples] 03/24: SLING-4609 more null annotations

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

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit 9f0191d20249e53964efaedfccc43f874951d709
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Tue Apr 14 14:19:49 2015 +0000

    SLING-4609 more null annotations
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1673430 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                               |  2 +-
 .../apps/validationdemo/components/user/user.jsp      | 19 ++++++++++++++++++-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index d501ab3..71a105b 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-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
diff --git a/src/main/resources/SLING-INF/apps/validationdemo/components/user/user.jsp b/src/main/resources/SLING-INF/apps/validationdemo/components/user/user.jsp
index 5c585cb..26e1968 100644
--- a/src/main/resources/SLING-INF/apps/validationdemo/components/user/user.jsp
+++ b/src/main/resources/SLING-INF/apps/validationdemo/components/user/user.jsp
@@ -1,4 +1,21 @@
-<%@page session="false" import="
+<!--
+ 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.
+--><%@page session="false" import="
     java.util.Map,
     java.util.List,
     org.apache.sling.api.resource.Resource,

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

[sling-org-apache-sling-validation-examples] 23/24: SLING-6914: Remove commons.json from bundles/extensions/validation/examples

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

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit 9f4aa15a9f24038615c1bb27a4746322e882ee36
Author: Karl Pauls <pa...@apache.org>
AuthorDate: Thu Jun 1 22:02:38 2017 +0000

    SLING-6914: Remove commons.json from bundles/extensions/validation/examples
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1797284 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            |  9 ++++---
 .../examples/servlets/ModifyUserServlet.java       | 31 +++++++++-------------
 2 files changed, 19 insertions(+), 21 deletions(-)

diff --git a/pom.xml b/pom.xml
index c1462fc..9ce976a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,6 +59,9 @@
                         </Export-Package>
                         <Sling-Model-Packages>org.apache.sling.validation.examples.models</Sling-Model-Packages>
                         <Sling-Initial-Content>SLING-INF;</Sling-Initial-Content>
+                        <Embed-Dependency>
+                            org.apache.felix.utils;inline=org/apache/felix/utils/json/JSONWriter.class
+                        </Embed-Dependency>
                     </instructions>
                 </configuration>
             </plugin>
@@ -115,9 +118,9 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.commons.json</artifactId>
-            <version>2.0.6</version>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.utils</artifactId>
+            <version>1.9.0</version>
             <scope>provided</scope>
         </dependency>
     </dependencies>
diff --git a/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java b/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
index b3a832f..71a5806 100644
--- a/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
+++ b/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
@@ -27,14 +27,12 @@ import javax.servlet.ServletException;
 
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.sling.SlingServlet;
+import org.apache.felix.utils.json.JSONWriter;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.SlingHttpServletResponse;
 import org.apache.sling.api.request.RequestDispatcherOptions;
 import org.apache.sling.api.resource.ValueMap;
 import org.apache.sling.api.servlets.SlingAllMethodsServlet;
-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.validation.ValidationFailure;
 import org.apache.sling.validation.ValidationResult;
 import org.apache.sling.validation.ValidationService;
@@ -69,22 +67,19 @@ public class ModifyUserServlet extends SlingAllMethodsServlet {
                     request.getRequestDispatcher(request.getResource(), options).forward(request, response);
                 } else {
                     response.setContentType("application/json");
-                    JSONObject json = new JSONObject();
-                    try {
-                        json.put("success", false);
-                        JSONArray failures = new JSONArray();
-                        for (ValidationFailure failure : vr.getFailures()) {
-                            JSONObject failureJson = new JSONObject();
-                            failureJson.put("message", failure.getMessage(request.getResourceBundle(Locale.US)));
-                            failureJson.put("location", failure.getLocation());
-                            failures.put(failureJson);
-                        }
-                        json.put("failures", failures);
-                        response.getWriter().print(json.toString());
-                        response.setStatus(400);
-                    } catch (JSONException e) {
-                        throw new IOException(e);
+                    JSONWriter writer = new JSONWriter(response.getWriter());
+                    writer.object();
+                    writer.key("success").value(false);
+                    writer.key("failures").array();
+                    for (ValidationFailure failure : vr.getFailures()) {
+                        writer.object();
+                        writer.key("message").value(failure.getMessage(request.getResourceBundle(Locale.US)));
+                        writer.key("location").value(failure.getLocation());
+                        writer.endObject();
                     }
+                    writer.endArray();
+                    writer.endObject();
+                    response.setStatus(400);
                 }
             }
         }

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

[sling-org-apache-sling-validation-examples] 12/24: 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 branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit 91cc4c3d6462415b16e96174010837648a1b12be
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@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 5fc10e7..2f5db83 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-examples] 22/24: validation/examples: reference released version of validation.api

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

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit 4ecde39792bcd81324c51802a2ba2a89e66e9fb5
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue May 23 07:26:35 2017 +0000

    validation/examples: reference released version of validation.api
    
    Problem reported on dev@sling by Ioan Eugen Stan
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1795882 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index f52ce72..c1462fc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -68,7 +68,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-examples] 13/24: 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 branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit 52e4c8bbcda4e9e8e5865ada464e475adf7eb762
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@1720802 13f79535-47bb-0310-9956-ffa450edef68
---
 .../sling/validation/examples/models/UserModel.java     |  9 +++++----
 .../validation/examples/servlets/ModifyUserServlet.java | 17 ++++++++---------
 .../apps/validationdemo/components/user/user.jsp        | 11 ++++-------
 3 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/src/main/java/org/apache/sling/validation/examples/models/UserModel.java b/src/main/java/org/apache/sling/validation/examples/models/UserModel.java
index f07c430..5cff7c3 100644
--- a/src/main/java/org/apache/sling/validation/examples/models/UserModel.java
+++ b/src/main/java/org/apache/sling/validation/examples/models/UserModel.java
@@ -18,7 +18,7 @@
  */
 package org.apache.sling.validation.examples.models;
 
-import java.util.HashMap;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 
@@ -27,6 +27,7 @@ import javax.inject.Inject;
 
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.models.annotations.Model;
+import org.apache.sling.validation.ValidationFailure;
 import org.apache.sling.validation.ValidationResult;
 import org.apache.sling.validation.ValidationService;
 import org.apache.sling.validation.model.ValidationModel;
@@ -37,7 +38,7 @@ public class UserModel {
     private static final String INVALID = "INVALID";
 
     private Resource resource;
-    private Map<String, List<String>> errors = new HashMap<String, List<String>>();
+    private List<ValidationFailure> errors = new LinkedList<ValidationFailure>();
 
     @Inject
     private ValidationService validationService;
@@ -74,7 +75,7 @@ public class UserModel {
         return isAdmin;
     }
 
-    public Map<String, List<String>> getErrors() {
+    public List<ValidationFailure> getErrors() {
         return errors;
     }
 
@@ -84,7 +85,7 @@ public class UserModel {
         if (model != null) {
             ValidationResult result = validationService.validate(resource, model);
             if (!result.isValid()) {
-                errors = result.getFailureMessages();
+                errors = result.getFailures();
             }
         }
     }
diff --git a/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java b/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
index e7a3944..d74657f 100644
--- a/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
+++ b/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
@@ -34,6 +34,7 @@ import org.apache.sling.api.servlets.SlingAllMethodsServlet;
 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.validation.ValidationFailure;
 import org.apache.sling.validation.ValidationResult;
 import org.apache.sling.validation.ValidationService;
 import org.apache.sling.validation.model.ValidationModel;
@@ -70,16 +71,14 @@ public class ModifyUserServlet extends SlingAllMethodsServlet {
                     JSONObject json = new JSONObject();
                     try {
                         json.put("success", false);
-                        JSONObject messages = new JSONObject();
-                        for (Map.Entry<String, List<String>> entry : vr.getFailureMessages().entrySet()) {
-                            String key = entry.getKey();
-                            JSONArray errors = new JSONArray();
-                            for (String message : entry.getValue()) {
-                                errors.put(message);
-                            }
-                            messages.put(key, errors);
+                        JSONArray failures = new JSONArray();
+                        for (ValidationFailure failure : vr.getFailures()) {
+                            JSONObject failureJson = new JSONObject();
+                            failureJson.put("message", failure.getMessage());
+                            failureJson.put("location", failure.getLocation());
+                            failures.put(failureJson);
                         }
-                        json.put("messages", messages);
+                        json.put("failures", failures);
                         response.getWriter().print(json.toString());
                         response.setStatus(400);
                     } catch (JSONException e) {
diff --git a/src/main/resources/SLING-INF/apps/validationdemo/components/user/user.jsp b/src/main/resources/SLING-INF/apps/validationdemo/components/user/user.jsp
index 26e1968..bfca1ef 100644
--- a/src/main/resources/SLING-INF/apps/validationdemo/components/user/user.jsp
+++ b/src/main/resources/SLING-INF/apps/validationdemo/components/user/user.jsp
@@ -19,6 +19,7 @@
     java.util.Map,
     java.util.List,
     org.apache.sling.api.resource.Resource,
+    org.apache.sling.validation.ValidationFailure,
     org.apache.sling.validation.examples.models.UserModel
     "%>
 <%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling" %>
@@ -46,14 +47,10 @@
 </table>
 <h3>Validation Errors</h3>
 <%
-    for (Map.Entry<String, List<String>> entry : user.getErrors().entrySet()) {
+    for (ValidationFailure error : user.getErrors()) {
 %>
-<span><strong>Key:</strong> <%= entry.getKey() %></span><br>
+<span><strong>Key:</strong> <%= error.getLocation() %></span><br>
+<span><%= error.getMessage() %></span><br>
 <%
-        for (String message : entry.getValue()) {
-%>
-<span><%= message %></span><br>
-<%
-        }
     }
 %>
\ No newline at end of file

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

[sling-org-apache-sling-validation-examples] 09/24: 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 branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit a3f159c978f57719eded25215272880e2762818b
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@1687505 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 186d4c0..6462e8f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,10 +35,6 @@
     <name>Apache Sling Validation Framework Examples</name>
     <description>Demo Examples for the Apache Sling Validation Framework</description>
 
-    <properties>
-        <sling.java.version>6</sling.java.version>
-    </properties>
-    
     <scm>
         <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/examples</connection>
         <developerConnection> scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/examples</developerConnection>

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

[sling-org-apache-sling-validation-examples] 15/24: 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 branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit a12e67fdce4259d61b6ed23c3413633626c71e41
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@1723664 13f79535-47bb-0310-9956-ffa450edef68
---
 .../apache/sling/validation/examples/servlets/ModifyUserServlet.java | 3 ++-
 .../resources/SLING-INF/apps/validationdemo/components/user/user.jsp | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java b/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
index d74657f..b3a832f 100644
--- a/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
+++ b/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
@@ -20,6 +20,7 @@ package org.apache.sling.validation.examples.servlets;
 
 import java.io.IOException;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 import javax.servlet.ServletException;
@@ -74,7 +75,7 @@ public class ModifyUserServlet extends SlingAllMethodsServlet {
                         JSONArray failures = new JSONArray();
                         for (ValidationFailure failure : vr.getFailures()) {
                             JSONObject failureJson = new JSONObject();
-                            failureJson.put("message", failure.getMessage());
+                            failureJson.put("message", failure.getMessage(request.getResourceBundle(Locale.US)));
                             failureJson.put("location", failure.getLocation());
                             failures.put(failureJson);
                         }
diff --git a/src/main/resources/SLING-INF/apps/validationdemo/components/user/user.jsp b/src/main/resources/SLING-INF/apps/validationdemo/components/user/user.jsp
index bfca1ef..cda6478 100644
--- a/src/main/resources/SLING-INF/apps/validationdemo/components/user/user.jsp
+++ b/src/main/resources/SLING-INF/apps/validationdemo/components/user/user.jsp
@@ -18,6 +18,7 @@
 --><%@page session="false" import="
     java.util.Map,
     java.util.List,
+    java.util.Locale,
     org.apache.sling.api.resource.Resource,
     org.apache.sling.validation.ValidationFailure,
     org.apache.sling.validation.examples.models.UserModel
@@ -49,8 +50,8 @@
 <%
     for (ValidationFailure error : user.getErrors()) {
 %>
-<span><strong>Key:</strong> <%= error.getLocation() %></span><br>
-<span><%= error.getMessage() %></span><br>
+<span><strong>Location:</strong> <%= error.getLocation() %></span><br>
+<span><%= error.getMessage(slingRequest.getResourceBundle(Locale.US)) %></span><br>
 <%
     }
 %>
\ No newline at end of file

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

[sling-org-apache-sling-validation-examples] 06/24: SLING-4698 - Set parent.relativePath to empty for all modules

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

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit e2fb4c0682016316af81df52c303fe25154d965d
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu May 7 10:14:40 2015 +0000

    SLING-4698 - Set parent.relativePath to empty for all modules
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1678154 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index c444b6b..d501ab3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
         <version>22</version>
-        <relativePath>../../../../parent/pom.xml</relativePath>
+        <relativePath/>
     </parent>
 
     <artifactId>org.apache.sling.validation.examples</artifactId>

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

[sling-org-apache-sling-validation-examples] 17/24: 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 branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit 0236b13ca3de7b5998b8fe2af2b351587f30ac83
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@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 c783827..fd835f4 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-examples] 18/24: 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 branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit 23495c819acab3d66d8cb2ee982e5e7b41b60405
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@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 fd835f4..f52ce72 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.examples</artifactId>

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

[sling-org-apache-sling-validation-examples] 24/24: SLING-7167 Adjust READMEs

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

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit ccdc6c47bc7c2862ff9f7858fb1505e6f823b814
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Oct 3 09:56:42 2017 +0000

    SLING-7167 Adjust READMEs
    
    add uniform header linking to Sling project
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810852 13f79535-47bb-0310-9956-ffa450edef68
---
 README.md | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/README.md b/README.md
index 1bc89a7..2ee0521 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,7 @@
+# Apache Sling Validation Framework Examples
+
+This module is part of the [Apache Sling](https://sling.apache.org) project.
+
 ## How To Run the Examples
 1. Start a Sling launchpad
 2. Install the `org.apache.sling.validation.api` and `org.apache.sling.validation.core` bundles:

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

[sling-org-apache-sling-validation-examples] 08/24: 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 branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit 3b8a30639e37845bb3190fda1749df35a2adef37
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@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 d501ab3..186d4c0 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-examples] 21/24: 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 branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit 1732d433b5384bc04ab9ff8b17fcbadc57854edc
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@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 040a688..f52ce72 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
     </parent>
 
     <artifactId>org.apache.sling.validation.examples</artifactId>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>1.0.0-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Validation Framework Examples</name>

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

[sling-org-apache-sling-validation-examples] 04/24: set path to parent pom

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

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit 123e7327f4def53fc3bc28c724ea16fd36ead03d
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Sun Apr 19 21:14:14 2015 +0000

    set path to parent pom
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1674700 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 71a105b..7eee172 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
         <version>23-SNAPSHOT</version>
-        <relativePath/>
+        <relativePath>../../../../parent/pom.xml</relativePath>
     </parent>
 
     <artifactId>org.apache.sling.validation.examples</artifactId>

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

[sling-org-apache-sling-validation-examples] 19/24: SLING-6727 ValidationModel.getValidatedResourceType -> ValidationModel.getValidatingResourceType

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

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit 8e51b765cd8bce6f60c2c57dda8276cdedfc041e
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Wed Mar 29 11:24:38 2017 +0000

    SLING-6727 ValidationModel.getValidatedResourceType -> ValidationModel.getValidatingResourceType
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1789339 13f79535-47bb-0310-9956-ffa450edef68
---
 .../resources/SLING-INF/apps/sling/validation/models/user.admin.json    | 2 +-
 .../resources/SLING-INF/apps/sling/validation/models/user.regular.json  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/SLING-INF/apps/sling/validation/models/user.admin.json b/src/main/resources/SLING-INF/apps/sling/validation/models/user.admin.json
index 03c9ec7..e4a1a2a 100644
--- a/src/main/resources/SLING-INF/apps/sling/validation/models/user.admin.json
+++ b/src/main/resources/SLING-INF/apps/sling/validation/models/user.admin.json
@@ -4,7 +4,7 @@
     "applicablePaths": [
         "/content/validationdemo/users/admin"
     ],
-    "validatedResourceType": "/apps/validationdemo/components/user",
+    "validatingResourceType": "/apps/validationdemo/components/user",
     "properties": {
         "jcr:primaryType": "nt:unstructured",
         "firstName": {
diff --git a/src/main/resources/SLING-INF/apps/sling/validation/models/user.regular.json b/src/main/resources/SLING-INF/apps/sling/validation/models/user.regular.json
index 35ec247..0eb773c 100644
--- a/src/main/resources/SLING-INF/apps/sling/validation/models/user.regular.json
+++ b/src/main/resources/SLING-INF/apps/sling/validation/models/user.regular.json
@@ -4,7 +4,7 @@
     "applicablePaths": [
         "/content/validationdemo/users/"
     ],
-    "validatedResourceType": "/apps/validationdemo/components/user",
+    "validatingResourceType": "/apps/validationdemo/components/user",
     "properties": {
         "jcr:primaryType": "nt:unstructured",
         "firstName": {

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

[sling-org-apache-sling-validation-examples] 10/24: 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 branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit 3a31eac04c57905225367e04c3f52c2097f4a2a0
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@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 6462e8f..5fc10e7 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-examples] 07/24: 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 branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit 00759fc57c9990fac06417c228676940ed208404
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@1684841 13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/org/apache/sling/validation/examples/models/UserModel.java | 6 +++---
 .../sling/validation/examples/servlets/ModifyUserServlet.java       | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/sling/validation/examples/models/UserModel.java b/src/main/java/org/apache/sling/validation/examples/models/UserModel.java
index bd6d362..471bf5d 100644
--- a/src/main/java/org/apache/sling/validation/examples/models/UserModel.java
+++ b/src/main/java/org/apache/sling/validation/examples/models/UserModel.java
@@ -27,9 +27,9 @@ import javax.inject.Inject;
 
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.models.annotations.Model;
-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;
 
 @Model(adaptables = Resource.class)
 public class UserModel {
diff --git a/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java b/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
index 3acc333..5fb92bc 100644
--- a/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
+++ b/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
@@ -34,9 +34,9 @@ import org.apache.sling.api.servlets.SlingAllMethodsServlet;
 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.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;
 
 @SlingServlet(
         resourceTypes = "/apps/validationdemo/components/user",

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

[sling-org-apache-sling-validation-examples] 20/24: [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 branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit 4ee6aae23f0a8a85d63fba88de934b55f790501a
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@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 f52ce72..040a688 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
     </parent>
 
     <artifactId>org.apache.sling.validation.examples</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
+    <version>1.0.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Validation Framework Examples</name>

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

[sling-org-apache-sling-validation-examples] 16/24: 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 branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit 1b36fb8429feb351b18feea0c33aa90aadc796c7
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@1781404 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 67d26a8..c783827 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>
 
@@ -75,17 +75,17 @@
         </dependency>
         <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>

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