Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.subsystems.ifs.commands
Class IFSCmdSubSystem

java.lang.Object
  extended by RemoteCmdSubSystem
      extended by com.ibm.etools.iseries.subsystems.ifs.commands.IFSCmdSubSystem
All Implemented Interfaces:
IISeriesSubSystem

public class IFSCmdSubSystem
extends RemoteCmdSubSystem
implements IISeriesSubSystem


Field Summary
protected  String _userHome
           
 
Constructor Summary
IFSCmdSubSystem(IHost host, IConnectorService connectorService, IService hostService)
           
 
Method Summary
 boolean canRunCommand()
          Determine whether the command subsystem can run a command
 boolean canRunShell()
          Determine whether the command subsystem can run a shell
protected  IServiceCommandShell createRemoteCommandShell(IRemoteCmdSubSystem cmdSS, IHostShell hostShell)
           
 ISubSystem getCmdSubSystem()
          Return the command subsystem ("iSeries Commands") for executing remote QSYS commands
 IRemoteSystemEnvVar getEnvironmentVariable(String name)
          Redirect environment variable support to the QSYS cmd subsystem so all iSeries subsystems share the same env vars.
 IRemoteSystemEnvVar[] getEnvironmentVariableList()
          Redirect environment variable support to the QSYS cmd subsystem so all iSeries subsystems share the same env vars.
 String getEnvironmentVariableValue(String name)
          Redirect environment variable support to the QSYS cmd subsystem so all iSeries subsystems share the same env vars.
 String[] getEnvVarsAsStringArray()
           
 String[] getHostEnvironment()
           
 List getHostEnvironmentVariables()
           
 String getInvalidEnvironmentVariableNameCharacters()
           
 ISubSystem getObjectSubSystem()
          Return the objects subsystem ("iSeries Objects") for accessing remote QSYS libs, objs, mbrs, etc.
 PropertyPage getPropertyPage(Composite parent)
          Override so we are sure no pages are contributed to the subsystems tab of the property page for the parent connection.
 Shell getShell()
          Method required by com.ibm.etools.iseries.core.IISeriesSubSystem interface, which all IBM-supplied iSeries subsystems implement.
 IShellService getShellService()
           
protected  String getUserHome()
          cmvc65821 - private method called by setRemoteEnvironment(DataElement)
protected  void internalCancelShell(Object command, IProgressMonitor monitor)
           
protected  Object[] internalRunCommand(String command, Object context, boolean interpretOutput, IProgressMonitor monitor)
           
protected  Object[] internalRunCommand(String cmd, Object context, IProgressMonitor monitor)
           
protected  Object[] internalRunCommandImpl(String cmd, Object context, boolean interpretOutput, IProgressMonitor monitor)
           
protected  Object[] internalRunCommandImpl(String cmd, Object context, IProgressMonitor monitor)
           
 IRemoteCommandShell internalRunShell(Object context, IProgressMonitor monitor)
           
protected  IRemoteCommandShell internalRunShellImpl(Object context, IProgressMonitor monitor)
           
protected  void internalSendCommandToShell(String cmd, Object command, IProgressMonitor monitor)
           
 boolean runRemoteCommand(IRemoteFile sourceDir, String command)
           
 void setEnvironmentVariableList(String[] envVarNames, String[] envVarValues)
          Redirect environment variable support to the QSYS cmd subsystem so all iSeries subsystems share the same env vars.
 void setShell(Shell shell)
          Method required by com.ibm.etools.iseries.core.IISeriesSubSystem interface, which all IBM-supplied iSeries subsystems implement.
protected  boolean validateCommand(String command)
          Validate given QShell command is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_userHome

protected String _userHome
Constructor Detail

IFSCmdSubSystem

public IFSCmdSubSystem(IHost host,
                       IConnectorService connectorService,
                       IService hostService)
Method Detail

getCmdSubSystem

public ISubSystem getCmdSubSystem()
Description copied from interface: IISeriesSubSystem
Return the command subsystem ("iSeries Commands") for executing remote QSYS commands

Specified by:
getCmdSubSystem in interface IISeriesSubSystem

getObjectSubSystem

public ISubSystem getObjectSubSystem()
Description copied from interface: IISeriesSubSystem
Return the objects subsystem ("iSeries Objects") for accessing remote QSYS libs, objs, mbrs, etc. For historical reasons, this is also known as the "file subsystem".

Specified by:
getObjectSubSystem in interface IISeriesSubSystem

setShell

public void setShell(Shell shell)
Method required by com.ibm.etools.iseries.core.IISeriesSubSystem interface, which all IBM-supplied iSeries subsystems implement.

Set the shell to be used when a dialog is needed, such as when prompting for password or showing an error message.


getShell

public Shell getShell()
Method required by com.ibm.etools.iseries.core.IISeriesSubSystem interface, which all IBM-supplied iSeries subsystems implement.

Get the shell to be used when a dialog is needed, such as when prompting for password or showing an error message. This is as last set by calling setShell(Shell).


validateCommand

protected boolean validateCommand(String command)
Validate given QShell command is valid.


canRunShell

public boolean canRunShell()
Determine whether the command subsystem can run a shell

Returns:
whether a shell can be run or not

canRunCommand

public boolean canRunCommand()
Determine whether the command subsystem can run a command

Returns:
whether a command can be run or not

internalRunShellImpl

protected IRemoteCommandShell internalRunShellImpl(Object context,
                                                   IProgressMonitor monitor)
                                            throws InvocationTargetException,
                                                   InterruptedException,
                                                   SystemMessageException
Throws:
InvocationTargetException
InterruptedException
SystemMessageException

internalRunShell

public IRemoteCommandShell internalRunShell(Object context,
                                            IProgressMonitor monitor)
                                     throws InvocationTargetException,
                                            InterruptedException,
                                            SystemMessageException
Throws:
InvocationTargetException
InterruptedException
SystemMessageException
See Also:
UniversalCmdSubSystemImpl#internalRunShell()

internalRunCommandImpl

protected Object[] internalRunCommandImpl(String cmd,
                                          Object context,
                                          IProgressMonitor monitor)
                                   throws InvocationTargetException,
                                          InterruptedException,
                                          SystemMessageException
Throws:
InvocationTargetException
InterruptedException
SystemMessageException

internalRunCommandImpl

protected Object[] internalRunCommandImpl(String cmd,
                                          Object context,
                                          boolean interpretOutput,
                                          IProgressMonitor monitor)
                                   throws InvocationTargetException,
                                          InterruptedException,
                                          SystemMessageException
Throws:
InvocationTargetException
InterruptedException
SystemMessageException

internalRunCommand

protected Object[] internalRunCommand(String cmd,
                                      Object context,
                                      IProgressMonitor monitor)
                               throws InvocationTargetException,
                                      InterruptedException,
                                      SystemMessageException
Throws:
InvocationTargetException
InterruptedException
SystemMessageException

internalRunCommand

protected Object[] internalRunCommand(String command,
                                      Object context,
                                      boolean interpretOutput,
                                      IProgressMonitor monitor)
                               throws InvocationTargetException,
                                      InterruptedException,
                                      SystemMessageException
Throws:
InvocationTargetException
InterruptedException
SystemMessageException
See Also:
UniversalCmdSubSystemImpl#internalRunCommand()

runRemoteCommand

public boolean runRemoteCommand(IRemoteFile sourceDir,
                                String command)
                         throws InterruptedException
Throws:
InterruptedException
See Also:
UniversalCmdSubSystemImpl#runRemoteCommand(IRemoteFile, String)

internalCancelShell

protected void internalCancelShell(Object command,
                                   IProgressMonitor monitor)
                            throws InvocationTargetException,
                                   InterruptedException
Throws:
InvocationTargetException
InterruptedException

internalSendCommandToShell

protected void internalSendCommandToShell(String cmd,
                                          Object command,
                                          IProgressMonitor monitor)
                                   throws InvocationTargetException,
                                          InterruptedException
Throws:
InvocationTargetException
InterruptedException

createRemoteCommandShell

protected IServiceCommandShell createRemoteCommandShell(IRemoteCmdSubSystem cmdSS,
                                                        IHostShell hostShell)

getPropertyPage

public PropertyPage getPropertyPage(Composite parent)
Override so we are sure no pages are contributed to the subsystems tab of the property page for the parent connection.


getEnvironmentVariable

public IRemoteSystemEnvVar getEnvironmentVariable(String name)
Redirect environment variable support to the QSYS cmd subsystem so all iSeries subsystems share the same env vars.

See Also:
com.ibm.etools.systems.subsystems.RemoteCmdSubSystem#getEnvironmentVariable(String)

getEnvironmentVariableList

public IRemoteSystemEnvVar[] getEnvironmentVariableList()
Redirect environment variable support to the QSYS cmd subsystem so all iSeries subsystems share the same env vars.

See Also:
com.ibm.etools.systems.subsystems.RemoteCmdSubSystem#getEnvironmentVariableList()

getEnvironmentVariableValue

public String getEnvironmentVariableValue(String name)
Redirect environment variable support to the QSYS cmd subsystem so all iSeries subsystems share the same env vars.

See Also:
com.ibm.etools.systems.subsystems.RemoteCmdSubSystem#getEnvironmentVariableValue(String)

setEnvironmentVariableList

public void setEnvironmentVariableList(String[] envVarNames,
                                       String[] envVarValues)
Redirect environment variable support to the QSYS cmd subsystem so all iSeries subsystems share the same env vars.

See Also:
com.ibm.etools.systems.subsystems.RemoteCmdSubSystem#setEnvironmentVariableList(String[], String[])

getUserHome

protected String getUserHome()
cmvc65821 - private method called by setRemoteEnvironment(DataElement)


getHostEnvironment

public String[] getHostEnvironment()

getHostEnvironmentVariables

public List getHostEnvironmentVariables()

getShellService

public IShellService getShellService()

getEnvVarsAsStringArray

public String[] getEnvVarsAsStringArray()

getInvalidEnvironmentVariableNameCharacters

public String getInvalidEnvironmentVariableNameCharacters()

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.