Path: blob/aarch64-shenandoah-jdk8u272-b10/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEvent.java
38890 views
/*1* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.xml.bind;2627/**28* This event indicates that a problem was encountered while validating the29* incoming XML data during an unmarshal operation, while performing30* on-demand validation of the Java content tree, or while marshalling the31* Java content tree back to XML data.32*33* @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>34* @see Validator35* @see ValidationEventHandler36* @since JAXB1.037*/38public interface ValidationEvent {3940/**41* Conditions that are not errors or fatal errors as defined by the42* XML 1.0 recommendation43*/44public static final int WARNING = 0;4546/**47* Conditions that correspond to the definition of "error" in section48* 1.2 of the W3C XML 1.0 Recommendation49*/50public static final int ERROR = 1;5152/**53* Conditions that correspond to the definition of "fatal error" in section54* 1.2 of the W3C XML 1.0 Recommendation55*/56public static final int FATAL_ERROR = 2;5758/**59* Retrieve the severity code for this warning/error.60*61* <p>62* Must be one of <tt>ValidationError.WARNING</tt>,63* <tt>ValidationError.ERROR</tt>, or <tt>ValidationError.FATAL_ERROR</tt>.64*65* @return the severity code for this warning/error66*/67public int getSeverity();6869/**70* Retrieve the text message for this warning/error.71*72* @return the text message for this warning/error or null if one wasn't set73*/74public String getMessage();7576/**77* Retrieve the linked exception for this warning/error.78*79* @return the linked exception for this warning/error or null if one80* wasn't set81*/82public Throwable getLinkedException();8384/**85* Retrieve the locator for this warning/error.86*87* @return the locator that indicates where the warning/error occurred88*/89public ValidationEventLocator getLocator();9091}929394