|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.doxia.linkcheck.validation.LinkValidatorManager
public class LinkValidatorManager
A LinkValidator manager which manages validators with a cache.
Constructor Summary | |
---|---|
LinkValidatorManager()
|
Method Summary | |
---|---|
void |
addLinkValidator(LinkValidator lv)
Adds a LinkValidator to this manager. |
LinkValidationResult |
getCachedResult(LinkValidationItem lvi)
Returns a LinkValidationResult for the given LinkValidationItem if it has been cached from a previous run, returns null otherwise. |
String[] |
getExcludedLinks()
Returns the excludedLinks. |
List |
getValidators()
Returns the list of validators. |
void |
loadCache(File cacheFile)
Loads a cache file. |
protected static boolean |
matchPattern(String link,
String pattern)
|
void |
saveCache(File cacheFile)
Saves a cache file. |
void |
setCachedResult(Object resourceKey,
LinkValidationResult lvr)
Puts the given LinkValidationResult into the cache. |
void |
setExcludedLinks(String[] excl)
Sets the excludedLinks. |
LinkValidationResult |
validateLink(LinkValidationItem lvi)
Validates the links of the given LinkValidationItem. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinkValidatorManager()
Method Detail |
---|
public List getValidators()
public String[] getExcludedLinks()
http://maven.apache.org/
,
or pattern links i.e. http://maven.apache.org/**/*.html
public void setExcludedLinks(String[] excl)
http://maven.apache.org/
,
or pattern links i.e. http://maven.apache.org/**/*.html
excl
- The excludes to set.public void addLinkValidator(LinkValidator lv)
lv
- The LinkValidator to add.public LinkValidationResult validateLink(LinkValidationItem lvi)
lvi
- The LinkValidationItem to validate.
public void loadCache(File cacheFile) throws IOException
cacheFile
- The cache file.
May be null, in which case the request is ignored.
IOException
- if anypublic void saveCache(File cacheFile) throws IOException
cacheFile
- The name of the cache file.
May be null, in which case the request is ignored.
IOException
- if anypublic LinkValidationResult getCachedResult(LinkValidationItem lvi)
lvi
- The LinkValidationItem.
public void setCachedResult(Object resourceKey, LinkValidationResult lvr)
resourceKey
- The key to retrieve the result.lvr
- the LinkValidationResult to cache.protected static boolean matchPattern(String link, String pattern)
link
- not nullpattern
- not null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |