public String getErrorMessage(final Plugin input) { return "* The plugin '" + input.getName() + "' (" + input.getKey() + ") is no longer compatible with this version of JIRA and needs to be removed. Its functionality has been incorporated into JIRA core."; } }
@Override public String toString() { StringBuffer out = new StringBuffer(); out.append( "LocalIntercom4" ); out.append( " [plugin: " ); if ( _plugin != null ) out.append( _plugin.getName() ).append( " (" ).append( _plugin.getKey() ).append( ")" ); else out.append( "<unknown>" ); out.append( "]" ); return out.toString(); }
protected DefaultRemotablePluginAccessorBase(Plugin plugin, Supplier<URI> baseUrlSupplier, HttpContentRetriever httpContentRetriever) { this(plugin.getKey(), plugin.getName(), baseUrlSupplier, httpContentRetriever); }
@Nonnull @Override public String getPluginName(@Nonnull String pluginKey) { requireNonNull(pluginKey, "pluginKey"); if (PLUGIN_NOT_DETECTED_KEY.equals(pluginKey)) { return i18nResolver.getText("diagnostics.plugin.not.detected"); } Plugin plugin = pluginAccessor.getPlugin(pluginKey); return plugin == null ? pluginKey : plugin.getName(); }
public String getErrorMessage(final Plugin input) { final StringBuilder errorMessage = new StringBuilder(); errorMessage.append("* ").append(input.getName()).append(" (").append(input.getKey()).append(")"); final float pluginMinVersion = input.getPluginInformation().getMinVersion(); final String pluginVersion = input.getPluginInformation().getVersion(); errorMessage.append(" v").append(pluginVersion).append(" - requires JIRA v").append(pluginMinVersion).append(" minimum"); return errorMessage.toString(); } }
@Deprecated private RemotablePluginAccessor get(final Plugin plugin, final String pluginKey, Optional<ShallowConnectAddon> potentialConnectAddonBean) { Objects.requireNonNull(plugin, "Plugin not found: '" + pluginKey + "'"); return create(pluginKey, plugin.getName(), getDisplayUrl(pluginKey), connectAddonRegistry.getAuthenticationType(pluginKey), () -> { final Supplier<IllegalStateException> addonAccessError = () -> new IllegalStateException("RemotablePluginAccessorFactoryImpl tried to access the connect add-on bean for a P2 plugin."); return potentialConnectAddonBean.orElseThrow(addonAccessError); }); }
public PluginInfo apply(Plugin plugin) { return new PluginInfo(plugin.getKey(), plugin.getName()); } }
static ModuleDescriptor<?> newModuleDescriptor(final Plugin plugin, final Element element, final ModuleDescriptorFactory moduleDescriptorFactory) { final String name = element.getName(); final ModuleDescriptor<?> moduleDescriptor; // Try to retrieve the module descriptor try { moduleDescriptor = moduleDescriptorFactory.getModuleDescriptor(name); } // When there's a problem loading a module, return an UnrecognisedModuleDescriptor with error catch (final Throwable e) { final UnrecognisedModuleDescriptor unrecognisedModuleDescriptor = createUnrecognisedModuleDescriptor(plugin, element, e, moduleDescriptorFactory); log.error("There were problems loading the module '{}' in plugin '{}'. The module has been disabled.", name, plugin.getName()); log.error(unrecognisedModuleDescriptor.getErrorText(), e); return unrecognisedModuleDescriptor; } return moduleDescriptor; }
public EnabledPlugin(final Plugin plugin) { dateEnabling = Plugin.EnabledMetricsSource.Default.getDateEnabling(plugin); dateEnabled = Plugin.EnabledMetricsSource.Default.getDateEnabled(plugin); name = plugin.getName(); key = plugin.getKey(); if (dateEnabled != null && dateEnabling != null) { enableDuration = dateEnabled.getTime() - dateEnabling.getTime(); } }
public String getPluginName(Plugin plugin) { if(plugin != null) { return getI18NText(plugin.getI18nNameKey(), plugin.getName(), plugin); } return ""; }
@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());
/** * This is called then the PluginFactory has decided it can create a plugin BUT it hasn't started it and hence * resolved its dependencies * * @param plugin the plugin that has been created by the PluginFactory but not resolved * @param pluginArtifact the artifact used to load this plugin */ public void trackLoadingPlugin(final Plugin plugin, final PluginArtifact pluginArtifact) { PluginInfo pluginInfo = new PluginInfo(plugin.getKey(), plugin.getName(), Option.some(pluginArtifact)); trackedPlugins.put(plugin.getKey(), pluginInfo); }
private PluginDetails getPluginDetails(AlertTrigger trigger) { String key = trigger.getPluginKey(); String pluginName; if (MonitoringConstants.PLUGIN_NOT_DETECTED_KEY.equals(key)) { pluginName = i18nResolver.getText("monitor.plugin.not.detected"); } else { Plugin plugin = pluginAccessor.getPlugin(key); pluginName = plugin == null ? key : plugin.getName(); } return new PluginDetails(key, pluginName, trigger.getPluginVersion().orElse(null)); } }
@PluginEventListener public void onPluginEnabledEvent(final PluginEnabledEvent enabledEvent) { final Plugin plugin = enabledEvent.getPlugin(); log.debug(String.format("Plugin with key '%s' has been enabled.", plugin.getKey())); // Ensure this plugin has an up-to-date PluginVersion pluginVersionStore.save(new PluginVersionImpl(plugin.getKey(), plugin.getName(), plugin.getPluginInformation().getVersion(), new Date())); }
public CommonJsModules(CommonJsModulesDescriptor descriptor, Bundle pluginBundle, String location) { this.pluginBundle = pluginBundle; this.location = location.endsWith("/") ? location : location + "/"; this.plugin = descriptor.getPlugin(); this.pluginKey = plugin.getKey(); this.pluginName = plugin.getName(); this.moduleKey = descriptor.getKey(); this.description = descriptor.getDescription() != null ? descriptor.getDescription() : ""; this.externalModuleDependencies = unmodifiableSet(scan()); this.publicModuleIds.addAll(descriptor.getExplicitPublicModules()); }
public Extension(Plugin plugin) { notNull(plugin); this.key = plugin.getKey(); this.name = plugin.getName(); this.description = plugin.getPluginInformation().getDescription(); this.version = plugin.getPluginInformation().getVersion(); this.params = new HashMap<String,String>(plugin.getPluginInformation().getParameters()); }
public static PluginDetails getFullDetails(UriBuilder uriBuilder, PluginAccessor pluginAccessor, Plugin plugin) { final PluginDetails pluginDetails = getMinimalDetails(uriBuilder, pluginAccessor, plugin); pluginDetails.setName(plugin.getName()); pluginDetails.setPluginInfo(PluginInfo.getInfo(plugin.getPluginInformation())); pluginDetails.setPluginModules(PluginModule.getModules(pluginAccessor, plugin)); return pluginDetails; } }
protected PluginDetails expandInternal(PluginDetails entity) { final Plugin plugin = pluginAccessor.getPlugin(entity.getKey()); entity.setName(plugin.getName()); entity.setPluginInfo(PluginInfo.getInfo(plugin.getPluginInformation())); entity.setPluginModules(PluginModule.getModules(pluginAccessor, plugin)); return entity; } }