|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.izforge.izpack.util.Platforms
public class Platforms
Factory for Platform instances.
| Field Summary | |
|---|---|
static Platform |
AIX
AIX platform. |
static Platform |
DEBIAN_LINUX
Debian Linux platform. |
static Platform |
FEDORA_LINUX
Fedora Linux platform. |
static Platform |
FREEBSD
FreeBSD platform. |
static Platform |
HP_UX
HP/UX platform. |
static Platform |
LINUX
Generic Linux platform. |
static Platform |
MAC
Mac platform. |
static Platform |
MAC_OSX
Mac OSX platform. |
static Platform |
MANDRAKE_LINUX
Mandrake Linux platform. |
static Platform |
MANDRIVA_LINUX
Mandriva Linux platform. |
static Platform |
OS_2
OS/2 platform. |
static Platform[] |
PLATFORMS
Known platforms. |
static Platform |
RED_HAT_LINUX
Red Hat Linux platform. |
static Platform |
SUNOS
SunOS platform. |
static Platform |
SUNOS_SPARC
SunOS/SPARC platform. |
static Platform |
SUNOS_X86
SunOS/x86 platform. |
static Platform |
SUSE_LINUX
SuSE Linux platform. |
static Platform |
UBUNTU_LINUX
Ubuntu Linux platform. |
static Platform |
UNIX
Generic UNIX platform. |
static Platform |
WINDOWS
Windows platform. |
static Platform |
WINDOWS_2003
Windows 2003 platform. |
static Platform |
WINDOWS_7
Windows 7 platform. |
static Platform |
WINDOWS_8
Windows 7 platform. |
static Platform |
WINDOWS_VISTA
Windows Vista platform. |
static Platform |
WINDOWS_XP
Windows XP platform. |
| Constructor Summary | |
|---|---|
Platforms()
|
|
| Method Summary | |
|---|---|
protected boolean |
exists(String path)
Determines if the specified path exists. |
protected Platform |
findMatch(String name,
Platform.Name pname,
Platform.Arch arch,
String version)
Attempts to find a platform that matches the platform name, architecture and version. |
Platform.Arch |
getArch(String arch)
Returns the platform family name given the operating system or symbolic name. |
Platform.Name |
getCurrentOSName()
Returns the platform family name for the current operating system. |
protected Platform.Name |
getCurrentOSName(String name)
Returns the platform family name for the current operating system. |
Platform |
getCurrentPlatform()
Returns the current platform. |
Platform |
getCurrentPlatform(String name,
String arch)
Returns the platform for the specified operating system name and architecture. |
Platform |
getCurrentPlatform(String name,
String arch,
String version)
Returns the current platform given the operating system name, architecture and version. |
Platform |
getCurrentPlatform(String name,
String arch,
String version,
String javaVersion)
Returns the current platform given the operating system name, architecture and version. |
protected Platform.Name |
getLinuxName()
Returns the Linux platform family name. |
Platform.Name |
getName(String name)
Returns the platform family name for the specified operating system name. |
protected Platform |
getPlatform(Platform match,
Platform.Arch arch,
String version,
String javaVersion)
Constructs a new Platform given a match, architecture, version and java version |
Platform |
getPlatform(String name,
String arch)
Returns the platform for the specified operating system name and architecture. |
Platform |
getPlatform(String name,
String arch,
String version)
Returns the platform given the operating system name, architecture and version. |
Platform |
getPlatform(String name,
String arch,
String version,
String javaVersion)
Returns the platform given the operating system name, architecture and version. |
protected String |
getReleasePath()
Returns the release info file path, for Linux distributions. |
protected List<String> |
getText(String path)
Returns the text from the specified file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static Platform AIX
public static Platform DEBIAN_LINUX
public static Platform FEDORA_LINUX
public static Platform FREEBSD
public static Platform HP_UX
public static Platform LINUX
public static Platform MAC
public static Platform MAC_OSX
public static Platform MANDRAKE_LINUX
public static Platform MANDRIVA_LINUX
public static Platform OS_2
public static Platform RED_HAT_LINUX
public static Platform SUNOS
public static Platform SUNOS_X86
public static Platform SUNOS_SPARC
public static Platform SUSE_LINUX
public static Platform UNIX
public static Platform UBUNTU_LINUX
public static Platform WINDOWS
public static Platform WINDOWS_XP
public static Platform WINDOWS_2003
public static Platform WINDOWS_VISTA
public static Platform WINDOWS_7
public static Platform WINDOWS_8
public static Platform[] PLATFORMS
| Constructor Detail |
|---|
public Platforms()
| Method Detail |
|---|
public Platform getCurrentPlatform()
public Platform getCurrentPlatform(String name,
String arch)
name - the operating system namearch - the operating system architecture, or symbolic architecture
public Platform getCurrentPlatform(String name,
String arch,
String version)
name - the operating system namearch - the operating system architecture, or symbolic architectureversion - the operating system version. May be null
public Platform getCurrentPlatform(String name,
String arch,
String version,
String javaVersion)
name - the operating system namearch - the operating system architecture, or symbolic architectureversion - the operating system version. May be nulljavaVersion - the java version. May be null
public Platform getPlatform(String name,
String arch)
name - the operating system name or symbolic namearch - the operating system architecture, or symbolic architecture
public Platform getPlatform(String name,
String arch,
String version)
name - the operating system name or symbolic namearch - the operating system architecture, or symbolic architectureversion - the operating system version. May be null
public Platform getPlatform(String name,
String arch,
String version,
String javaVersion)
name - the operating system name or symbolic namearch - the operating system architecture, or symbolic architectureversion - the operating system version. May be nulljavaVersion - the java version
public Platform.Arch getArch(String arch)
arch - the operating system architecture or symbolic architecture. May be null
public Platform.Name getCurrentOSName()
public Platform.Name getName(String name)
name - the operating system name, or symbolic name
protected Platform.Name getCurrentOSName(String name)
protected Platform getPlatform(Platform match,
Platform.Arch arch,
String version,
String javaVersion)
match - the matching platform. If null the new platform will have name set to
Platform.Name.UNKNOWN.arch - the platform architectureversion - the platform version. May be nulljavaVersion - the java version. May be null
protected Platform findMatch(String name,
Platform.Name pname,
Platform.Arch arch,
String version)
name - the platform name or symbolic namepname - the resolved platform namearch - the resolved architectureversion - the version. May be null
null if none is foundprotected Platform.Name getLinuxName()
protected List<String> getText(String path)
path - the file path
null if the file could not be readprotected String getReleasePath()
protected boolean exists(String path)
path - the path
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||