View Javadoc

1   package org.apache.maven.j2ee;
2   
3   /* ====================================================================
4    *   Copyright 2001-2004 The Apache Software Foundation.
5    *
6    *   Licensed under the Apache License, Version 2.0 (the "License");
7    *   you may not use this file except in compliance with the License.
8    *   You may obtain a copy of the License at
9    *
10   *       http://www.apache.org/licenses/LICENSE-2.0
11   *
12   *   Unless required by applicable law or agreed to in writing, software
13   *   distributed under the License is distributed on an "AS IS" BASIS,
14   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   *   See the License for the specific language governing permissions and
16   *   limitations under the License.
17   * ====================================================================
18   */
19  
20  import java.util.EventListener;
21  
22  /**
23   * An interface implemented by those who want to receive validation events
24   * from a J2EE Validator (WAR, EAR etc).
25   *
26   * @version $Id: ValidationListener.java 170200 2005-05-15 06:24:19Z brett $
27   * @author  dion
28   */
29  public interface ValidationListener extends EventListener
30  {
31      
32      /** 
33       * Called when validation starts
34       * @param event a {@link ValidationEvent}
35       */
36      void validationStarted(ValidationEvent event);
37      
38      /**
39       * Called when a validation error occurs. That is, the subject being
40       * validated has a serious (fatal) problem
41       * @param event a {@link ValidationEvent}
42       */
43      void validationError(ValidationEvent event);
44  
45      /**
46       * Called when a validation warning occurs. That is, the subject being
47       * validated has a problem which may not be fatal
48       * @param event a {@link ValidationEvent}
49       */
50      void validationWarning(ValidationEvent event);
51      
52      /**
53       * Called when validation information is provided. This may be any 
54       * information the validator feels is relevant.
55       * @param event a {@link ValidationEvent}
56       */
57      void validationInformation(ValidationEvent event);
58  
59      /** 
60       * Called when validation ends 
61       * @param event a {@link ValidationEvent}
62       */
63      void validationEnded(ValidationEvent event);
64  }