view src/main/java/de/intevation/lada/validation/ValidationException.java @ 68:9e34b7e872f9

Documentation and minor code cosmetics/renamings.
author Raimund Renkert <rrenkert@intevation.de>
date Fri, 31 May 2013 14:47:54 +0200
parents 7dc8a1579e39
children 92affd9467f8
line wrap: on
line source
package de.intevation.lada.validation;

import java.util.Map;

/**
 * Exception used for validation errors.
 * 
 * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
 */
public class ValidationException
extends Exception
{
    /**
     * Errors saved in this exception.
     */
    private Map<String, Integer> errors;

    /**
     * Do not allow an empty ValidationException object. 
     */
    private ValidationException() {
    }

    /**
     * Create a new instance with errors.
     *
     * @param errors
     */
    public ValidationException(Map<String, Integer> errors) {
        this();
        this.errors = errors;
    }

    /**
     * Getter for the errors.
     *
     * @return
     */
    public Map<String, Integer> getErrors() {
        return errors;
    }
}
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)