Package com.crawljax.web.exception

Examples of com.crawljax.web.exception.CrawljaxWebException


  }

  public Plugin add(String fileName, byte[] data) throws CrawljaxWebException {
    int extensionIndex = fileName.indexOf(".jar");
    if (extensionIndex < 0) {
      throw new CrawljaxWebException("Expected .jar file");
    }
    String id = adaptToId(fileName.substring(0, extensionIndex));
    Plugin plugin = pluginManager.save(id, data);
    if(plugin != null) {
      pluginList.put(plugin.getId(), plugin);
View Full Code Here


  public Plugin remove(Plugin plugin) throws CrawljaxWebException {
    if(pluginManager.delete(plugin.getId())) {
      pluginList.remove(plugin.getId());
    } else {
      throw new CrawljaxWebException("Failed to delete plugin file");
    }
    return plugin;
  }
View Full Code Here

        fos.flush();
      }
    } catch (IOException e) {
      LOG.error("Could not save plugin file {}.", pluginJar.getName());
      LOG.debug("Could not save plugin file {}.\n{}", pluginJar.getName(), e.getStackTrace());
      throw new CrawljaxWebException("Could not save plugin file");
    }

    Plugin plugin = load(id);
    if(plugin == null) {
      delete(id);
      throw new CrawljaxWebException("Could not read plugin descriptor");
    }

    return plugin;
  }
View Full Code Here

      }
    } catch (IOException e) {
      urlFile.delete();
      LOG.error(e.toString());
      LOG.debug(e.toString());
      throw new CrawljaxWebException("Could not save plugin file");
    }
    Plugin plugin = load(id);
    if(plugin == null) {
      delete(id);
      throw new CrawljaxWebException("Could not read plugin descriptor");
    }
    return plugin;
  }
View Full Code Here

TOP

Related Classes of com.crawljax.web.exception.CrawljaxWebException

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.