static Vendor getVendor(PluginInformation pluginInformation) { Preconditions.checkNotNull(pluginInformation); return new Vendor(pluginInformation.getVendorName(), pluginInformation.getVendorUrl()); } }
@Override public void append(final Plugin input, Map<String, Object> map) { PluginInformation info = input.getPluginInformation(); map.put("name", input.getName()); map.put("version", info.getVersion()); map.put("vendor", info.getVendorName()); map.put("enabled", extendedSystemInfoUtils.isPluginEnabled(input)); map.put("parameters", arrarify(info.getParameters())); } }.build(extendedSystemInfoUtils.getPlugins());
private String getPluginAuthor(Plugin plugin) { String author = data.getPluginAuthor(plugin.getKey()); if (author == null) { author = plugin.getPluginInformation().getVendorName(); } if (author == null) { author = "(unknown)"; } return author; } }
private List<WorkflowExtensionsPluginInfo> getWorkflowExtensionsInfo(Map<Plugin, Set<String>> requiredPluginsWithClassnames) throws Exception { List<WorkflowExtensionsPluginInfo> infoList = new ArrayList<WorkflowExtensionsPluginInfo>(requiredPluginsWithClassnames.size()); for (Map.Entry<Plugin, Set<String>> entry : requiredPluginsWithClassnames.entrySet()) { Plugin plugin = entry.getKey(); if(!(plugin instanceof OsgiPlugin)) { throw new Exception(i18n.getText("wfshare.exception.cannot.include.v1.plugin",plugin.getName())); } String artifactName = pluginArtifactFinder.findArtifact(plugin).getName(); Set<String> classnames = entry.getValue(); PluginInformation pinfo = plugin.getPluginInformation(); WorkflowExtensionsPluginInfo info = new WorkflowExtensionsPluginInfo(plugin.getName(), plugin.getKey(), pinfo.getDescription(), pinfo.getVersion(), pinfo.getVendorName(), pinfo.getVendorUrl(),artifactName); for (String cname : classnames) { info.getClassNames().add(cname); } infoList.add(info); } return infoList; }
header(properties, Analyzer.BUNDLE_VENDOR, info.getVendorName()); header(properties, Analyzer.BUNDLE_DOCURL, info.getVendorUrl());
void addPluginInformation(SupportInfoBuilder pluginBuilder, Plugin plugin) { PluginInformation pluginInformation = plugin.getPluginInformation(); pluginBuilder.addValue(PLUGIN_KEY, plugin.getKey()); pluginBuilder.addValue(PLUGIN_VERSION, pluginInformation.getVersion()); pluginBuilder.addValue(PLUGIN_VENDOR, pluginInformation.getVendorName()); pluginBuilder.addValue(PLUGIN_STATUS, plugin.getPluginState().toString()); pluginBuilder.addValue(PLUGIN_VENDOR_URL, pluginInformation.getVendorUrl()); pluginBuilder.addValue(PLUGIN_FRAMEWORK_VERSION, String.valueOf(plugin.getPluginsVersion())); pluginBuilder.addContext(plugin); }
private void loadPluginPropertiesIntoStore(final PropertyStore pluginPropertiesStore, final Collection<Plugin> pluginsCollection) { for (final Plugin plugin : pluginsCollection) { final PluginInformation pluginInformation = plugin.getPluginInformation(); final PropertyStore pluginStore = pluginPropertiesStore.addCategory(PLUGINS_PLUGIN); pluginStore.setValue(PLUGIN_KEY, plugin.getKey()); pluginStore.setValue(PLUGIN_NAME, plugin.getName()); // this is important for the SysInfo page pluginStore.setValue(PLUGIN_VERSION, pluginInformation.getVersion()); pluginStore.setValue(PLUGIN_VENDOR, pluginInformation.getVendorName()); pluginStore.setValue(PLUGIN_STATUS, plugin.getPluginState().toString()); pluginStore.setValue(PLUGIN_VENDOR_URL, pluginInformation.getVendorUrl()); pluginStore.setValue(PLUGIN_FRAMEWORK_VERSION, String.valueOf(plugin.getPluginsVersion())); pluginStore.setValue(PLUGIN_BUNDLED, plugin.isBundledPlugin() ? getText(PLUGIN_BUNDLED) : getText(PLUGIN_USER_INSTALLED)); } }
@Override public String prettyPrint() { FormattedLogMsg logMsg = new FormattedLogMsg(); logMsg.outputHeader(name()); logMsg.outputProperty("Number", String.valueOf(size()), 1); for (final PluginInfo pluginInfo : pluginInfos) { logMsg.add(""); logMsg.outputProperty(pluginInfo.getName(), pluginInfo.getKey(), 1); logMsg.outputProperty("Version", pluginInfo.getPluginInformation().getVersion(), 2); logMsg.outputProperty("Status", pluginInfo.isEnabled() ? "enabled" : "disabled", 2); if (pluginInfo.isUnloadable()) { logMsg.outputProperty("Unloadable Reason", pluginInfo.getUnloadableReason(), 2); } logMsg.outputProperty("Vendor", pluginInfo.getPluginInformation().getVendorName(), 2); logMsg.outputProperty("Description", pluginInfo.getPluginInformation().getDescription(), 2); } return logMsg.toString(); } }
private void addPluginInfo(final PropertyStore store) { callAndLogExceptions((Callable<Void>) () -> { Collection<Plugin> plugins = utils.getPlugins(); PluginMetadataManager pluginMetadataManager = ComponentManager.getComponent(PluginMetadataManager.class); PropertyStore pluginProperties = store.addCategory(AbstractSupportApplicationInfo.ENABLED_PLUGINS); for (Plugin plugin : plugins) { PluginInformation pluginInformation = plugin.getPluginInformation(); PropertyStore pluginStore = pluginProperties.addCategory(PLUGINS_PLUGIN); pluginStore.setValue(PLUGIN_KEY, plugin.getKey()); pluginStore.setValue(PLUGIN_NAME, plugin.getName()); pluginStore.setValue(PLUGIN_VERSION, pluginInformation.getVersion()); pluginStore.setValue(PLUGIN_VENDOR, pluginInformation.getVendorName()); pluginStore.setValue(PLUGIN_STATUS, plugin.getPluginState().toString()); pluginStore.setValue(PLUGIN_VENDOR_URL, pluginInformation.getVendorUrl()); pluginStore.setValue(PLUGIN_FRAMEWORK_VERSION, String.valueOf(plugin.getPluginsVersion())); pluginStore.setValue(PLUGIN_USER_INSTALLED, pluginMetadataManager.isUserInstalled(plugin) ? "true" : "false"); pluginStore.setValue(PLUGIN_BUNDLED, plugin.isBundledPlugin() ? getText(PLUGIN_BUNDLED) : getText(PLUGIN_USER_INSTALLED)); } return null; }); }
pluginStore.setValue(PLUGIN_NAME, plugin.getName()); pluginStore.setValue(PLUGIN_VERSION, info.getVersion()); pluginStore.setValue(PLUGIN_VENDOR, info.getVendorName()); pluginStore.setValue(PLUGIN_STATUS, plugin.getPluginState().toString()); pluginStore.setValue(PLUGIN_BUNDLED, plugin.isBundledPlugin() ? getText(PLUGIN_BUNDLED) : getText(PLUGIN_USER_INSTALLED));