Remote Systems
v6.4.1

com.ibm.etools.systems.files.compile
Class UniversalCompileSubstitutor

java.lang.Object
  extended bycom.ibm.etools.systems.files.compile.UniversalCompileSubstitutor
All Implemented Interfaces:
ISystemCompileCommandSubstitutor, ISystemSubstitutor

public class UniversalCompileSubstitutor
extends Object
implements ISystemCompileCommandSubstitutor

This class is responsible for doing variable substitution for iSeries compile commands


Field Summary
static String Copyright
           
 
Fields inherited from interface com.ibm.etools.systems.core.ui.compile.ISystemCompileCommandSubstitutor
copyright
 
Constructor Summary
UniversalCompileSubstitutor(SystemConnection connection)
          Constructor for UniversalCompileSubstitutor.
 
Method Summary
protected  RemoteCmdSubSystem getCmdsSubSystem()
          Get the command subsystem
protected  String getContainerName(Object context)
          Return the name of the parent folder, for the ${container_name} variable
protected  String getContainerPath(Object context)
          Return the path of the parent folder, for the ${container_path} variable
protected  String getFileSeparator()
          Return the file separator for the ${system_filesep} variable
protected  RemoteFileSubSystem getFilesSubSystem()
          Get the files subsystem
protected  RemoteFileSubSystemFactory getFilesSubSystemFactory()
          Get the files subsystem factory
protected  String getHomeDirectory()
          Return the user's home directory on the remote system, for the ${system_homedir} variable
protected  String getPathDrive(Object context)
          Return the drive part of the path, for the ${resource_path_drive} variable
protected  String getPathRoot(Object context)
          Return the root part of the path, for the ${resource_path_root} variable
protected  String getPathSeparator()
          Return the path separator for the ${system_pathsep} variable
protected  String getResourceName(Object context)
          Return the name of the currently selected resource, for the ${resource_name} variable
protected  String getResourceNameRoot(Object context)
          Return the root part of the name of the currently selected resource, for the ${resource_name_root} variable
protected  String getResourcePath(Object context)
          Return the path of the currently selected resource, for the ${resource_path} variable
 String getSubstitutionValue(String substitutionVariable, Object context)
          Return the string to substitute for the given substitution variable, given the current context object.
protected  String getTempDirectory()
          Return the temporary directory on the remote system, for the ${system_tempdir} variable
protected  String getUserId()
          Return the user ID used to connect with the remote system, for the ${user_id} variable
 void setConnection(SystemConnection connection)
          Reset the connection so one instance can be re-used
 
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

UniversalCompileSubstitutor

public UniversalCompileSubstitutor(SystemConnection connection)
Constructor for UniversalCompileSubstitutor.

Method Detail

setConnection

public void setConnection(SystemConnection connection)
Reset the connection so one instance can be re-used

Specified by:
setConnection in interface ISystemCompileCommandSubstitutor

getSubstitutionValue

public String getSubstitutionValue(String substitutionVariable,
                                   Object context)
Description copied from interface: ISystemSubstitutor
Return the string to substitute for the given substitution variable, given the current context object. This object will be passed whatever was passed into the doSubstitution method.

It is VERY IMPORTANT to return null if you can't do the substitution for some reason! This is a clue to the algorithm that no change was made and increases performance.

Specified by:
getSubstitutionValue in interface ISystemSubstitutor
See Also:
ISystemSubstitutor.getSubstitutionValue(String, Object)

getCmdsSubSystem

protected RemoteCmdSubSystem getCmdsSubSystem()
Get the command subsystem


getFilesSubSystem

protected RemoteFileSubSystem getFilesSubSystem()
Get the files subsystem


getFilesSubSystemFactory

protected RemoteFileSubSystemFactory getFilesSubSystemFactory()
Get the files subsystem factory


getFileSeparator

protected String getFileSeparator()
Return the file separator for the ${system_filesep} variable


getPathSeparator

protected String getPathSeparator()
Return the path separator for the ${system_pathsep} variable


getHomeDirectory

protected String getHomeDirectory()
Return the user's home directory on the remote system, for the ${system_homedir} variable


getTempDirectory

protected String getTempDirectory()
Return the temporary directory on the remote system, for the ${system_tempdir} variable


getUserId

protected String getUserId()
Return the user ID used to connect with the remote system, for the ${user_id} variable


getResourceName

protected String getResourceName(Object context)
Return the name of the currently selected resource, for the ${resource_name} variable


getResourceNameRoot

protected String getResourceNameRoot(Object context)
Return the root part of the name of the currently selected resource, for the ${resource_name_root} variable


getResourcePath

protected String getResourcePath(Object context)
Return the path of the currently selected resource, for the ${resource_path} variable


getPathRoot

protected String getPathRoot(Object context)
Return the root part of the path, for the ${resource_path_root} variable


getPathDrive

protected String getPathDrive(Object context)
Return the drive part of the path, for the ${resource_path_drive} variable


getContainerName

protected String getContainerName(Object context)
Return the name of the parent folder, for the ${container_name} variable


getContainerPath

protected String getContainerPath(Object context)
Return the path of the parent folder, for the ${container_path} variable


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.