Examples of PluginDescriptor


Examples of org.apache.nutch.plugin.PluginDescriptor

  /**
   * Process a request for resource inside plugin
   */
  protected void doGet(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    PluginDescriptor descriptor = null;
    String resPath = null;

    String path = getContextRelativePath(request);
    String id = getPluginId(path);
    if (id != null) {
      resPath = PATH.substring(1) + getPluginRelativePath(path);

      descriptor = getServiceLocator().getPluginRepository()
          .getPluginDescriptor(id);

      if (descriptor != null) {

        if (descriptor != null) {
          InputStream is = descriptor.getClassLoader().getResourceAsStream(
              resPath);
          if (is != null) {
            // buffer for content
            byte[] buffer = new byte[response.getBufferSize()];

View Full Code Here

Examples of org.gradle.api.internal.plugins.PluginDescriptor

        PluginDescriptorCollectorAction(List<PluginDescriptor> descriptors) {
            this.descriptors = descriptors;
        }

        public void execute(FileCopyDetails fileCopyDetails) {
            PluginDescriptor descriptor;
            try {
                descriptor = new PluginDescriptor(fileCopyDetails.getFile().toURI().toURL());
            } catch (MalformedURLException e) {
                // Not sure under what scenario (if any) this would occur,
                // but there's no sense in collecting the descriptor if it does.
                return;
            }
            if (descriptor.getImplementationClassName() != null) {
                descriptors.add(descriptor);
            }
        }
View Full Code Here

Examples of org.java.plugin.registry.PluginDescriptor

                NameAndVersion nameAndVersion = new NameAndVersion(nav[0], vn, true,
                        file);
                for (Iterator<String> it = urls.keySet().iterator(); it.hasNext();) {
                    String loc = it.next();
                    if (loc.indexOf(nav[0]) >= 0) {
                        PluginDescriptor desc = urls.get(loc);
                        //System.out.println("Accounted for: "+desc.getId()+" "+desc.getVersion().toString());
                        if (!PluginCore.getManager().isPluginEnabled(urls.get(loc)))
                            nameAndVersion.setStatus(BAD);
                        else
                            nameAndVersion.setStatus(LOADED);
                        it.remove();
                    }
                }
                plugins.add(nameAndVersion);
            }
        }

        for (String url : urls.keySet()) {
            PluginDescriptor desc = urls.get(url);
            File location =  new File(desc.getLocation().getFile());
            if (location.getPath().indexOf(PluginCore.userPluginDir.getPath()) >= 0)
                continue; // This must be a loaded user dir plugin that's been deleted.
            //System.out.println("File: "+desc.getLocation().getFile());
            NameAndVersion nameAndVersion = new NameAndVersion(desc.getId(),
                    new VersionNumber(desc.getVersion().toString()), false,
                   location);
            if (!PluginCore.getManager().isPluginEnabled(urls.get(url)))
                nameAndVersion.setStatus(BAD);
            else
                nameAndVersion.setStatus(LOADED);
View Full Code Here

Examples of org.jnode.plugin.PluginDescriptor

    public void refresh() {
        super.refresh();
        try {
            final PluginManager mgr = InitialNaming.lookup(PluginManager.NAME);
            final PluginDescriptor descr = mgr.getRegistry().getPluginDescriptor(name);
            if (descr != null) {
                addStringln("Name:");
                addStringln("\t" + descr.getId());
                addStringln("Provider:");
                addStringln("\t" + descr.getProviderName());
                addStringln("State :");

                try {
                    if (descr.getPlugin().isActive()) {
                        addStringln("\tactive");
                    } else {
                        addStringln("\tinactive");
                    }
                } catch (PluginException PE) {
                    System.err.println(PE);
                }

                addStringln("Prerequisites:");
                PluginPrerequisite[] allPreqs = descr.getPrerequisites();
                PluginPrerequisite current;
                for (int i = 0; i < allPreqs.length; i++) {
                    current = allPreqs[i];
                    addStringln("\t" + current.getPluginReference().getId() + "\t\t" +
                        current.getPluginReference().getVersion());
View Full Code Here

Examples of org.jnode.plugin.PluginDescriptor

                String id = descr.getId();
                rows.add(id);
                List<?> fragments = ((PluginDescriptorModel) descr).fragments();
                if (fragments.size() > 0) {
                    for (Object o : fragments) {
                        PluginDescriptor pd = (PluginDescriptor) o;
                        rows.add(pd.getId() + "\b" + id);
                    }
                }
            }
            Collections.sort(rows);
            for (String row : rows) {
View Full Code Here

Examples of org.mule.module.launcher.plugin.PluginDescriptor

        assertNotNull(desc);
        Set<PluginDescriptor> plugins = desc.getPlugins();
        assertNotNull(plugins);
        assertEquals(1, plugins.size());

        final PluginDescriptor plugin = plugins.iterator().next();
        assertEquals("groovy-plugin", plugin.getName());
        final PluginClasspath cp = plugin.getClasspath();
        assertEquals(2, cp.toURLs().length);
        assertTrue(cp.getRuntimeLibs()[0].toExternalForm().endsWith("groovy-all-1.8.0.jar"));
    }
View Full Code Here

Examples of org.rhq.core.clientapi.descriptor.plugin.PluginDescriptor

     *
     * @param pluginName name of the plugin whose descriptor is to be returned.
     * @return the descriptor or null if not available
     */
    public PluginDescriptor getPluginDescriptor(String pluginName) {
        PluginDescriptor descriptor = this.descriptorsByPlugin.get(pluginName);
        if (descriptor == null) {
            PluginMetadataParser parser = this.parsersByPlugin.get(pluginName);
            if (parser != null) {
                descriptor = parser.getDescriptor();
            }
View Full Code Here

Examples of ro.fortsoft.pf4j.PluginDescriptor

        headers = h;
      }
      Object[][] data = new Object[list.size()][];
      for (int i = 0; i < list.size(); i++) {
        PluginWrapper p = list.get(i);
        PluginDescriptor d = p.getDescriptor();
        if (verbose) {
          data[i] = new Object[] { "" + (i + 1), d.getPluginId(), d.getPluginDescription(), d.getVersion(), d.getRequires(), p.getPluginState(), p.getPluginPath() };
        } else {
          data[i] = new Object[] { "" + (i + 1), d.getPluginId(), d.getVersion(), p.getPluginState(), p.getPluginPath() };
        }
      }

      stdout.println(FlipTable.of(headers, data, Borders.BODY_HCOLS));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.