org.ihtsdo.otf.refset.exception.ValidationException.java Source code

Java tutorial

Introduction

Here is the source code for org.ihtsdo.otf.refset.exception.ValidationException.java

Source

/**
* Copyright 2014 IHTSDO
* Licensed 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.ihtsdo.otf.refset.exception;

import java.util.List;
import java.util.Map;

import org.springframework.validation.FieldError;

/**
 *
 */
public class ValidationException extends Exception {

    private Map<Object, List<FieldError>> failures;

    /**
     * @return the failures
     */
    public Map<Object, List<FieldError>> getFailures() {
        return failures;
    }

    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public ValidationException() {
        // TODO Auto-generated constructor stub
    }

    /**
     * @param message
     */
    public ValidationException(String message) {
        super(message);
        // TODO Auto-generated constructor stub
    }

    /**
     * @param cause
     */
    public ValidationException(Throwable cause) {
        super(cause);
        // TODO Auto-generated constructor stub
    }

    /**
     * @param message
     * @param cause
     */
    public ValidationException(String message, Throwable cause) {
        super(message, cause);
        // TODO Auto-generated constructor stub
    }

    /**
     * @param message
     * @param cause
     * @param enableSuppression
     * @param writableStackTrace
     */
    public ValidationException(String message, Throwable cause, boolean enableSuppression,
            boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
        // TODO Auto-generated constructor stub
    }

    /**
     * @param errors
     */
    public ValidationException(Map<Object, List<FieldError>> errors) {

        this.failures = errors;

    }

}