本文整理了Java中com.atlassian.plugin.Plugin.getKey()
方法的一些代码示例,展示了Plugin.getKey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Plugin.getKey()
方法的具体详情如下:
包路径:com.atlassian.plugin.Plugin
类名称:Plugin
方法名:getKey
暂无
代码示例来源:origin: com.atlassian.jira/jira-tests
@Override
public String getCompleteKey()
{
return String.format("%s:%s", plugin.getKey(), key);
}
代码示例来源:origin: com.atlassian.jira/jira-tests
public MockPluginAccessor addPlugin(Plugin plugin)
{
plugins.put(plugin.getKey(), plugin);
return this;
}
代码示例来源:origin: com.atlassian.jira/jira-core
@Override
public boolean onEnableException(final Plugin plugin, final Exception pluginException)
{
PluginInfo pluginInfo = trackedPlugins.get(plugin.getKey());
if (pluginInfo != null)
{
PluginInfo value = PluginInfo.addFailures(pluginInfo, pluginException);
failedPlugins.put(plugin.getKey(), value);
}
return false;
}
代码示例来源:origin: com.atlassian.plugins/atlassian-plugins-core
private Plugin findDelayedPlugin(final String key) {
return delayedPlugins.stream()
.filter(plugin -> plugin.getKey().equals(key))
.findFirst()
.orElse(null);
}
代码示例来源:origin: com.atlassian.plugins/atlassian-plugins-core
public Iterable<String> toPluginKeyDependencyTypes(final Set<PluginDependencies.Type> dependencyTypes) {
final List<String> output = new ArrayList<>();
for (final Map.Entry<Plugin, PluginDependencies.Type> entry : plugins.entrySet()) {
if (dependencyTypes.contains(entry.getValue())) {
output.add(entry.getKey().getKey() + "(" + entry.getValue() + ")");
}
}
return output;
}
代码示例来源:origin: com.atlassian.plugins/atlassian-plugins-core
@Override
public Map<String, PluginEnabledState> getPluginEnabledStateMap(Plugin plugin) {
return getStatesMap().entrySet().stream()
.filter(e -> e.getKey().startsWith(plugin.getKey()))
.collect(toMap(Map.Entry::getKey, Map.Entry::getValue));
}
代码示例来源: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: com.atlassian.jira/jira-api
/**
* Set the owner/manager of the item
* @param plugin the plugin who owns/manages this item
* @return the builder
*/
public ManagedConfigurationItemBuilder setSource(Plugin plugin)
{
return setSource(ManagedConfigurationItemService.SOURCE_PREFIX_PLUGIN + plugin.getKey());
}
代码示例来源:origin: com.atlassian.jira/jira-tests
@Override
public int compareTo(final Plugin o)
{
return getKey().compareTo(o.getKey());
}
代码示例来源:origin: com.atlassian.jira/jira-tests
@Before
public void setupMocks()
{
when(mockPlugin.getKey()).thenReturn("plugin.key");
}
代码示例来源:origin: com.atlassian.plugins/atlassian-plugins-core
@Override
public void removePlugin(Plugin plugin) throws PluginException {
if (!(plugin instanceof UnloadablePlugin)) {
super.removePlugin(plugin);
} else {
logger.debug("Detected an unloadable plugin '{}', so skipping removal", plugin.getKey());
}
}
代码示例来源:origin: com.atlassian.plugins/atlassian-plugins-core
@Override
public void discardPlugin(Plugin plugin) throws PluginException {
if (!(plugin instanceof UnloadablePlugin)) {
super.discardPlugin(plugin);
} else {
logger.debug("Detected an unloadable plugin '{}', so skipping discard", plugin.getKey());
}
}
代码示例来源:origin: com.atlassian.plugins/atlassian-plugins-core
@Override
public boolean test(final Plugin plugin) {
return matchType.processMatcher(pattern.matcher(plugin.getKey()));
}
}
代码示例来源: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.jira/jira-core
@PluginEventListener
public void onPluginDisabledEvent(PluginDisabledEvent disabledEvent)
{
final Plugin plugin = disabledEvent.getPlugin();
log.debug(String.format("Plugin with key '%s' has been disabled.", plugin.getKey()));
}
代码示例来源:origin: com.atlassian.jira/jira-core
public PluginInfo apply(Plugin plugin)
{
return new PluginInfo(plugin.getKey(), plugin.getName());
}
}
代码示例来源:origin: com.atlassian.jira/jira-core
public Collection<Plugin> getPlugins()
{
final SortedSet<Plugin> plugins = new TreeSet<>(new PluginComparator());
for(Plugin plugin : pluginAccessor.getPlugins())
{
if (!plugins.add(plugin))
{
throw new IllegalStateException("Multiple plugins with the same key and version:" + plugin.getKey() + " " + plugin.getPluginsVersion());
}
}
return Collections.unmodifiableSet(plugins);
}
代码示例来源:origin: com.atlassian.jira/jira-core
@PluginEventListener
public void onPluginUpgraded(final PluginUpgradedEvent event)
{
remove(event.getPlugin().getKey());
}
代码示例来源:origin: com.atlassian.jira/jira-core
@Override
public void init(Plugin plugin, Element element) throws PluginParseException
{
super.init(plugin, element);
if (systemPermissionOverride(plugin))
{
throw new PluginParseException("Plugin '" + plugin.getKey() + "' cannot override system project permission '" + getKey() + "'");
}
descriptionI18nKey = element.attributeValue("i18n-description-key");
this.element = element;
initCategory(element);
}
代码示例来源:origin: com.atlassian.plugins/atlassian-plugins-core
public void removeState(final Plugin plugin) {
apply(builder -> {
builder.removeState(plugin.getKey());
for (final ModuleDescriptor<?> moduleDescriptor : plugin.getModuleDescriptors()) {
builder.removeState(moduleDescriptor.getCompleteKey());
}
});
}
}
内容来源于网络,如有侵权,请联系作者删除!