本文整理了Java中com.atlassian.plugin.Plugin.getPluginInformation()
方法的一些代码示例,展示了Plugin.getPluginInformation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Plugin.getPluginInformation()
方法的具体详情如下:
包路径:com.atlassian.plugin.Plugin
类名称:Plugin
方法名:getPluginInformation
暂无
代码示例来源:origin: com.atlassian.studio/studio-theme-jira-plugin
public String getPluginDesc(Plugin plugin)
{
if(plugin != null)
{
if(plugin.getPluginInformation() != null)
{
return getI18NText(plugin.getPluginInformation().getDescriptionKey(), plugin.getPluginInformation().getDescription(), plugin);
}
}
return "";
}
代码示例来源: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.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.devrel/developer-toolbox-plugin
private void speakeasyVersion(Map<String, String> container) {
Plugin plugin = pluginAccessor.getPlugin("com.atlassian.labs.speakeasy-plugin");
if (plugin != null) {
container.put("Speakeasy", plugin.getPluginInformation().getVersion());
}
}
代码示例来源:origin: com.atlassian.devrel/developer-toolbox-plugin
private void applinksVersion(Map<String, String> container) {
Plugin plugin = pluginAccessor.getPlugin("com.atlassian.applinks.applinks-plugin");
if (plugin != null) {
container.put("Application Links", plugin.getPluginInformation().getVersion());
}
}
}
代码示例来源:origin: com.atlassian.devrel/developer-toolbox-plugin
private void restVersion(Map<String, String> container) {
Plugin plugin = pluginAccessor.getPlugin("com.atlassian.plugins.rest.atlassian-rest-module");
if (plugin != null) {
container.put("Atlassian REST", plugin.getPluginInformation().getVersion());
}
}
代码示例来源:origin: com.atlassian.devrel/developer-toolbox-plugin
private void aoVersion(Map<String, String> container) {
Plugin plugin = pluginAccessor.getPlugin("com.atlassian.activeobjects.activeobjects-plugin");
if (plugin != null) {
container.put("Active Objects", plugin.getPluginInformation().getVersion());
}
}
代码示例来源:origin: com.atlassian.devrel/developer-toolbox-plugin
private void gadgetsVersion(Map<String, String> container) {
Plugin plugin = pluginAccessor.getPlugin("com.atlassian.gadgets.dashboard");
if (plugin != null) {
container.put("Atlassian Gadgets", plugin.getPluginInformation().getVersion());
}
}
代码示例来源:origin: com.atlassian.devrel/developer-toolbox-plugin
private void upmVersion(Map<String, String> container) {
Plugin plugin = pluginAccessor.getPlugin("com.atlassian.upm.atlassian-universal-plugin-manager-plugin");
if (plugin != null) {
container.put("Universal Plugin Manager", plugin.getPluginInformation().getVersion());
}
}
代码示例来源:origin: com.atlassian.plugin.rest/atlassian-rest-plugin-manager-plugin
@GET
@Path("content")
@Produces(APPLICATION_OCTET_STREAM)
public Response getContent()
{
return Response.ok(PluginResourceResolver.getResourceResolver(plugin).getArtifactAsStream(), APPLICATION_OCTET_STREAM_TYPE)
.header("Content-Disposition", "attachment; filename=" + plugin.getKey() + "-" + plugin.getPluginInformation().getVersion() + ".jar").build();
}
代码示例来源:origin: com.atlassian.devrel/developer-toolbox-plugin
private void auiVersion(Map<String, String> container) {
Plugin plugin = pluginAccessor.getPlugin("com.atlassian.auiplugin");
if (plugin != null) {
container.put("Atlassian User Interface (AUI)", plugin.getPluginInformation().getVersion());
}
}
代码示例来源:origin: com.atlassian.devrel/developer-toolbox-plugin
private void atrVersion(Map<String, String> container) {
Plugin plugin = pluginAccessor.getPlugin("com.atlassian.templaterenderer.api");
if (plugin != null) {
container.put("Atlassian Template Renderer", plugin.getPluginInformation().getVersion());
}
}
代码示例来源: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.plugins/less-transformer-plugin
@Override
public String encodeState(URI uri) {
Plugin plugin = resolvePlugin(uri);
final String version = plugin.getPluginInformation().getVersion();
// For snapshot versions we are encoding the resource with the last modified so the hashes will be less reluctant.
// Unfortunately the last modified date is the date when the plugin was loaded into the system so in other cases
// we need to encode based on plugin version to keep the hashes stable in production environment.
if (version.endsWith(SNAPSHOT_VERSION)) {
return encodeFromDateLastModified(uri, plugin);
}
return version;
}
代码示例来源:origin: com.atlassian.jira/jira-core
private PluginInfo toInfo(final Plugin plugin)
{
return new PluginInfo(plugin.getKey(), plugin.getPluginInformation().getVersion());
}
代码示例来源: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.jira/jira-core
public boolean evaluate(final Plugin input)
{
final String minVersionStr = Float.toString(input.getPluginInformation().getMinVersion());
final VersionNumber pluginMinVersion = new VersionNumber(minVersionStr);
final VersionNumber appVersion = new VersionNumber(getJiraVersionStringWithoutSuffix());
// now if the plugin's minVersion is greater than to the current app version, this plugin needs to be remove.
return pluginMinVersion.isGreaterThan(appVersion);
}
代码示例来源: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;
}
}
代码示例来源:origin: com.atlassian.support/stp
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);
}
代码示例来源:origin: com.atlassian.plugins/atlassian-connect-server-core
private HttpClientOptions getHttpClientOptions() {
HttpClientOptions options = new HttpClientOptions();
options.setThreadPrefix("atlassian-connect");
options.setMaxConnectionsPerHost(productAccessor.getMaxHttpConnectionsPerHost());
options.setUserAgent("Atlassian-Connect/"
+ pluginRetrievalService.getPlugin().getPluginInformation().getVersion());
options.setConnectionTimeout(productAccessor.getHttpConnectionTimeoutSeconds(), TimeUnit.SECONDS);
options.setSocketTimeout(productAccessor.getHttpSocketTimeoutSeconds(), TimeUnit.SECONDS);
options.setRequestTimeout(productAccessor.getHttpRequestTimeoutSeconds(), TimeUnit.SECONDS);
options.setLeaseTimeout(TimeUnit.SECONDS.toMillis(productAccessor.getPluginHttpLeaseTimeoutSeconds()));
return options;
}
}
内容来源于网络,如有侵权,请联系作者删除!