All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.xml.bind.helpers.ValidationEventImpl Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2003, 2004  The Apache Software Foundation
 * 
 * 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 javax.xml.bind.helpers;

import javax.xml.bind.ValidationEvent;
import javax.xml.bind.ValidationEventLocator;

/** 

Default implementation of a {@link javax.xml.bind.ValidationEvent}.

* * @author JSR-31 * @since JAXB1.0 */ public class ValidationEventImpl implements ValidationEvent { private int severity; private String message; private Throwable linkedException; private ValidationEventLocator locator; /**

Creates a new instance of ValidationEventImpl.

*/ public ValidationEventImpl(int pSeverity, String pMessage, ValidationEventLocator pLocator) { severity = pSeverity; message = pMessage; locator = pLocator; } /**

Creates a new instance of ValidationEventImpl.

*/ public ValidationEventImpl(int pSeverity, String pMessage, ValidationEventLocator pLocator, Throwable pLinkedException) { severity = pSeverity; message = pMessage; linkedException = pLinkedException; locator = pLocator; } /* @see javax.xml.bind.ValidationEvent#getSeverity() */ public int getSeverity() { return severity; } /**

Sets the events severity.

* @param pSeverity The events severity, either of * {@link javax.xml.bind.ValidationEvent#WARNING}, * {@link javax.xml.bind.ValidationEvent#ERROR}, or * {@link javax.xml.bind.ValidationEvent#FATAL_ERROR}.

*/ public void setSeverity(int pSeverity) { severity = pSeverity; } /* @see javax.xml.bind.ValidationEvent#getMessage() */ public String getMessage() { return message; } /**

Sets the events message.

*/ public void setMessage(String pMessage) { message = pMessage; } /* @see javax.xml.bind.ValidationEvent#getLinkedException() */ public Throwable getLinkedException() { return linkedException; } /**

Sets the exception, which is linked to the event.

*/ public void setLinkedException(Throwable pLinkedException) { linkedException = pLinkedException; } /* @see javax.xml.bind.ValidationEvent#getLocator() */ public ValidationEventLocator getLocator() { return locator; } /**

Sets the events locator.

*/ public void setLocator(ValidationEventLocator pLocator) { locator = pLocator; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy