View Javadoc

1   package org.apache.maven.linkcheck.validation;
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  /***
21   * @author <a href="mailto:bwalding@apache.org">Ben Walding</a>
22   * @version $Id: LinkValidator.java 170200 2005-05-15 06:24:19Z brett $
23   */
24  public interface LinkValidator {
25      
26      /***
27       * If getResource(lvi) returned null, this will NOT be called.
28       * @param lvi
29       * @return int
30       * @throws Exception
31       */
32      public LinkValidationResult validateLink(LinkValidationItem lvi) throws Exception;
33      
34      
35      /***
36       * The resource key is used by the cache to determine if it really needs to
37       * validate the link.  No actual validation should be done at this point.
38       * @param lvi
39       * @return Object null if this validator should not be doing this work.
40       * @throws Exception
41       */
42      public Object getResourceKey(LinkValidationItem lvi);
43  }