com.izforge.izpack.panels.target
Class TargetPanelHelper

java.lang.Object
  extended by com.izforge.izpack.panels.target.TargetPanelHelper

public class TargetPanelHelper
extends Object

Target panel helper methods.

Author:
Tim Anderson

Field Summary
static String TARGET_PANEL_DIR
          Target panel directory variable name.
 
Constructor Summary
TargetPanelHelper()
           
 
Method Summary
static String getPath(InstallData installData)
          Returns the installation path for the current platform.
static boolean isIncompatibleInstallation(String dir, Boolean readInstallationInformation)
          Determines if there is IzPack installation information at the specified path that is incompatible with the current version of IzPack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TARGET_PANEL_DIR

public static final String TARGET_PANEL_DIR
Target panel directory variable name.

See Also:
Constant Field Values
Constructor Detail

TargetPanelHelper

public TargetPanelHelper()
Method Detail

getPath

public static String getPath(InstallData installData)
Returns the installation path for the current platform.

This looks for a variable in the following order:

  1. TargetPanel.dir.<platform symbolic name>
  2. TargetPanel.dir.<platform name>. This searches any parent platforms if none is found
  3. TargetPanel.dir
  4. DEFAULT_INSTALL_PATH
  5. SYSTEM_user_dir

Parameters:
installData - the installation data
Returns:
the default platform path, or null if none is found

isIncompatibleInstallation

public static boolean isIncompatibleInstallation(String dir,
                                                 Boolean readInstallationInformation)
Determines if there is IzPack installation information at the specified path that is incompatible with the current version of IzPack.

To be incompatible, the file InstallData.INSTALLATION_INFORMATION must exist in the supplied directory, and not contain recognised Pack instances.

Parameters:
dir - the path to check
readInstallationInformation - check .installationinformation file or skip it
Returns:
true if there is incompatible installation information, false if there is no installation info, or it is compatible


Copyright © 2018. All rights reserved.