Package org.archive.wayback.exception

Examples of org.archive.wayback.exception.ConfigurationException


   * start the background index merging thread
   * @throws ConfigurationException
   */
  public void init() throws ConfigurationException {
    if(index == null) {
      throw new ConfigurationException("No index target on bdb updater");
    }
    if(incoming == null) {
      throw new ConfigurationException("No incoming on bdb updater");     
    }
    startUpdateThread();
  }
View Full Code Here


      ensureDir(incoming);
      if(merged != null) ensureDir(merged);
      if(failed != null) ensureDir(failed);
    } catch (IOException e) {
      e.printStackTrace();
      throw new ConfigurationException(e.getMessage());
    }
   
    if (updateThread == null) {
      startUpdateThread();
    }
View Full Code Here

    return target;
  }

  private File ensureDir(String path) throws ConfigurationException {
    if(path.length() < 1) {
      throw new ConfigurationException("Empty directory path");
    }
    File dir = new File(path);
    if(dir.exists()) {
      if(!dir.isDirectory()) {
        throw new ConfigurationException("path " + path + "exists" +
            "but is not a directory");
      }
    } else {
      if(!dir.mkdirs()) {
        throw new ConfigurationException("unable to create directory" +
            " at " + path);
      }
    }
    return dir;
  }
View Full Code Here

   * @throws DatabaseException
   * @throws ConfigurationException
   */
  public void init() throws DatabaseException, ConfigurationException {
    if(logPath == null) {
      throw new ConfigurationException("No logPath");
    }
    log = new FileLocationDBLog(logPath);
    initializeDB(bdbPath,bdbName);   
  }
View Full Code Here

   */
  public FileLocationDBLog(String pathname) throws ConfigurationException {
    super(pathname);
    if (!isFile()) {
      if (exists()) {
        throw new ConfigurationException("path(" + pathname
            + ") exists but is not a file!");
      }
      try {
        if (!createNewFile()) {
          throw new ConfigurationException(
              "Unable to create empty file " + pathname);
        }
      } catch (IOException e) {
        e.printStackTrace();
        throw new ConfigurationException("Unable to create empty file "
            + pathname);
      }
    }
  }
View Full Code Here

  private ResourceStore resourceStore = null;
  private ResourceIndex resourceIndex = null;
  private boolean shutdownDone = false;
  public ResourceStore getResourceStore() throws ConfigurationException {
    if(resourceStore == null) {
      throw new ConfigurationException("No resourceStore declared");
    }
    return resourceStore;
  }
View Full Code Here

  public void setResourceStore(ResourceStore resourceStore) {
    this.resourceStore = resourceStore;
  }
  public ResourceIndex getResourceIndex() throws ConfigurationException {
    if(resourceIndex == null) {
      throw new ConfigurationException("No resourceIndex declared");
    }
    return resourceIndex;
  }
View Full Code Here

  public RequestMapper(ServletContext servletContext) throws ConfigurationException {
   
//    this.servletContext = servletContext;
    String configPath = servletContext.getInitParameter(CONFIG_PATH);
    if(configPath == null) {
      throw new ConfigurationException("Missing " + CONFIG_PATH
          + " parameter");
    }
    String resolvedPath = servletContext.getRealPath(configPath);
    Resource resource = new FileSystemResource(resolvedPath);
    factory = new XmlBeanFactory(resource);
View Full Code Here

    try {
      this.builder = this.factory.newDocumentBuilder();
    } catch (ParserConfigurationException e) {
      // TODO: quiet extra stacktrace..
      e.printStackTrace();
      throw new ConfigurationException(e.getMessage());
    }
  }
View Full Code Here

   * start the background index merging thread
   * @throws ConfigurationException
   */
  public void init() throws ConfigurationException {
    if(index == null) {
      throw new ConfigurationException("No index target");
    }
    if(!index.isUpdatable()) {
      throw new ConfigurationException("ResourceIndex is not updatable");
    }
    if(incoming == null) {
      throw new ConfigurationException("No incoming");     
    }
    if(runInterval > 0) {
      thread = new UpdateThread(this,runInterval);
      thread.start();
    }
View Full Code Here

TOP

Related Classes of org.archive.wayback.exception.ConfigurationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.