Class PluginInstallerImpl
- java.lang.Object
-
- com.biglybt.pifimpl.local.installer.PluginInstallerImpl
-
- All Implemented Interfaces:
PluginInstaller
public class PluginInstallerImpl extends java.lang.Object implements PluginInstaller
-
-
Field Summary
Fields Modifier and Type Field Description private AsyncDispatcher
add_file_install_dispatcher
private CopyOnWriteList<PluginInstallerListener>
listeners
private PluginManager
manager
protected static PluginInstallerImpl
singleton
-
Constructor Summary
Constructors Modifier Constructor Description protected
PluginInstallerImpl(PluginManager _manager)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addFileInstallOperation(FilePluginInstaller installer)
void
addListener(PluginInstallerListener l)
private java.io.File
extractFromVuzeFile(java.io.File file)
protected PluginInterface
getAlreadyInstalledPlugin(java.lang.String id)
protected PluginManager
getPluginManager()
static PluginInstallerImpl
getSingleton(PluginManager _manager)
StandardPlugin
getStandardPlugin(java.lang.String id)
StandardPlugin[]
getStandardPlugins()
Gives access to the list of standard plugins listed on the client's websitevoid
install(InstallablePlugin[] plugins, boolean shared)
Install one of more plugins in a single operationprotected UpdateCheckInstance
install(InstallablePlugin[] plugins, boolean shared, boolean low_noise, java.util.Map<java.lang.Integer,java.lang.Object> properties, PluginInstallationListener listener)
UpdateCheckInstance
install(InstallablePlugin[] plugins, boolean shared, java.util.Map<java.lang.Integer,java.lang.Object> properties, PluginInstallationListener listener)
void
install(InstallablePlugin installable_plugin, boolean shared)
FilePluginInstaller
installFromFile(java.io.File file)
Installs a plugin from a file - must be either a ZIP file or a JAR file as per normal plugin update semantics.void
removeListener(PluginInstallerListener l)
void
requestInstall(java.lang.String reason, InstallablePlugin plugin)
Requests any registered listeners to initiate a plugin install processvoid
uninstall(InstallablePlugin standard_plugin)
void
uninstall(PluginInterface pi)
void
uninstall(PluginInterface[] pis)
void
uninstall(PluginInterface[] pis, PluginInstallationListener listener_maybe_null)
UpdateCheckInstance
uninstall(PluginInterface[] pis, PluginInstallationListener listener_maybe_null, java.util.Map<java.lang.Integer,java.lang.Object> properties)
-
-
-
Field Detail
-
singleton
protected static PluginInstallerImpl singleton
-
manager
private PluginManager manager
-
listeners
private CopyOnWriteList<PluginInstallerListener> listeners
-
add_file_install_dispatcher
private AsyncDispatcher add_file_install_dispatcher
-
-
Constructor Detail
-
PluginInstallerImpl
protected PluginInstallerImpl(PluginManager _manager)
-
-
Method Detail
-
getSingleton
public static PluginInstallerImpl getSingleton(PluginManager _manager)
-
addFileInstallOperation
protected void addFileInstallOperation(FilePluginInstaller installer)
-
getPluginManager
protected PluginManager getPluginManager()
-
getStandardPlugins
public StandardPlugin[] getStandardPlugins() throws PluginException
Description copied from interface:PluginInstaller
Gives access to the list of standard plugins listed on the client's website- Specified by:
getStandardPlugins
in interfacePluginInstaller
- Returns:
- Throws:
PluginException
-
getStandardPlugin
public StandardPlugin getStandardPlugin(java.lang.String id) throws PluginException
- Specified by:
getStandardPlugin
in interfacePluginInstaller
- Throws:
PluginException
-
extractFromVuzeFile
private java.io.File extractFromVuzeFile(java.io.File file) throws PluginException
- Throws:
PluginException
-
installFromFile
public FilePluginInstaller installFromFile(java.io.File file) throws PluginException
Description copied from interface:PluginInstaller
Installs a plugin from a file - must be either a ZIP file or a JAR file as per normal plugin update semantics. Name of file must be of the form:"_" "." ["jar" | "zip" ]. For example myplugin_1.0.jar - Specified by:
installFromFile
in interfacePluginInstaller
- Throws:
PluginException
-
install
public void install(InstallablePlugin installable_plugin, boolean shared) throws PluginException
- Throws:
PluginException
-
install
public void install(InstallablePlugin[] plugins, boolean shared) throws PluginException
Description copied from interface:PluginInstaller
Install one of more plugins in a single operation- Specified by:
install
in interfacePluginInstaller
- Throws:
PluginException
-
install
public UpdateCheckInstance install(InstallablePlugin[] plugins, boolean shared, java.util.Map<java.lang.Integer,java.lang.Object> properties, PluginInstallationListener listener) throws PluginException
- Specified by:
install
in interfacePluginInstaller
- Throws:
PluginException
-
install
protected UpdateCheckInstance install(InstallablePlugin[] plugins, boolean shared, boolean low_noise, java.util.Map<java.lang.Integer,java.lang.Object> properties, PluginInstallationListener listener) throws PluginException
- Throws:
PluginException
-
uninstall
public void uninstall(InstallablePlugin standard_plugin) throws PluginException
- Throws:
PluginException
-
uninstall
public void uninstall(PluginInterface pi) throws PluginException
- Specified by:
uninstall
in interfacePluginInstaller
- Throws:
PluginException
-
uninstall
public void uninstall(PluginInterface[] pis) throws PluginException
- Specified by:
uninstall
in interfacePluginInstaller
- Throws:
PluginException
-
uninstall
public void uninstall(PluginInterface[] pis, PluginInstallationListener listener_maybe_null) throws PluginException
- Specified by:
uninstall
in interfacePluginInstaller
- Throws:
PluginException
-
uninstall
public UpdateCheckInstance uninstall(PluginInterface[] pis, PluginInstallationListener listener_maybe_null, java.util.Map<java.lang.Integer,java.lang.Object> properties) throws PluginException
- Specified by:
uninstall
in interfacePluginInstaller
- Throws:
PluginException
-
getAlreadyInstalledPlugin
protected PluginInterface getAlreadyInstalledPlugin(java.lang.String id)
-
requestInstall
public void requestInstall(java.lang.String reason, InstallablePlugin plugin) throws PluginException
Description copied from interface:PluginInstaller
Requests any registered listeners to initiate a plugin install process- Specified by:
requestInstall
in interfacePluginInstaller
- Throws:
PluginException
-
addListener
public void addListener(PluginInstallerListener l)
- Specified by:
addListener
in interfacePluginInstaller
-
removeListener
public void removeListener(PluginInstallerListener l)
- Specified by:
removeListener
in interfacePluginInstaller
-
-