public class ProductDetectorDefault extends java.lang.Object implements IProductDetector
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BIN
'bin' the sub-folder (relative to product home) holding executables
|
protected InstallerImpl.BIT_OPTION |
productBit
The product's bit, 32 or 64.
|
| Constructor and Description |
|---|
ProductDetectorDefault() |
ProductDetectorDefault(InstallerImpl.BIT_OPTION productBit) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
appendInstallDirOption(java.lang.String command,
java.lang.String installDirectory)
Append installation directory option to installer and uninstaller
|
java.lang.String |
appendOptions(java.lang.String command,
java.lang.String... options)
Append options to installer and uninstaller
|
java.lang.String |
appendSientOption(java.lang.String command)
Append silent option to installer and uninstaller
|
boolean |
deleteRegistry(java.lang.String keyPrefix,
java.lang.String keySuffix,
java.lang.String value)
To delete the value from registry for path starting with
#HKLM_STAccording to product bit productBit, delete the registry's value. |
java.lang.String |
findUnInstaller(java.lang.String home) |
java.lang.String[] |
getBins()
Return an array containing one sub folder 'bin'.
|
java.lang.String |
getDefaultHome()
Return null.
|
java.util.Map<java.lang.String,java.lang.String> |
getHomes()
Return an empty Map.
|
java.lang.String |
getInstaller()
Return null.
|
java.lang.String[] |
getPossibleExecutables()
Return an empty String array.
|
java.lang.String |
getPreferredHome()
Return null.
|
InstallerImpl.BIT_OPTION |
getProductBit() |
java.lang.String |
getRegistryValue(java.lang.String keyPrefix,
java.lang.String keySuffix,
java.lang.String value)
To get the value from registry for path starting with
#HKLM_STAccording to product bit productBit, get the registry's value. |
java.lang.String |
getUnInstaller()
Return null.
|
java.io.File |
getValidExecutable(java.io.File home,
java.lang.String defaultExecutable)
Implement the search logic suggested in the interface.
1. |
void |
setProductBit(InstallerImpl.BIT_OPTION productBit) |
public static final java.lang.String BIN
protected InstallerImpl.BIT_OPTION productBit
public ProductDetectorDefault()
public ProductDetectorDefault(InstallerImpl.BIT_OPTION productBit)
public InstallerImpl.BIT_OPTION getProductBit()
getProductBit in interface IProductDetectorpublic void setProductBit(InstallerImpl.BIT_OPTION productBit)
setProductBit in interface IProductDetectorproductBit - BIT_OPTION, the bit (32 or 64) of the product to detect.public java.lang.String getRegistryValue(java.lang.String keyPrefix,
java.lang.String keySuffix,
java.lang.String value)
#HKLM_STproductBit, get the registry's value.keyPrefix - String, the prefix of the registry path, such as 'HKLM\Software\'.keySuffix - String, the suffix of the registry path, such as 'GPL Ghostscript\9.23'value - String, the registry value, it can be "(Default)".public boolean deleteRegistry(java.lang.String keyPrefix,
java.lang.String keySuffix,
java.lang.String value)
#HKLM_STproductBit, delete the registry's value.keyPrefix - String, the prefix of the registry path, such as 'HKLM\Software\'.keySuffix - String, the suffix of the registry path, such as 'GPL Ghostscript\9.23'value - String, the registry value, it can be "(Default)".public java.util.Map<java.lang.String,java.lang.String> getHomes()
getHomes in interface IProductDetectorpublic java.lang.String getPreferredHome()
getPreferredHome in interface IProductDetectorpublic java.lang.String getDefaultHome()
getDefaultHome in interface IProductDetectorpublic java.lang.String findUnInstaller(java.lang.String home)
throws java.io.FileNotFoundException
findUnInstaller in interface IProductDetectorhome - String, the product's home directoryjava.io.FileNotFoundException - if not foundpublic java.lang.String appendSientOption(java.lang.String command)
IProductDetectorappendSientOption in interface IProductDetectorpublic java.lang.String appendInstallDirOption(java.lang.String command,
java.lang.String installDirectory)
IProductDetectorappendInstallDirOption in interface IProductDetectorpublic java.lang.String appendOptions(java.lang.String command,
java.lang.String... options)
IProductDetectorappendOptions in interface IProductDetectorpublic java.lang.String getInstaller()
getInstaller in interface IProductDetectorpublic java.lang.String getUnInstaller()
getUnInstaller in interface IProductDetectorpublic java.lang.String[] getBins()
getBins in interface IProductDetectorpublic java.lang.String[] getPossibleExecutables()
getPossibleExecutables in interface IProductDetectorpublic java.io.File getValidExecutable(java.io.File home,
java.lang.String defaultExecutable)
throws java.io.FileNotFoundException
getBins() sub folder of product homegetPossibleExecutables() under the product homegetValidExecutable in interface IProductDetectorhome - File, the product home directorydefaultExecutable - String, the default executable. It could be name or "path relative to home".java.io.FileNotFoundException - if no executable could be foundProductDetectorDefaultCopyright © SAS Institute. All Rights Reserved.