package org.apache.maven.j2ee;

/* ====================================================================
 *   Copyright 2001-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.
 * ====================================================================
 */

import java.util.EventListener;

/**
 * An interface implemented by those who want to receive validation events
 * from a J2EE Validator (WAR, EAR etc).
 *
 * @version $Id$
 * @author  dion
 */
public interface ValidationListener extends EventListener
{
    
    /** 
     * Called when validation starts
     * @param event a {@link ValidationEvent}
     */
    void validationStarted(ValidationEvent event);
    
    /**
     * Called when a validation error occurs. That is, the subject being
     * validated has a serious (fatal) problem
     * @param event a {@link ValidationEvent}
     */
    void validationError(ValidationEvent event);

    /**
     * Called when a validation warning occurs. That is, the subject being
     * validated has a problem which may not be fatal
     * @param event a {@link ValidationEvent}
     */
    void validationWarning(ValidationEvent event);
    
    /**
     * Called when validation information is provided. This may be any 
     * information the validator feels is relevant.
     * @param event a {@link ValidationEvent}
     */
    void validationInformation(ValidationEvent event);

    /** 
     * Called when validation ends 
     * @param event a {@link ValidationEvent}
     */
    void validationEnded(ValidationEvent event);
}
