com.ibm.are.platform
Class Platform

java.lang.Object
  extended by com.ibm.are.platform.Platform
Direct Known Subclasses:
IBMi

public abstract class Platform
extends java.lang.Object

The Platform class defines a set of platform specific operations that must be implemented by a platform impl object. This primary purpose of this class is to provide a platform independent abstraction for performing operations that may require different implementations on different platforms.

Version:
1.0
Author:
IBM

Field Summary
static java.lang.String COPYRIGHT
          Copyright for class bytecode
protected  FileSystem fileSystem
          Object that can perform platform specific file system operations
protected static java.util.logging.Logger logger
          Logger for this class
protected  ProductInfo productInfo
          Object that can be queried to obtain platform specific product information
protected  Shell shell
          Object that provides an interface to the platform's shell environment
protected  UserInfo user
          Object that provides an abstraction for user information
 
Constructor Summary
Platform()
           
 
Method Summary
static Platform current()
          Retrieves a reference to an object that implements platform specific operations for the platform where ARE is currently running.
 UserInfo currentUser()
          Retrieves the user name that is running ARE
 FileSystem fileSystem()
          Retrieves a reference to an object that can perform platform specific file system operations.
 java.lang.String getOsName()
          Retrieves the platform OS name
 java.lang.String getOsVersion()
          Retrieves the platform OS version
abstract  boolean isIBMi()
          Determines if the OS where ARE is currently running is an IBM i OS
abstract  boolean isIBMp()
          Determines if the OS where ARE is currently running is an IBM p OS
abstract  boolean isIBMx()
          Determines if the OS where ARE is currently running is an IBM x OS
abstract  boolean isLinux()
          Determines if the OS where ARE is currently running is a Linux OS
abstract  void onShutdown()
          ARE shutdown hook where platform specific operations can be done
abstract  void onStartup()
          ARE startup hook where platform specific operations can be done
 ProductInfo productInfo()
          Retrieves a reference to an object that can be queried to obtain platform specific product information
abstract  boolean runtimeUserAuthorityChecks()
          Perform any user authority checks prior to ARE running any plugins
 Shell shell()
          Retrieves a reference to an object that provides an interface to the platform's shell environment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright for class bytecode

See Also:
Constant Field Values

logger

protected static java.util.logging.Logger logger
Logger for this class


fileSystem

protected FileSystem fileSystem
Object that can perform platform specific file system operations


shell

protected Shell shell
Object that provides an interface to the platform's shell environment


user

protected UserInfo user
Object that provides an abstraction for user information


productInfo

protected ProductInfo productInfo
Object that can be queried to obtain platform specific product information

Constructor Detail

Platform

public Platform()
Method Detail

current

public static Platform current()
Retrieves a reference to an object that implements platform specific operations for the platform where ARE is currently running.

Returns:
A reference to an object that implements platform specific operations for the platform where ARE is currently running

fileSystem

public FileSystem fileSystem()
Retrieves a reference to an object that can perform platform specific file system operations.

Returns:
An object for performing platform specific file system operations

shell

public Shell shell()
Retrieves a reference to an object that provides an interface to the platform's shell environment.

Returns:
An object that provides an interface to the platform's shell environment

getOsName

public java.lang.String getOsName()
Retrieves the platform OS name

Returns:
The platform OS name

getOsVersion

public java.lang.String getOsVersion()
Retrieves the platform OS version

Returns:
The platform OS version

currentUser

public UserInfo currentUser()
Retrieves the user name that is running ARE

Returns:
The user name that is running ARE

productInfo

public ProductInfo productInfo()
Retrieves a reference to an object that can be queried to obtain platform specific product information

Returns:
An object for obtaining platform specific product information

onStartup

public abstract void onStartup()
ARE startup hook where platform specific operations can be done


onShutdown

public abstract void onShutdown()
ARE shutdown hook where platform specific operations can be done


runtimeUserAuthorityChecks

public abstract boolean runtimeUserAuthorityChecks()
Perform any user authority checks prior to ARE running any plugins

Returns:
true if the user has sufficient authority, false if the user does not. If false is returned from this method, ARE will end immediately without running any plugins.

isIBMi

public abstract boolean isIBMi()
Determines if the OS where ARE is currently running is an IBM i OS

Returns:
true if the OS is an IBM i OS, false if it is not

isIBMp

public abstract boolean isIBMp()
Determines if the OS where ARE is currently running is an IBM p OS

Returns:
true if the OS is an IBM p OS, false if it is not

isLinux

public abstract boolean isLinux()
Determines if the OS where ARE is currently running is a Linux OS

Returns:
true if the OS is a Linux OS, false if it is not

isIBMx

public abstract boolean isIBMx()
Determines if the OS where ARE is currently running is an IBM x OS

Returns:
true if the OS is an IBM x OS, false if it is not