Package com.biglybt.pifimpl.update
Class PluginUpdatePlugin
- java.lang.Object
-
- com.biglybt.pifimpl.update.PluginUpdatePlugin
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
last_id_info
private boolean
loader_listener_added
private LoggerChannel
log
private static java.lang.String
PLUGIN_CONFIGSECTION_ID
private PluginInterface
plugin_interface
private static java.lang.String
PLUGIN_RESOURCE_ID
static int
RD_SIZE_RETRIES
static int
RD_SIZE_TIMEOUT
-
Constructor Summary
Constructors Constructor Description PluginUpdatePlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
addInstallationActions(UpdateInstaller installer, java.util.Map<java.lang.String,java.util.List<java.lang.String[]>> install_properties, java.lang.String prefix, java.io.File from_file, java.io.File to_file)
Update
addUpdate(PluginInterface pi_for_update, UpdateChecker checker, java.lang.String update_name, java.lang.String[] update_details, java.lang.String old_version, java.lang.String new_version, ResourceDownloader resource_downloader, boolean is_jar, int restart_type, boolean verify)
protected boolean
applyInstallProperties(java.util.Map<java.lang.String,java.util.List<java.lang.String[]>> install_properties, java.lang.String prefix, java.io.File to_file)
protected int
checkForUpdateSupport(UpdateChecker checker, java.lang.String[] ids_to_check, boolean mandatory)
private java.lang.String
findCommand(java.lang.String name)
UpdatableComponent
getCustomUpdateableComponent(java.lang.String id, boolean mandatory)
protected void
initComplete(PluginConfig plugin_config)
void
initialize(PluginInterface _plugin_interface)
This method is called when the Plugin is loaded by the clientprotected void
installRecommendedPlugin(PluginInstaller installer, StandardPlugin plugin)
protected void
installUpdate(UpdateChecker checker, Update update, PluginInterface plugin, boolean unloadable, boolean is_jar, java.lang.String old_version, java.lang.String new_version, java.io.InputStream data, boolean verify)
protected boolean
isVersioned(java.lang.String name)
protected void
logMultiLine(java.lang.String indent, java.util.List lines)
private void
runCommand(java.lang.String[] command)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.biglybt.pif.Plugin
getInitialProperties
-
-
-
-
Field Detail
-
PLUGIN_CONFIGSECTION_ID
private static final java.lang.String PLUGIN_CONFIGSECTION_ID
- See Also:
- Constant Field Values
-
PLUGIN_RESOURCE_ID
private static final java.lang.String PLUGIN_RESOURCE_ID
- See Also:
- Constant Field Values
-
RD_SIZE_RETRIES
public static final int RD_SIZE_RETRIES
- See Also:
- Constant Field Values
-
RD_SIZE_TIMEOUT
public static final int RD_SIZE_TIMEOUT
- See Also:
- Constant Field Values
-
plugin_interface
private PluginInterface plugin_interface
-
log
private LoggerChannel log
-
loader_listener_added
private boolean loader_listener_added
-
last_id_info
private java.lang.String last_id_info
-
-
Method Detail
-
initialize
public void initialize(PluginInterface _plugin_interface)
Description copied from interface:Plugin
This method is called when the Plugin is loaded by the client- Specified by:
initialize
in interfacePlugin
- Parameters:
_plugin_interface
- the interface that the plugin must use to communicate with the client
-
initComplete
protected void initComplete(PluginConfig plugin_config)
-
installRecommendedPlugin
protected void installRecommendedPlugin(PluginInstaller installer, StandardPlugin plugin)
-
getCustomUpdateableComponent
public UpdatableComponent getCustomUpdateableComponent(java.lang.String id, boolean mandatory)
-
checkForUpdateSupport
protected int checkForUpdateSupport(UpdateChecker checker, java.lang.String[] ids_to_check, boolean mandatory)
-
addUpdate
public Update addUpdate(PluginInterface pi_for_update, UpdateChecker checker, java.lang.String update_name, java.lang.String[] update_details, java.lang.String old_version, java.lang.String new_version, ResourceDownloader resource_downloader, boolean is_jar, int restart_type, boolean verify)
-
installUpdate
protected void installUpdate(UpdateChecker checker, Update update, PluginInterface plugin, boolean unloadable, boolean is_jar, java.lang.String old_version, java.lang.String new_version, java.io.InputStream data, boolean verify)
-
addInstallationActions
protected boolean addInstallationActions(UpdateInstaller installer, java.util.Map<java.lang.String,java.util.List<java.lang.String[]>> install_properties, java.lang.String prefix, java.io.File from_file, java.io.File to_file) throws UpdateException
- Throws:
UpdateException
-
applyInstallProperties
protected boolean applyInstallProperties(java.util.Map<java.lang.String,java.util.List<java.lang.String[]>> install_properties, java.lang.String prefix, java.io.File to_file)
-
runCommand
private void runCommand(java.lang.String[] command)
-
findCommand
private java.lang.String findCommand(java.lang.String name)
-
isVersioned
protected boolean isVersioned(java.lang.String name)
-
logMultiLine
protected void logMultiLine(java.lang.String indent, java.util.List lines)
-
-