org.apache.maven.doxia.linkcheck.validation.LinkValidatorManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of doxia-linkcheck Show documentation
Show all versions of doxia-linkcheck Show documentation
Doxia linkcheck is a tool to check the validity of links.
package org.apache.maven.doxia.linkcheck.validation;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.maven.doxia.linkcheck.model.LinkcheckFileResult;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.SelectorUtils;
import org.codehaus.plexus.util.StringUtils;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InvalidClassException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
/**
* A LinkValidator manager which manages validators with a cache.
*
* @author Ben Walding
* @author Carlos Sanchez
* @author Arnaud Heritier
* @author Vincent Siveton
* @version $Id$
*/
public class LinkValidatorManager
implements Serializable
{
/** serialVersionUID. */
private static final long serialVersionUID = 2467928182206500945L;
/** Log for debug output. */
private static final Log LOG = LogFactory.getLog( LinkValidatorManager.class );
/** validators. */
private List validators = new LinkedList();
/** excludes. */
private String[] excludedLinks = new String[0];
/** cache. */
private Map