org.apache.maven.doxia.linkcheck
Interface LinkCheck

All Known Implementing Classes:
DefaultLinkCheck

public interface LinkCheck

Tool to check links from html files in a given directory.

Version:
$Id: LinkCheck.java 709894 2008-11-02 16:42:06Z hboutemy $
Author:
Vincent Siveton

Field Summary
static String ROLE
          Plexus Role
 
Method Summary
 LinkcheckModel execute()
          Execute the link check.
 void setBasedir(File base)
          Set the base directory for the files to be linkchecked.
 void setBaseURL(String url)
          Sets the base URL.
 void setEncoding(String encoding)
          Set the encoding to use when processing files.
 void setExcludedHttpStatusErrors(int[] excl)
          Sets the excluded HTTP errors, i.e.
 void setExcludedHttpStatusWarnings(int[] excl)
          Sets the excluded HTTP warnings, i.e.
 void setExcludedLinks(String[] excl)
          Sets the excluded links, a String[] with excluded locations.
 void setExcludedPages(String[] excl)
          Sets the excluded pages, a String[] with excluded locations.
 void setHttp(HttpBean http)
          Sets the http parameters bean.
 void setLinkCheckCache(File cacheFile)
          Sets the cache File.
 void setOnline(boolean onLine)
          Set the online mode.
 void setReportOutput(File file)
          Set the output file for the results.
 void setReportOutputEncoding(String encoding)
          Sets the outputEncoding.
 

Field Detail

ROLE

static final String ROLE
Plexus Role

Method Detail

setBasedir

void setBasedir(File base)
Set the base directory for the files to be linkchecked.

Parameters:
base - the base directory

setBaseURL

void setBaseURL(String url)
Sets the base URL. This is prepended to links that start with '/'.

Parameters:
url - the base URL.

setExcludedHttpStatusErrors

void setExcludedHttpStatusErrors(int[] excl)
Sets the excluded HTTP errors, i.e. 404, a int[] with excluded errors.

Parameters:
excl - The excludes to set
See Also:
HttpStatus} for all possible values.

setExcludedHttpStatusWarnings

void setExcludedHttpStatusWarnings(int[] excl)
Sets the excluded HTTP warnings, i.e. 301, a int[] with excluded errors.

Parameters:
excl - The excludes to set
See Also:
HttpStatus} for all possible values.

setExcludedLinks

void setExcludedLinks(String[] excl)
Sets the excluded links, a String[] with excluded locations. Could contains a link, i.e. http://maven.apache.org/, or pattern links i.e. http://maven.apache.org/**/*.html

Parameters:
excl - The excludes to set

setExcludedPages

void setExcludedPages(String[] excl)
Sets the excluded pages, a String[] with excluded locations.

Parameters:
excl - The excludes to set

setHttp

void setHttp(HttpBean http)
Sets the http parameters bean.

Parameters:
http - parameters bean.

setLinkCheckCache

void setLinkCheckCache(File cacheFile)
Sets the cache File.

Parameters:
cacheFile - The cacheFile to set. Set this to null to ignore storing the cache.

setOnline

void setOnline(boolean onLine)
Set the online mode.

Parameters:
onLine - online mode.

setReportOutput

void setReportOutput(File file)
Set the output file for the results. If this is null, no output will be written.

Parameters:
file - the output file.

setReportOutputEncoding

void setReportOutputEncoding(String encoding)
Sets the outputEncoding.

Parameters:
encoding - The outputEncoding to set.

execute

LinkcheckModel execute()
                       throws LinkCheckException
Execute the link check. The basedir should be set before.

Returns:
the analysis in a LinkCheck model.
Throws:
LinkCheckException - if any
See Also:
setBasedir(File)

setEncoding

void setEncoding(String encoding)
Set the encoding to use when processing files.

Parameters:
encoding - a valid encoding
See Also:
Supported encodings


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.