Class PluginUpdatePlugin

  • All Implemented Interfaces:
    Plugin

    public class PluginUpdatePlugin
    extends java.lang.Object
    implements Plugin
    • 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
      • loader_listener_added

        private boolean loader_listener_added
      • last_id_info

        private java.lang.String last_id_info
    • Constructor Detail

      • PluginUpdatePlugin

        public PluginUpdatePlugin()
    • 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 interface Plugin
        Parameters:
        _plugin_interface - the interface that the plugin must use to communicate with the client
      • initComplete

        protected void initComplete​(PluginConfig plugin_config)
      • 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)