Remote Systems
v6.4.1

com.ibm.etools.systems.subsystems.impl
Class RemoteCommandShellImpl

java.lang.Object
  extended bycom.ibm.etools.systems.subsystems.impl.RemoteCommandShellImpl
All Implemented Interfaces:
IAdaptable, IRemoteCommandShell
Direct Known Subclasses:
LocalCommandShellImpl, UniversalCommandShellImpl

public class RemoteCommandShellImpl
extends Object
implements IAdaptable, IRemoteCommandShell


Field Summary
protected  ArrayList _cmdHistory
           
protected  RemoteCmdSubSystem _cmdSubSystem
           
protected  IRemoteFile _cwd
           
protected  RemoteFileSubSystem _fileSubSystem
           
protected  String _id
           
protected  String _name
           
protected  ArrayList _output
           
protected  IProject _project
           
protected  String _type
           
static String Copyright
           
 
Constructor Summary
RemoteCommandShellImpl(RemoteCmdSubSystem cmdSubSystem)
           
 
Method Summary
 void addOutput(Object output)
          Add an output object to the list of output for this command
 void associateProject(IProject project)
           
 Object getAdapter(Class adapterType)
           
 IProject getAssociatedProject()
           
 ICandidateCommand[] getCandidateCommands()
          Override to provide a list of possible commands
 RemoteCmdSubSystem getCommandSubSystem()
          Return the command subsystem associated with this command
 Object getContext()
          Get the current working directory for this command
 RemoteFileSubSystem getFileSubSystem()
          Return the file subsystem associated with this command
 String[] getHistory()
          Return the list of commands passed into this command
 String getId()
          Gets the ID of the command shell
 int getIndexOf(Object output)
          Get the position of this output object in the command container
 String getName()
          Gets the name of the command shell or command that is being run.
 Object getOutputAt(int index)
          Get the output object the specified index
 Object[] getRoots()
           
 int getSize()
          Return the number of output objects for this command.
 String getTitle()
           
 String getType()
          Gets the type of the command shell or command that is being run.
 IRemoteFile getWorkingDirectory()
          Get the current working directory for this command
 boolean isActive()
          Indicate whether the corresponding command is running or not
protected  boolean isWindows()
           
 Object[] listOutput()
          Get the list of output objects for this command.
 void removeOutput()
          Remove output from the list of output for this command
 void removeOutput(Object output)
          Remove output from the list of output for this command
 void setName(String name)
           
 void setType(String type)
           
 void setWorkingDirectory(IRemoteFile file)
          Set the current working directory for this command
 void updateHistory(String cmd)
           
 
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

_id

protected String _id

_name

protected String _name

_type

protected String _type

_cwd

protected IRemoteFile _cwd

_output

protected ArrayList _output

_fileSubSystem

protected RemoteFileSubSystem _fileSubSystem

_cmdSubSystem

protected RemoteCmdSubSystem _cmdSubSystem

_cmdHistory

protected ArrayList _cmdHistory

_project

protected IProject _project
Constructor Detail

RemoteCommandShellImpl

public RemoteCommandShellImpl(RemoteCmdSubSystem cmdSubSystem)
Method Detail

setName

public void setName(String name)

getName

public String getName()
Description copied from interface: IRemoteCommandShell
Gets the name of the command shell or command that is being run.

Specified by:
getName in interface IRemoteCommandShell
Returns:
the name of the command

getId

public String getId()
Description copied from interface: IRemoteCommandShell
Gets the ID of the command shell

Specified by:
getId in interface IRemoteCommandShell
Returns:
the id

setType

public void setType(String type)

getType

public String getType()
Description copied from interface: IRemoteCommandShell
Gets the type of the command shell or command that is being run. The type may either be a "Shell" or a "Command".

Specified by:
getType in interface IRemoteCommandShell
Returns:
the type of the command

getAdapter

public Object getAdapter(Class adapterType)
Specified by:
getAdapter in interface IAdaptable

listOutput

public Object[] listOutput()
Description copied from interface: IRemoteCommandShell
Get the list of output objects for this command.

Specified by:
listOutput in interface IRemoteCommandShell
Returns:
the list of output objects

getIndexOf

public int getIndexOf(Object output)
Description copied from interface: IRemoteCommandShell
Get the position of this output object in the command container

Specified by:
getIndexOf in interface IRemoteCommandShell

getOutputAt

public Object getOutputAt(int index)
Description copied from interface: IRemoteCommandShell
Get the output object the specified index

Specified by:
getOutputAt in interface IRemoteCommandShell

getSize

public int getSize()
Description copied from interface: IRemoteCommandShell
Return the number of output objects for this command.

Specified by:
getSize in interface IRemoteCommandShell
Returns:
the number of output objects

addOutput

public void addOutput(Object output)
Description copied from interface: IRemoteCommandShell
Add an output object to the list of output for this command

Specified by:
addOutput in interface IRemoteCommandShell
Parameters:
output - the output object to add

removeOutput

public void removeOutput()
Description copied from interface: IRemoteCommandShell
Remove output from the list of output for this command

Specified by:
removeOutput in interface IRemoteCommandShell

removeOutput

public void removeOutput(Object output)
Description copied from interface: IRemoteCommandShell
Remove output from the list of output for this command

Specified by:
removeOutput in interface IRemoteCommandShell

getFileSubSystem

public RemoteFileSubSystem getFileSubSystem()
Description copied from interface: IRemoteCommandShell
Return the file subsystem associated with this command

Specified by:
getFileSubSystem in interface IRemoteCommandShell
Returns:
the file subsystem associated with this command

getCommandSubSystem

public RemoteCmdSubSystem getCommandSubSystem()
Description copied from interface: IRemoteCommandShell
Return the command subsystem associated with this command

Specified by:
getCommandSubSystem in interface IRemoteCommandShell
Returns:
the command subsystem associated with this command

getRoots

public Object[] getRoots()

getTitle

public String getTitle()

isActive

public boolean isActive()
Description copied from interface: IRemoteCommandShell
Indicate whether the corresponding command is running or not

Specified by:
isActive in interface IRemoteCommandShell
Returns:
whether the command is running or not

updateHistory

public void updateHistory(String cmd)

getHistory

public String[] getHistory()
Description copied from interface: IRemoteCommandShell
Return the list of commands passed into this command

Specified by:
getHistory in interface IRemoteCommandShell
Returns:
the list of commands issued

getContext

public Object getContext()
Get the current working directory for this command

Specified by:
getContext in interface IRemoteCommandShell
Returns:
the current working directory

getWorkingDirectory

public IRemoteFile getWorkingDirectory()
Get the current working directory for this command

Returns:
the current working directory

setWorkingDirectory

public void setWorkingDirectory(IRemoteFile file)
Set the current working directory for this command

Parameters:
file -

isWindows

protected boolean isWindows()

getCandidateCommands

public ICandidateCommand[] getCandidateCommands()
Override to provide a list of possible commands

Specified by:
getCandidateCommands in interface IRemoteCommandShell
Returns:
the list of possible commands

associateProject

public void associateProject(IProject project)
Specified by:
associateProject in interface IRemoteCommandShell

getAssociatedProject

public IProject getAssociatedProject()
Specified by:
getAssociatedProject in interface IRemoteCommandShell

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.