| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer.webstart; |
| | |
| | | * |
| | | */ |
| | | public class WebStartInstaller extends Installer { |
| | | private HashMap<InstallProgressStep, Integer> hmRatio = |
| | | private final HashMap<InstallProgressStep, Integer> hmRatio = |
| | | new HashMap<InstallProgressStep, Integer>(); |
| | | |
| | | private HashMap<InstallProgressStep, Message> hmSummary = |
| | | private final HashMap<InstallProgressStep, Message> hmSummary = |
| | | new HashMap<InstallProgressStep, Message>(); |
| | | |
| | | private static final Logger LOG = |
| | |
| | | * Actually performs the install in this thread. The thread is blocked. |
| | | * |
| | | */ |
| | | @Override |
| | | public void run() |
| | | { |
| | | initMaps(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Integer getRatio(ProgressStep status) |
| | | { |
| | | return hmRatio.get(status); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message getSummary(ProgressStep status) |
| | | { |
| | | Message summary = null; |
| | | Message summary; |
| | | if (InstallProgressStep.DOWNLOADING.equals(status)) { |
| | | summary = loader.getSummary(); |
| | | } else { |
| | |
| | | private InputStream getZipInputStream(Integer maxRatio) |
| | | throws ApplicationException { |
| | | notifyListeners(getFormattedWithPoints(INFO_PROGRESS_DOWNLOADING.get())); |
| | | InputStream in = null; |
| | | |
| | | waitForLoader(maxRatio); |
| | | |
| | | String zipName = getZipFileName(); |
| | | in = |
| | | InputStream in = |
| | | Installer.class.getClassLoader().getResourceAsStream(zipName); |
| | | |
| | | if (in == null) |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String getInstallationPath() |
| | | { |
| | | return getUserData().getServerLocation(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String getInstancePath() |
| | | { |
| | | // TODO |