Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.subsystems.qsys.api
Class NativeWindowsCalls

java.lang.Object
  extended by com.ibm.etools.iseries.subsystems.qsys.api.NativeWindowsCalls

public class NativeWindowsCalls
extends Object

NativeWindowsCalls - This class provides static helper methods which need access native code in Windows


Field Summary
static String copyright
           
 
Constructor Summary
NativeWindowsCalls()
           
 
Method Summary
static int evfDeregisterServer(String alias)
          evfDeregisterServer Deregister a CODE server.
static int evfRegisterServer(String alias, String hostname, String userId, String pwd, String curlib, String[] libl)
          evfRegisterServer Register a temporary server to CODE.
static String getEnvironmentVariable(String key)
          Retrieve a Windows environment variable
static String getWDTInstallDirectory()
          Retrieve the path where WDT is installed.
static String getWindowsDirectory()
          Retrieve the path of the Windows directory.
static boolean isAdminOrPowerUser()
          Check if the current user profile is a member of the local Administrators or Power Users groups
static boolean isCODEInstalled()
          Check if the CODE toolset is installed on the system.
static boolean runLocalCommand(String cmd)
           
static void unloadEvfconsDLL()
          unloadDEvfconsDLL This method must be called before the Workbench closes to release evfcons.dll which is loaded at runtime by rsentv.dll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Constructor Detail

NativeWindowsCalls

public NativeWindowsCalls()
Method Detail

runLocalCommand

public static boolean runLocalCommand(String cmd)

evfRegisterServer

public static int evfRegisterServer(String alias,
                                    String hostname,
                                    String userId,
                                    String pwd,
                                    String curlib,
                                    String[] libl)
evfRegisterServer Register a temporary server to CODE. The server will be register until either: 1) The daemon is shutdown. 2) The server is deregistered manually using the evfDeregister API

Parameters:
alias - 8 Character alias name (CODE server name)
hostname - The actual IP name or address to associate with the alias name
userId - The user ID to connect with
pwd - The password to connect with
curlib - The curlib to set -- CURRENTLY IGNORED
libl[] - Array of libraries in the library list -- CURRENTLY IGNORED
Returns:
Return codes defined in CODEServerManager RC_OK Everything is OK RC_INVALID_ALIAS_LENGTH alias is greater than 8 characters RC_ALIAS_HOST alias is already defined for another host. RC_ALIAS_IGNORED alias is already defined for the same host, userId, pwd, curlib and libl are ignored RC_HOSTNAME_DEFINED hostname is already defined for another alias

evfDeregisterServer

public static int evfDeregisterServer(String alias)
evfDeregisterServer Deregister a CODE server. The server will no longer appear in CODE server lists.

Parameters:
alias - 8 Character alias name (CODE server name)
Returns:
Return codes defined in CODEServerManager RC_OK Everything is OK RC_INVALID_ALIAS_LENGTH alias is greater than 8 characters RC_ALIAS_NOT_FOUND alias is not defined in CODE

unloadEvfconsDLL

public static void unloadEvfconsDLL()
unloadDEvfconsDLL This method must be called before the Workbench closes to release evfcons.dll which is loaded at runtime by rsentv.dll


getWindowsDirectory

public static String getWindowsDirectory()
Retrieve the path of the Windows directory.

Returns:
A string containing the path of the Windows directory WITHOUT a trailing '\' character, null if the path could not be retrieved.

getWDTInstallDirectory

public static String getWDTInstallDirectory()
Retrieve the path where WDT is installed.

Returns:
A string containing the path where WDT is installed, null if the path could not be retrieved.

getEnvironmentVariable

public static String getEnvironmentVariable(String key)
Retrieve a Windows environment variable

Parameters:
key - The key for the environment variable to be retrieved. i.e. path, ProgramFiles or Temp
Returns:
A string containing the value for the environment variable or null if the environment variable is not set

isCODEInstalled

public static boolean isCODEInstalled()
Check if the CODE toolset is installed on the system.


isAdminOrPowerUser

public static boolean isAdminOrPowerUser()
Check if the current user profile is a member of the local Administrators or Power Users groups


Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.