in src/main/java/org/apache/maven/doxia/linkcheck/validation/LinkValidatorManager.java [121:173]
public LinkValidationResult validateLink( LinkValidationItem lvi )
{
LinkValidationResult cachedResult = getCachedResult( lvi );
if ( cachedResult != null )
{
return cachedResult;
}
for ( int i = 0; i < this.excludedLinks.length; i++ )
{
if ( this.excludedLinks[i] != null && matchPattern( lvi.getLink(), this.excludedLinks[i] ) )
{
if ( LOG.isDebugEnabled() )
{
LOG.debug( "Excluded " + lvi.getLink() );
}
return new LinkValidationResult( LinkcheckFileResult.VALID_LEVEL, false, "" );
}
}
for ( LinkValidator lv : this.validators )
{
Object resourceKey = lv.getResourceKey( lvi );
if ( resourceKey != null )
{
if ( LOG.isDebugEnabled() )
{
LOG.debug( lv.getClass().getName() + " - Checking link " + lvi.getLink() );
}
LinkValidationResult lvr = lv.validateLink( lvi );
if ( lvr.getStatus() == LinkValidationResult.NOTMINE )
{
continue;
}
setCachedResult( resourceKey, lvr );
return lvr;
}
}
if ( LOG.isErrorEnabled() )
{
LOG.error( "Unable to validate link : " + lvi.getLink() );
}
return new LinkValidationResult( LinkcheckFileResult.UNKNOWN_LEVEL, false, "No validator found for this link" );
}