Package org.sonatype.nexus.plugins.plugin.console.model

Examples of org.sonatype.nexus.plugins.plugin.console.model.PluginInfo


    return result;
  }

  private PluginInfo buildPluginInfo(PluginIdentity plugin) {
    PluginInfo result = new PluginInfo();

    result.setStatus("ACTIVATED");
    result.setVersion(plugin.getCoordinates().getVersion());
// TODO: populate with OSGi info?
//    if (pluginResponse.getPluginDescriptor() != null) {
//      result.setName(pluginResponse.getPluginDescriptor().getPluginMetadata().getName());
//      result.setDescription(pluginResponse.getPluginDescriptor().getPluginMetadata().getDescription());
//      result.setScmVersion(pluginResponse.getPluginDescriptor().getPluginMetadata().getScmVersion());
//      result.setScmTimestamp(pluginResponse.getPluginDescriptor().getPluginMetadata().getScmTimestamp());
//      result.setSite(pluginResponse.getPluginDescriptor().getPluginMetadata().getPluginSite());
//    }
//    else {
      result.setName(plugin.getCoordinates().getGroupId() + ":"
          + plugin.getCoordinates().getArtifactId());
//    }

    Collection<DocumentationBundle> docs =
        docBundles.get(plugin.getCoordinates().getArtifactId());
    if (docs != null && !docs.isEmpty()) {
      for (DocumentationBundle bundle : docs) {
        // here, we (mis)use the documentation field, to store path segments only, the REST resource will create
        // proper URLs out this these.
        DocumentationLink link = new DocumentationLink();
        link.setLabel(bundle.getDescription());
        link.setUrl(bundle.getPluginId() + "/" + bundle.getPathPrefix());
        result.addDocumentation(link);
      }
    }

// TODO: log/diagnose OSGi issues?
//    if (!pluginResponse.isSuccessful()) {
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.plugins.plugin.console.model.PluginInfo

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.