| | |
| | | import javax.jnlp.UnavailableServiceException; |
| | | |
| | | import org.opends.quicksetup.i18n.ResourceProvider; |
| | | import org.opends.quicksetup.QuickSetupException; |
| | | import org.opends.quicksetup.ApplicationException; |
| | | import org.opends.quicksetup.util.Utils; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class WebStartDownloader implements DownloadServiceListener, |
| | | JnlpProperties { |
| | | private QuickSetupException ex; |
| | | private ApplicationException ex; |
| | | |
| | | private boolean isFinished; |
| | | |
| | |
| | | { |
| | | // This is a bug |
| | | ex = |
| | | new QuickSetupException(QuickSetupException.Type.BUG, |
| | | new ApplicationException(ApplicationException.Type.BUG, |
| | | getExceptionMsg( |
| | | "bug-msg", mfe), mfe); |
| | | } catch (IOException ioe) |
| | | { |
| | | StringBuffer buf = new StringBuffer(); |
| | | StringBuilder buf = new StringBuilder(); |
| | | String[] jars = getJarUrls(); |
| | | for (int i = 0; i < jars.length; i++) |
| | | { |
| | |
| | | String[] arg = |
| | | { buf.toString() }; |
| | | ex = |
| | | new QuickSetupException(QuickSetupException.Type.DOWNLOAD_ERROR, |
| | | new ApplicationException(ApplicationException.Type.DOWNLOAD_ERROR, |
| | | getExceptionMsg("downloading-error", arg, ioe), ioe); |
| | | } catch (Throwable t) |
| | | { |
| | | // This is a bug |
| | | ex = |
| | | new QuickSetupException(QuickSetupException.Type.BUG, |
| | | new ApplicationException(ApplicationException.Type.BUG, |
| | | getExceptionMsg( |
| | | "bug-msg", t), t); |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the QuickSetupException that has occurred during the download or |
| | | * Returns the ApplicationException that has occurred during the download or |
| | | * <CODE>null</CODE> if no exception occurred. |
| | | * @return the QuickSetupException that has occurred during the download or |
| | | * @return the ApplicationException that has occurred during the download or |
| | | * <CODE>null</CODE> if no exception occurred. |
| | | */ |
| | | public QuickSetupException getException() |
| | | public ApplicationException getException() |
| | | { |
| | | return ex; |
| | | } |
| | |
| | | public void downloadFailed(URL url, String version) |
| | | { |
| | | ex = |
| | | new QuickSetupException(QuickSetupException.Type.DOWNLOAD_ERROR, getMsg( |
| | | "downloading-error", new String[] |
| | | { url.toString() }), null); |
| | | new ApplicationException(ApplicationException.Type.DOWNLOAD_ERROR, |
| | | getMsg("downloading-error", new String[] { url.toString() }), null); |
| | | } |
| | | |
| | | /** |