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   * <b>This is an immutable class.</b><br/>
22   * <p>
23   *   This  class is used to return status responses from the
24   *   validation handlers.  A persistent result means that it
25   *   can be stored in the persistent cache and used across runs.
26   * </p>
27   * @author <a href="mailto:bwalding@apache.org">Ben Walding</a>
28   * @version $Id: LinkValidationResult.java 170200 2005-05-15 06:24:19Z brett $
29   */
30  public class LinkValidationResult {
31      public static final int NOTMINE = 0;
32      public static final int INVALID = 1;
33      public static final int VALID   = 2;
34      public static final int UNKNOWN = 3;
35      
36      private final boolean persistent;
37      private final int status;
38      
39      public LinkValidationResult(int status, boolean persistent) {
40          this.status = status;
41          this.persistent = persistent;
42      }
43      
44      public boolean isPersistent() {
45          return persistent;
46      }
47      
48      
49      /***
50       * Returns the status.
51       * @return int
52       */
53      public int getStatus() {
54          return status;
55      }
56  
57      
58  
59  }