org.dasein.cloud.services.server
Enum Platform

java.lang.Object
  extended by java.lang.Enum<Platform>
      extended by org.dasein.cloud.services.server.Platform
All Implemented Interfaces:
Serializable, Comparable<Platform>

public enum Platform
extends Enum<Platform>

An operating system associated with servers and images.

Author:
George Reese @ enStratus (http://www.enstratus.com)

Enum Constant Summary
CENT_OS
          CentOS
DEBIAN
          Debian
FEDORA_CORE
          Fedora Core
FREE_BSD
          FreeBSD
OPEN_BSD
          OpenBSD
RHEL
          RHEL
SOLARIS
          Solaris
UBUNTU
          Ubuntu
UNIX
          Generic UNIX
UNKNOWN
          No clue
WINDOWS
          Generic Windows
 
Method Summary
 String getDeviceId(String letter)
          Provides an appropriate device ID (e.g.
 String getDeviceMapping(String letter)
          Provides a device mapping (e.g.
static Platform guess(String name)
           
 boolean isBsd()
           
 boolean isLinux()
           
 boolean isOpen()
           
 boolean isUnix()
           
 boolean isWindows()
           
 String toString()
           
static Platform valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Platform[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNIX

public static final Platform UNIX
Generic UNIX


UBUNTU

public static final Platform UBUNTU
Ubuntu


DEBIAN

public static final Platform DEBIAN
Debian


SOLARIS

public static final Platform SOLARIS
Solaris


FEDORA_CORE

public static final Platform FEDORA_CORE
Fedora Core


RHEL

public static final Platform RHEL
RHEL


FREE_BSD

public static final Platform FREE_BSD
FreeBSD


OPEN_BSD

public static final Platform OPEN_BSD
OpenBSD


CENT_OS

public static final Platform CENT_OS
CentOS


WINDOWS

public static final Platform WINDOWS
Generic Windows


UNKNOWN

public static final Platform UNKNOWN
No clue

Method Detail

values

public static Platform[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Platform c : Platform.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Platform valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

guess

public static Platform guess(String name)

getDeviceId

public String getDeviceId(String letter)
Provides an appropriate device ID (e.g. sdh) for this platform given a device letter.

Parameters:
letter - the letter to be mapped into a platform-specific device ID
Returns:
the platform-specific device ID for the target letter

getDeviceMapping

public String getDeviceMapping(String letter)
Provides a device mapping (e.g. /dev/sdh) for the target device letter.

Parameters:
letter - the letter to be mapped
Returns:
the device mapping for the specified letter

isBsd

public boolean isBsd()

isLinux

public boolean isLinux()

isOpen

public boolean isOpen()

isUnix

public boolean isUnix()

isWindows

public boolean isWindows()

toString

public String toString()
Overrides:
toString in class Enum<Platform>