com.atlassian.plugin.Plugin.getName()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(8.5k)|赞(0)|评价(0)|浏览(253)

本文整理了Java中com.atlassian.plugin.Plugin.getName()方法的一些代码示例,展示了Plugin.getName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Plugin.getName()方法的具体详情如下:
包路径:com.atlassian.plugin.Plugin
类名称:Plugin
方法名:getName

Plugin.getName介绍

暂无

代码示例

代码示例来源:origin: com.atlassian.support/stp

@Override
  public int compare(Plugin p1, Plugin p2)
  {
    return p1.getName().compareTo(p2.getName());
  }
});

代码示例来源:origin: com.atlassian.labs/speakeasy-plugin

public String getName()
{
  return plugin.getName() != null ? plugin.getName() : plugin.getKey();
}

代码示例来源:origin: com.atlassian.jira/jira-core

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.";
  }
}

代码示例来源:origin: org.randombits.confluence/confluence-intercom

@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();
}

代码示例来源:origin: com.atlassian.plugins/atlassian-connect-core

protected DefaultRemotablePluginAccessorBase(Plugin plugin, Supplier<URI> baseUrlSupplier, HttpContentRetriever httpContentRetriever) {
  this(plugin.getKey(), plugin.getName(), baseUrlSupplier, httpContentRetriever);
}

代码示例来源:origin: com.atlassian.diagnostics/atlassian-diagnostics-core

@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();
}

代码示例来源:origin: com.atlassian.jira/jira-core

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();
  }
}

代码示例来源:origin: com.atlassian.plugins/atlassian-connect-core

@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);
  });
}

代码示例来源:origin: com.atlassian.jira/jira-core

public PluginInfo apply(Plugin plugin)
  {
    return new PluginInfo(plugin.getKey(), plugin.getName());
  }
}

代码示例来源:origin: com.atlassian.plugins/atlassian-plugins-core

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;
}

代码示例来源:origin: com.atlassian.plugins/noddy-plugin-core

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();
  }
}

代码示例来源:origin: com.atlassian.studio/studio-theme-jira-plugin

public String getPluginName(Plugin plugin)
{
  if(plugin != null)
  {
    return getI18NText(plugin.getI18nNameKey(), plugin.getName(), plugin);
  }
  return "";
}

代码示例来源:origin: com.atlassian.jira/jira-core

@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());

代码示例来源:origin: com.atlassian.jira/jira-core

/**
 * 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);
}

代码示例来源:origin: com.atlassian.monitor/atlassian-monitor-plugin

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));
  }
}

代码示例来源:origin: com.atlassian.jira/jira-core

@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()));
}

代码示例来源:origin: com.atlassian.labs/speakeasy-plugin

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());
}

代码示例来源:origin: com.atlassian.labs/speakeasy-plugin

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());
}

代码示例来源:origin: com.atlassian.plugin.rest/atlassian-rest-plugin-manager-plugin

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;
  }
}

代码示例来源:origin: com.atlassian.plugin.rest/atlassian-rest-plugin-manager-plugin

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;
  }
}

相关文章