@Override
  public Set<String> getResourcePaths(String s) {
    final String pluginPath = "/plugins/" + pluginManager.getName(plugin) + "/";
    final Set<String> proxyResults = proxy.getResourcePaths(pluginPath + s);
    final Set<String> results = new HashSet<>();
    for (final String proxyResult : proxyResults) {
      results.add(proxyResult.replaceFirst(pluginPath, ""));
    }

    return results;
  }
Example #2
0
 ArchivalUnit getAu() {
   if (StringUtil.isNullString(formAuid)) {
     errMsg = "Select an AU";
     return null;
   }
   ArchivalUnit au = pluginMgr.getAuFromId(formAuid);
   if (au == null) {
     errMsg = "No such AU.  Select an AU";
     return null;
   }
   return au;
 }
Example #3
0
 private void crawlPluginRegistries() {
   StringBuilder sb = new StringBuilder();
   for (ArchivalUnit au : pluginMgr.getAllRegistryAus()) {
     sb.append(au.getName());
     sb.append(": ");
     try {
       startCrawl(au, true, false);
       sb.append("Queued.");
     } catch (CrawlManagerImpl.NotEligibleException e) {
       sb.append("Failed: ");
       sb.append(e.getMessage());
     }
     sb.append("\n");
   }
   statusMsg = sb.toString();
 }
 @Override
 public ClassLoader getClassLoader() {
   return pluginManager.getPluginClassloader(plugin);
 }
 @Override
 public InputStream getResourceAsStream(String s) {
   return pluginManager.getPluginClassloader(plugin).getResourceAsStream(stripLeadingSlash(s));
 }
 @Override
 public URL getResource(String s) throws MalformedURLException {
   return pluginManager.getPluginClassloader(plugin).getResource(stripLeadingSlash(s));
 }