incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r925684 - /incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationException.java
Date Sat, 20 Mar 2010 21:23:40 GMT
Author: simonetripodi
Date: Sat Mar 20 21:23:39 2010
New Revision: 925684

URL: http://svn.apache.org/viewvc?rev=925684&view=rev
Log:
first checkin on ValidationException class

Added:
    incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationException.java
  (with props)

Added: incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationException.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationException.java?rev=925684&view=auto
==============================================================================
--- incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationException.java
(added)
+++ incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationException.java
Sat Mar 20 21:23:39 2010
@@ -0,0 +1,58 @@
+/*
+ * 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.bval.extentions.guice;
+
+import java.util.Set;
+
+import javax.validation.ConstraintViolation;
+
+/**
+ * Exception thrown when a method interceptor validates method arguments.
+ *
+ * @version $Id$
+ */
+public final class ValidationException extends Exception {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * The constraint violations set.
+     */
+    private final Set<ConstraintViolation<Object>> constraintViolations;
+
+    /**
+     * Creates a new ValidationException given a constraint violations set.
+     *
+     * @param constraintViolations the constraint violations set.
+     */
+    public ValidationException(Set<ConstraintViolation<Object>> constraintViolations)
{
+        this.constraintViolations = constraintViolations;
+    }
+
+    /**
+     * Returns the constraint violations set.
+     *
+     * @return the constraint violations set.
+     */
+    public Set<ConstraintViolation<Object>> getConstraintViolations() {
+        return this.constraintViolations;
+    }
+
+}

Propchange: incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationException.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message