本文整理了Java中hudson.model.Hudson.getPluginManager()
方法的一些代码示例,展示了Hudson.getPluginManager()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hudson.getPluginManager()
方法的具体详情如下:
包路径:hudson.model.Hudson
类名称:Hudson
方法名:getPluginManager
暂无
代码示例来源:origin: org.eclipse.hudson.main/hudson-inject
@Provides
private PluginManager getPluginManager() {
PluginManager target = plugins != null ? plugins : getHudson().getPluginManager();
checkState(target !=null);
return target;
}
代码示例来源:origin: jenkinsci/thin-backup-plugin
public PluginRestoreJob(UpdateSite site, Authentication auth, Plugin plugin, String version) {
super(site, auth);
this.plugin = plugin;
this.version = version;
this.pm = Hudson.getInstance().getPluginManager();
}
代码示例来源:origin: jenkinsci/build-failure-analyzer-plugin
/**
* Checks if Jenkins is run from inside a HudsonTestCase. For some reason the buildQueue fails to render when run
* under test but works fine when run with hpi:run. So the jelly file skips the inclusion of the sidepanel if we are
* running under test to work around this problem. The check is done via looking at the class name of {@link
* hudson.model.Hudson#getPluginManager()}.
*
* @return true if we are running under test.
*/
public boolean isUnderTest() {
return "org.jvnet.hudson.test.TestPluginManager".
equals(Hudson.getInstance().getPluginManager().getClass().getName());
}
代码示例来源:origin: org.eclipse.hudson/hudson-inject
@Provides
private PluginManager getPluginManager() {
PluginManager target = plugins != null ? plugins : getHudson().getPluginManager();
checkState(target !=null);
return target;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Loads all the extensions.
*/
protected List<ExtensionComponent<T>> load() {
if (LOGGER.isLoggable(Level.FINE))
LOGGER.log(Level.FINE,"Loading ExtensionList: "+extensionType);
return hudson.getPluginManager().getPluginStrategy().findComponents(extensionType, hudson);
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Loads all the extensions.
*/
protected List<ExtensionComponent<T>> load() {
if (LOGGER.isLoggable(Level.FINE))
LOGGER.log(Level.FINE,"Loading ExtensionList: "+extensionType);
return hudson.getPluginManager().getPluginStrategy().findComponents(extensionType, hudson);
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Loads all the extensions.
*/
protected List<ExtensionComponent<T>> load() {
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, "Loading ExtensionList: " + extensionType);
}
return hudson.getPluginManager().getPluginStrategy().findComponents(extensionType, hudson);
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
private FilePath getTargetFile() {
return new FilePath(new File(Hudson.getInstance().getPluginManager().rootDir, name + ".hpi"));
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
private FilePath getTargetFile() {
return new FilePath(new File(Hudson.getInstance().getPluginManager().rootDir,name+".hpi"));
}
}
代码示例来源:origin: org.jvnet.hudson.plugins/groovy-postbuild
public static String getIconPath(String icon) {
if(icon == null) return null;
if(icon.startsWith("/")) return icon;
// Try plugin images dir, fallback to Hudson images dir
PluginWrapper wrapper = Hudson.getInstance().getPluginManager().getPlugin(GroovyPostbuildPlugin.class);
boolean pluginIconExists = (wrapper != null) && new File(wrapper.baseResourceURL.getPath() + "/images/" + icon).exists();
return pluginIconExists ? "/plugin/" + wrapper.getShortName() + "/images/" + icon : Hudson.RESOURCE_PATH + "/images/16x16/" + icon;
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Loads all the extensions.
*/
protected List<ExtensionComponent<T>> load() {
if (LOGGER.isLoggable(Level.FINE))
LOGGER.log(Level.FINE,"Loading ExtensionList: "+extensionType);
return hudson.getPluginManager().getPluginStrategy().findComponents(extensionType, hudson);
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
public boolean isFailedToLoad() {
for (FailedPlugin p : Hudson.getInstance().getPluginManager().getFailedPlugins()) {
if (p.name.equals(shortName)) {
return true;
}
}
return false;
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* If some version of this plugin is currently installed, return
* {@link PluginWrapper}. Otherwise null.
*/
public PluginWrapper getInstalled() {
PluginManager pm = Hudson.getInstance().getPluginManager();
return pm.getPlugin(name);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* If some version of this plugin is currently installed, return {@link PluginWrapper}.
* Otherwise null.
*/
public PluginWrapper getInstalled() {
PluginManager pm = Hudson.getInstance().getPluginManager();
return pm.getPlugin(name);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Finds a resolved method annotated with {@link CLIResolver}.
*/
private Method findResolver(Class type) throws IOException {
List<Method> resolvers = Util.filter(Index.list(CLIResolver.class, Hudson.getInstance().getPluginManager().uberClassLoader), Method.class);
for ( ; type!=null; type=type.getSuperclass())
for (Method m : resolvers)
if (m.getReturnType()==type)
return m;
return null;
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* If some version of this plugin is currently installed, return {@link PluginWrapper}.
* Otherwise null.
*/
public PluginWrapper getInstalled() {
PluginManager pm = Hudson.getInstance().getPluginManager();
return pm.getPlugin(name);
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Finds a resolved method annotated with {@link CLIResolver}.
*/
private Method findResolver(Class type) throws IOException {
List<Method> resolvers = Util.filter(Index.list(CLIResolver.class, Hudson.getInstance().getPluginManager().uberClassLoader), Method.class);
for ( ; type!=null; type=type.getSuperclass())
for (Method m : resolvers)
if (m.getReturnType()==type)
return m;
return null;
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Finds a resolved method annotated with {@link CLIResolver}.
*/
private Method findResolver(Class type) throws IOException {
List<Method> resolvers = Util.filter(Index.list(CLIResolver.class, Hudson.getInstance().getPluginManager().uberClassLoader), Method.class);
for ( ; type!=null; type=type.getSuperclass())
for (Method m : resolvers)
if (m.getReturnType()==type)
return m;
return null;
}
代码示例来源:origin: org.jenkins-ci.plugins/build-pipeline-plugin
/**
* Returns true if it is possible to add parameters to the trigger. This is the case when the
* parameterized-trigger plugin is both installed and active.
*
* @return true if it is possible to add parameters to the trigger
*/
public boolean canAddParameters() {
final PluginWrapper plugin = Hudson.getInstance().getPluginManager().getPlugin("parameterized-trigger"); //$NON-NLS-1$
return plugin != null && plugin.isActive();
}
代码示例来源:origin: org.jenkins-ci.plugins/scriptler
public String getPluginResourcePath() {
PluginWrapper wrapper = Hudson.getInstance().getPluginManager().getPlugin(ScriptlerPluginImpl.class);
return Hudson.getInstance().getRootUrl() + "plugin/" + wrapper.getShortName() + "/";
}
内容来源于网络,如有侵权,请联系作者删除!