Remote Systems
v6.4.1

com.ibm.etools.systems.commands
Class RemoteCommandHelpers

java.lang.Object
  extended bycom.ibm.etools.systems.commands.RemoteCommandHelpers

public class RemoteCommandHelpers
extends Object

Static helpers to simplify the act of running a universal command against a local or remote Unix, Windows or Linux command shell.


Field Summary
static String Copyright
           
 
Constructor Summary
RemoteCommandHelpers()
          Constructor for RemoteCommandHelpers.
 
Method Summary
static String getWorkingDirectory(IRemoteFile selectedFile)
          Helper method to return the path to change-directory to, given a selected remote file object
static boolean runUniversalCommand(Shell shell, String cmdString, String path, RemoteCmdSubSystem cmdSubSystem)
           
static boolean runUniversalCommand(Shell shell, String cmdString, String path, RemoteCmdSubSystem cmdSubSystem, boolean isCompile)
          Encapsulation of code needed to run a universal subsystem command.
static void showInView(IRemoteCommandShell cmd)
          Show/log the given command in the commands view
static void showInView(IRemoteCommandShell cmd, boolean isCompile, String cmdString)
           
 
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

RemoteCommandHelpers

public RemoteCommandHelpers()
Constructor for RemoteCommandHelpers.

Method Detail

getWorkingDirectory

public static String getWorkingDirectory(IRemoteFile selectedFile)
Helper method to return the path to change-directory to, given a selected remote file object


runUniversalCommand

public static boolean runUniversalCommand(Shell shell,
                                          String cmdString,
                                          String path,
                                          RemoteCmdSubSystem cmdSubSystem)

runUniversalCommand

public static boolean runUniversalCommand(Shell shell,
                                          String cmdString,
                                          String path,
                                          RemoteCmdSubSystem cmdSubSystem,
                                          boolean isCompile)
Encapsulation of code needed to run a universal subsystem command. A universal command is a command that runs in a Unix or Linux or Windows command shell, as opposed to something unique like an OS/400 or z/OS command. This:

Parameters:
shell - - the shell to use if need to prompt for password or show msg dialog
cmdString - - the resolved command
path - - the path to run the command against
cmdSubSystem - - this connection's command subsystem, which will run the command
Returns:
true if we should continue, false if something went wrong

showInView

public static void showInView(IRemoteCommandShell cmd)
Show/log the given command in the commands view


showInView

public static void showInView(IRemoteCommandShell cmd,
                              boolean isCompile,
                              String cmdString)

Remote Systems
v6.4.1

Copyright © 2005 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.