本文整理了Java中com.atlassian.plugin.Plugin.getPluginArtifact()
方法的一些代码示例,展示了Plugin.getPluginArtifact()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Plugin.getPluginArtifact()
方法的具体详情如下:
包路径:com.atlassian.plugin.Plugin
类名称:Plugin
方法名:getPluginArtifact
暂无
代码示例来源:origin: com.atlassian.plugins/atlassian-plugins-core
@Override
public ModuleDescriptor<?> createModule(final Plugin plugin, final Element module, final ModuleDescriptorFactory moduleDescriptorFactory) {
if (plugin instanceof DefaultDynamicPlugin) {
InputStream pluginDescriptor = null;
try {
final PluginArtifact pluginArtifact = plugin.getPluginArtifact();
pluginDescriptor = pluginArtifact.getResourceAsStream(pluginDescriptorFileName);
final DescriptorParser parser = descriptorParserFactory.getInstance(pluginDescriptor, ImmutableSet.of());
return parser.addModule(moduleDescriptorFactory, plugin, module);
} finally {
IOUtils.closeQuietly(pluginDescriptor);
}
}
return null;
}
代码示例来源:origin: com.atlassian.jira/jira-core
@PluginEventListener
public void onPluginUninstalledEvent(final PluginUninstalledEvent uninstalledEvent)
{
final Plugin plugin = uninstalledEvent.getPlugin();
final String pluginKey = plugin.getKey();
log.debug(String.format("Plugin with key '%s' has been uninstalled.", pluginKey));
pluginVersionStore.deleteByKey(pluginKey);
// null indicates that the plugin is not artifact backed
final PluginArtifact pluginArtifact = plugin.getPluginArtifact();
if (pluginArtifact != null)
{
eventPublisher.publish(new JiraHomeChangeEvent(FILE_DELETED, PLUGIN,
new File(pluginPath.getInstalledPluginsDirectory(),
pluginArtifact.getName())));
}
}
内容来源于网络,如有侵权,请联系作者删除!