Interface ServerPluginProvider
- 
- All Known Implementing Classes:
- JarPluginProvider
 
 public interface ServerPluginProviderProvider of one Server plugin from one external fileAllows to load one plugin from one external file or one directory by declaring the ability to handle it. In order to load multiple files into a single plugin, group them into a directory tree and then load the directory root as a single plugin. 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classServerPluginProvider.PluginDescriptionDescriptor of the Plugin that ServerPluginProvider has to load.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description ServerPluginget(Path srcPath, org.eclipse.jgit.internal.storage.file.FileSnapshot snapshot, ServerPluginProvider.PluginDescription pluginDescriptor)Loads an external file or directory into a Server plugin.StringgetPluginName(Path srcPath)Returns the plugin name of an external file or directoryStringgetProviderPluginName()Returns the plugin name of this provider.booleanhandles(Path srcPath)Declares the availability to manage an external file or directory
 
- 
- 
- 
Method Detail- 
handlesboolean handles(Path srcPath) Declares the availability to manage an external file or directory- Parameters:
- srcPath- the external file or directory
- Returns:
- true if file or directory can be loaded into a Server Plugin
 
 - 
getPluginNameString getPluginName(Path srcPath) Returns the plugin name of an external file or directoryShould be called only if handles(srcFile)returns true and thus srcFile is a supported plugin format. An IllegalArgumentException is thrown otherwise as srcFile is not a valid file format for extracting its plugin name.- Parameters:
- srcPath- external file or directory
- Returns:
- plugin name
 
 - 
getServerPlugin get(Path srcPath, org.eclipse.jgit.internal.storage.file.FileSnapshot snapshot, ServerPluginProvider.PluginDescription pluginDescriptor) throws InvalidPluginException Loads an external file or directory into a Server plugin.Should be called only if handles(srcFile)returns true and thus srcFile is a supported plugin format. An IllegalArgumentException is thrown otherwise as srcFile is not a valid file format for extracting its plugin name.- Parameters:
- srcPath- external file or directory
- snapshot- snapshot of the external file
- pluginDescriptor- descriptor of the ServerPlugin to load
- Throws:
- InvalidPluginException- if plugin is supposed to be handled but cannot be loaded for any other reason
 
 - 
getProviderPluginNameString getProviderPluginName() Returns the plugin name of this provider.Allows to identify which plugin provided the current ServerPluginProvider by returning the plugin name. Helpful for troubleshooting plugin loading problems. - Returns:
- plugin name of this provider
 
 
- 
 
-