[FIXED JENKINS-12753] Added PluginStrategy.getShortName to avoid actually trying to unpack a plugin before throwing RestartRequiredException.

This commit is contained in:
Jesse Glick committed 2014-05-20 12:57:47 -04:00
1 parent 9062a944b7
commit 7f856b5608
6 files changed
+78 -15

No files matched your search

@@ -24,11 +24,10 @@
package hudson;
import hudson.model.Hudson;
import jenkins.model.Jenkins;
import java.io.File;
import java.io.IOException;
import java.util.List;
import javax.annotation.Nonnull;
/**
* Pluggability point for how to create {@link PluginWrapper}.
@@ -50,6 +49,13 @@ public interface PluginStrategy extends ExtensionPoint {
PluginWrapper createPluginWrapper(File archive)
throws IOException;
/**
* Finds the plugin name without actually unpacking anything {@link #createPluginWrapper} would.
* Needed by {@link PluginManager#dynamicLoad} to decide whether such a plugin is already installed.
* @return the {@link PluginWrapper#getShortName}
*/
@Nonnull String getShortName(File archive) throws IOException;
/**
* Loads the plugin and starts it.
*