Remote Systems
v6.4.1

com.ibm.etools.systems.core.ui.compile
Class SystemCompileCommand

java.lang.Object
  extended bycom.ibm.etools.systems.core.ui.compile.SystemCompileCommand
All Implemented Interfaces:
Cloneable, IAdaptable, ISystemCompileXMLConstants

public class SystemCompileCommand
extends Object
implements Cloneable, ISystemCompileXMLConstants, IAdaptable

A compile command is represents a command that can be run on a remote system for the explicit purpose of compiling selected source members.

The attributes of a compile command include:


Field Summary
static String Copyright
           
 
Fields inherited from interface com.ibm.etools.systems.core.ui.compile.ISystemCompileXMLConstants
COMPILECOMMAND_ELEMENT, COPYRIGHT_ELEMENT, COPYRIGHT_TEXT, CURRENT_ATTRIBUTE, DEFAULT_ATTRIBUTE, FILE_NAME, ID_ATTRIBUTE, JOBENV_ATTRIBUTE, LABEL_ATTRIBUTE, LABEL_EDITABLE_ATTRIBUTE, LASTUSED_ATTRIBUTE, MENU_ATTRIBUTE, MENU_BOTH_VALUE, MENU_NON_PROMPTABLE_VALUE, MENU_NONE_VALUE, MENU_PROMPTABLE_VALUE, NATURE_ATTRIBUTE, NATURE_IBM_VALUE, NATURE_ISV_VALUE, NATURE_USER_VALUE, ORDER_ATTRIBUTE, ROOT_ELEMENT, STRING_EDITABLE_ATTRIBUTE, TYPE_ATTRIBUTE, TYPE_ELEMENT, VERSION_ATTRIBUTE, VERSION_VALUE
 
Constructor Summary
SystemCompileCommand(SystemCompileType parentType)
          Constructor for SystemCompileCommand
SystemCompileCommand(SystemCompileType parentType, String id, String label, String nature, String defaultString, String currentString, String menuOption, int order)
          Constructor for SystemCompileCommand.
 
Method Summary
 Object clone()
          Clone the object.
 String doVariableSubstitution(Object remoteObject, ISystemCompileCommandSubstitutor substitutor)
          Do substitution of any variables found in the compile command, using the given remote source object.
 Object getAdapter(Class adapterType)
          This is the method required by the IAdaptable interface.
 String getCurrentString()
          Get the current string.
 String getDefaultString()
          Get the default string.
 String getId()
          Get the id.
 String getJobEnvironment()
          Get the job environment property.
 String getLabel()
          Get the label.
 String getMenuOption()
          Get the menu option.
 String getNature()
          Get the nature: either IBM-supplied or user defined.
 int getOrder()
          Get the order.
 SystemCompileType getParentType()
          Get the parent type
 boolean isCommandStringEditable()
          Gets whether the command string is editable in the Work With Compile Commands dialog.
 boolean isIBMSupplied()
          Return true if this is an IBM-supplied type.
 boolean isISVSupplied()
          Return true if this is an ISV-supplied type.
 boolean isLabelEditable()
          Gets whether the label is editable in the Work With Compile Commands dialog.
 boolean isNonPromptable()
          Returns if it is non-promptable.
 boolean isPromptable()
          Returns if it is promptable.
 boolean isUserSupplied()
          Return true if this is an user-supplied type.
 void printCommand(String indent)
          Print the full command string to standard out, for debugging purposes
 void setCommandStringEditable(boolean editable)
          Sets whether the command string is editable in the Work With Compile Commands dialog.
 void setCurrentString(String currentString)
          Set the current string.
 void setDefaultString(String defaultString)
          Set the default string.
 void setId(String identifier)
          Set the id.
 void setIsIBMSupplied()
          Indicate this is IBM supplied.
 void setIsISVSupplied()
          Indicate this is ISV supplied.
 void setIsUserSupplied()
          Indicate this is user supplied.
 void setJobEnvironment(String jobenv)
          Set the job environment property.
 void setLabel(String name)
          Set the label.
 void setLabelEditable(boolean editable)
          Sets whether the label is editable in the Work With Compile Commands dialog.
 void setMenuOption(String menuOption)
          Set the menu option.
 void setMenuOptionBoth()
          Fastpath to setting the menu option to both, which is the typical case
 void setNature(String nature)
          Set the nature: either IBM-supplied or user defined.
 void setOrder(int order)
          Set the order.
 void setParentType(SystemCompileType parentType)
          Sets the parent type
 String toString()
          Return this object as a string.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Copyright

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

SystemCompileCommand

public SystemCompileCommand(SystemCompileType parentType)
Constructor for SystemCompileCommand


SystemCompileCommand

public SystemCompileCommand(SystemCompileType parentType,
                            String id,
                            String label,
                            String nature,
                            String defaultString,
                            String currentString,
                            String menuOption,
                            int order)
Constructor for SystemCompileCommand. Id and label must be a unique value.

Method Detail

setParentType

public void setParentType(SystemCompileType parentType)
Sets the parent type


getParentType

public SystemCompileType getParentType()
Get the parent type

Returns:
the parent type

setId

public void setId(String identifier)
Set the id. This is the unique id of the compile command.


getId

public String getId()
Get the id.

Returns:
the unique id.

setLabel

public void setLabel(String name)
Set the label. This is the visual name the user sees in the compile command list.


getLabel

public String getLabel()
Get the label. This is the visual name the user sees in the compile command list.

Returns:
the label

setNature

public void setNature(String nature)
Set the nature: either IBM-supplied or user defined.

See Also:
setIsIBMSupplied(), setIsUserSupplied(), #setIsISVsupplied()

setIsIBMSupplied

public void setIsIBMSupplied()
Indicate this is IBM supplied. This sets the nature to {#link ISystemCompileXMLConstants#NATURE_IBM_VALUE}


setIsUserSupplied

public void setIsUserSupplied()
Indicate this is user supplied. This sets the nature to {#link ISystemCompileXMLConstants#NATURE_USER_VALUE}


setIsISVSupplied

public void setIsISVSupplied()
Indicate this is ISV supplied. This sets the nature to {#link ISystemCompileXMLConstants#NATURE_ISV_VALUE}


getNature

public String getNature()
Get the nature: either IBM-supplied or user defined.

Returns:
the nature. One of {#link ISystemCompileXMLConstants#NATURE_IBM_VALUE} or {#link ISystemCompileXMLConstants#NATURE_USER_VALUE}
See Also:
isIBMSupplied(), isUserSupplied()

isIBMSupplied

public boolean isIBMSupplied()
Return true if this is an IBM-supplied type. If false it is user or ISV supplied.


isUserSupplied

public boolean isUserSupplied()
Return true if this is an user-supplied type. If false it is IBM or ISV supplied.


isISVSupplied

public boolean isISVSupplied()
Return true if this is an ISV-supplied type. If false it is IBM or user supplied.


setDefaultString

public void setDefaultString(String defaultString)
Set the default string. This is the IBM-supplied compile command (with parameters) that is restored when "Restore Defaults" is pressed.


getDefaultString

public String getDefaultString()
Get the default string. This is the IBM-supplied compile command (with parameters) that is restored when "Restore Defaults" is pressed.

Returns:
the default string

setCurrentString

public void setCurrentString(String currentString)
Set the current string. This is the current value of the compile command (with parameters).


getCurrentString

public String getCurrentString()
Get the current string. This is the current value of the compile command (with parameters).

Returns:
the current string

setMenuOption

public void setMenuOption(String menuOption)
Set the menu option. Dictates in what popup menu, if any, this compile command appears in.


setMenuOptionBoth

public void setMenuOptionBoth()
Fastpath to setting the menu option to both, which is the typical case


getMenuOption

public String getMenuOption()
Get the menu option. Dictates in what popup menu, if any, this compile command appears in.

Returns:
the menu option: One of {#link ISystemCompileXMLConstants#MENU_PROMPTABLE_VALUE} or {#link ISystemCompileXMLConstants#MENU_NON_PROMPTABLE_VALUE} or {#link ISystemCompileXMLConstants#MENU_BOTH_VALUE} or {#link ISystemCompileXMLConstants#MENU_NONE_VALUE}

setOrder

public void setOrder(int order)
Set the order. That is, this compile commands position within the list of compile commands for a given compile type.

Returns:
the compile command's order or position.

getOrder

public int getOrder()
Get the order. That is, this compile commands position within the list of compile commands for a given compile type.

Returns:
the order or position.

isPromptable

public boolean isPromptable()
Returns if it is promptable. Queries the value of the menuOption attribute.

Returns:
true if promptable, false otherwise

isNonPromptable

public boolean isNonPromptable()
Returns if it is non-promptable. Queries the value of the menuOption attribute.


setJobEnvironment

public void setJobEnvironment(String jobenv)
Set the job environment property. This is subsystem specific, and not used by all subsystems.


getJobEnvironment

public String getJobEnvironment()
Get the job environment property.


setLabelEditable

public void setLabelEditable(boolean editable)
Sets whether the label is editable in the Work With Compile Commands dialog.


isLabelEditable

public boolean isLabelEditable()
Gets whether the label is editable in the Work With Compile Commands dialog.


setCommandStringEditable

public void setCommandStringEditable(boolean editable)
Sets whether the command string is editable in the Work With Compile Commands dialog.


isCommandStringEditable

public boolean isCommandStringEditable()
Gets whether the command string is editable in the Work With Compile Commands dialog.


clone

public Object clone()
Clone the object. Creates a new compile command and copies all its attributes. If a subclass adds additional attributes, this method should be subclassed to clone those attributes.


printCommand

public void printCommand(String indent)
Print the full command string to standard out, for debugging purposes


doVariableSubstitution

public String doVariableSubstitution(Object remoteObject,
                                     ISystemCompileCommandSubstitutor substitutor)
Do substitution of any variables found in the compile command, using the given remote source object. It is the responsibility of the caller of this method to supply a "substitutor" that has knowledge of the supported substitution variables for these compile commands. Each implementation will override the substitutor interface to support the necessary getters for resolving their supported variables.

This method retrieves the substitution variable list from the compile manager, and then calls doSubstitutions in it. This in turn will call back to the supplied substitutor for each match it finds in compile string, of a variable in its list.


toString

public String toString()
Return this object as a string.


getAdapter

public Object getAdapter(Class adapterType)
This is the method required by the IAdaptable interface. Given an adapter class type, return an object castable to the type, or null if this is not possible.

Specified by:
getAdapter in interface IAdaptable

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.