Class PluginDownloadTask

    • Constructor Detail

      • PluginDownloadTask

        public PluginDownloadTask​(java.awt.Component parent,
                                  java.util.Collection<PluginInformation> toUpdate,
                                  java.lang.String title)
        Creates the download task
        Parameters:
        parent - the parent component relative to which the PleaseWaitDialog is displayed
        toUpdate - a collection of plugin descriptions for plugins to update/download. Must not be null.
        title - the title to display in the PleaseWaitDialog
        Throws:
        java.lang.IllegalArgumentException - if toUpdate is null
      • PluginDownloadTask

        public PluginDownloadTask​(ProgressMonitor monitor,
                                  java.util.Collection<PluginInformation> toUpdate,
                                  java.lang.String title)
        Creates the task
        Parameters:
        monitor - a progress monitor. Defaults to NullProgressMonitor.INSTANCE if null
        toUpdate - a collection of plugin descriptions for plugins to update/download. Must not be null.
        title - the title to display in the PleaseWaitDialog
        Throws:
        java.lang.IllegalArgumentException - if toUpdate is null
    • Method Detail

      • setPluginsToDownload

        public void setPluginsToDownload​(java.util.Collection<PluginInformation> toUpdate)
        Sets the collection of plugins to update.
        Parameters:
        toUpdate - the collection of plugins to update. Must not be null.
        Throws:
        java.lang.IllegalArgumentException - if toUpdate is null
      • finish

        protected void finish()
        Description copied from class: PleaseWaitRunnable
        Finish up the data work. Is guaranteed to be called if realRun is called. Finish is called in the gui thread just after the dialog disappeared.
        Specified by:
        finish in class PleaseWaitRunnable
      • realRun

        protected void realRun()
                        throws org.xml.sax.SAXException,
                               java.io.IOException
        Description copied from class: PleaseWaitRunnable
        Called in the worker thread to do the actual work. When any of the exception is thrown, a message box will be displayed and closeDialog is called. finish() is called in any case.
        Specified by:
        realRun in class PleaseWaitRunnable
        Throws:
        org.xml.sax.SAXException - if a SAX error occurs
        java.io.IOException - if an I/O error occurs
      • isCanceled

        public boolean isCanceled()
        Replies true if the task was canceled by the user
        Returns:
        true if the task was stopped by the user
      • getFailedPlugins

        public java.util.Collection<PluginInformationgetFailedPlugins()
        Replies the list of plugins whose download has failed.
        Returns:
        the list of plugins whose download has failed
      • getDownloadedPlugins

        public java.util.Collection<PluginInformationgetDownloadedPlugins()
        Replies the list of successfully downloaded plugins.
        Returns:
        the list of successfully downloaded plugins
      • getLastException

        public java.lang.Exception getLastException()
        Replies the last exception that occurred during download, or null.
        Returns:
        the last exception that occurred during download, or null
        Since:
        9621