java.lang.Object | |
↳ | com.atlassian.plugin.repositories.FilePluginInstaller |
File-based implementation of a PluginInstaller which writes plugin artifact to a specified directory. Handles reverting installs by keeping track of the first installation for a given instance, and restores it. Installation of plugin artifacts with different names will overwrite an existing artifact of that same name, if it exists, with the only exception being the backup of the first overwritten artifact to support reverting. NOTE: This implementation has a limitation. The issue is that when installing a plugin we are only provided the plugin key and do not know the name of the artifact that provided the original plugin. So if someone installs a new version of an existing plugin in an artifact that has a different name we have no way of telling what artifact provided the original plugin and therefore which artifact to delete. This will result in two of the same plugins, but in different artifacts being left in the plugins directory. Hopefully the versions will differ so that the plugins framework can decide which plugin to enable.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ORIGINAL_PREFIX |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Deletes all backup files in the plugin directory
| |||||||||||
If there is an existing JAR with the same filename, it is replaced.
| |||||||||||
Reverts an installed plugin.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.atlassian.plugin.PluginInstaller
| |||||||||||
From interface
com.atlassian.plugin.RevertablePluginInstaller
|
directory | where plugin JARs will be installed. |
---|
Deletes all backup files in the plugin directory
If there is an existing JAR with the same filename, it is replaced.
RuntimeException | if there was an exception reading or writing files. |
---|
Reverts an installed plugin. Handles plugin file overwrites and different names over time.
pluginKey | The plugin key to revert |
---|