Remote Systems
v6.4.1

com.ibm.etools.systems.core.ui.uda
Class SystemUDActionSubsystem

java.lang.Object
  extended bycom.ibm.etools.systems.core.ui.uda.SystemUDActionSubsystem
All Implemented Interfaces:
ISystemSubstitutor
Direct Known Subclasses:
UDActionSubsystemFiles

public abstract class SystemUDActionSubsystem
extends Object
implements ISystemSubstitutor

Provide the interface to customize and implement the user-defined actions support for the subsystems which implement it. Subsystems are expected to override these methods as required.

For some subsystem factories, actions and types can be partitioned/scoped by "domain". Eg, for iSeries actions are scoped by object and member, and each has unique lists of actions and types. This base class offers all the support for supporting domains, but it is triggered by the method supportsDomains() which is overridden by child classes appropriately.

Some subsystems will support named types by which actions can be scoped. This support is triggered by supportsTypes(), which returns true by default but can be overridden by childclasses.


Field Summary
protected  SubSystem _subsystem
           
static String Copyright
           
protected  SystemUDActionElement currentAction
           
static int DOMAIN_NONE
           
protected  SubSystemFactory subsystemFactory
           
protected  boolean testAction
           
protected  SystemUDActionManager udActionManager
           
protected  SystemUDAResolvedTypes udaResolvedTypes
           
protected  SystemUDTypeManager udTypeManager
           
 
Fields inherited from interface com.ibm.etools.systems.core.ui.commands.ISystemSubstitutor
copyright
 
Constructor Summary
SystemUDActionSubsystem()
          Constructor
 
Method Summary
 void addUserActions(IMenuManager menu, IStructuredSelection selection, SystemProfile profile, Shell shell)
          Populate context menu ("User Actions->" cascading action) with user actions that meet their type-scoping criteria for given selection.
protected  boolean checkDirtyEditors(IStructuredSelection selection)
           
protected  Object collectNames(Shell shell, Iterator elements, StringBuffer collectedNames)
          When processing an action that has elected to be invoked only once, versus once per selected object, we call this method to collect the names of the selected objects into a single string buffer.
protected  Object collectNamesDefaultMethod(Shell shell, Iterator elements, StringBuffer collectedNames)
          Allows subclasses to call it even if their immediate parent overrides
protected abstract  boolean doActionsMigration(SystemProfile profile, String oldRelease)
          Overridable method for child classes to do migration of their actions.
protected  String doCommandSubstitutions(SystemUDActionElement action, String cmd, Object selectedObject)
          Called when user selects a user action to run, from the base user action class.
protected abstract  boolean doTypesMigration(SystemProfile profile, String oldRelease)
          Overridable method for child classes to do migration of their types.
 boolean eligibleUserActionsForSelection(IStructuredSelection selection, SystemProfile profile)
          Check to see it any actions will apply to this selection.
abstract  SystemCmdSubstVarList getActionSubstVarList(int actionDomainType)
          Return the list of substitution variables for the given domain type.
protected  SystemProfile[] getActiveSystemProfiles()
          Get the active system profiles
protected  String getAllNamesSubstitutionVariable()
          When processing an action that has elected to be invoked only once, versus once per selected object, we call this method to get the "all names" substitution variable so that we can substitute it with the collection of names of all selected objects.
protected static RemoteCmdSubSystem getCommandSubSystem(Object selectedObject)
          Get the command subsystem associated the given remote object
 String getCommonSubstitutionValues(String subvar, Object context)
          This abstraction allows child subclasses to override getSubstitutionValues, yet grandchild subclasses to still call this common class if needed.
protected  SystemUDActionEditPane getCustomUDActionEditPane(SubSystemFactory ssFactory, SystemProfile profile, ISystemUDAEditPaneHoster parent, ISystemUDTreeView tv)
          Historical.
protected  SystemUDActionEditPane getCustomUDActionEditPane(SubSystem ss, ISystemUDAEditPaneHoster parent, ISystemUDTreeView tv)
          Historical.
 SystemUDActionEditPane getCustomUDActionEditPane(SubSystem ss, SubSystemFactory ssFactory, SystemProfile profile, ISystemUDAEditPaneHoster parent, ISystemUDTreeView tv)
          Return the action's edit pane.
 SystemUDTypeEditPane getCustomUDTypeEditPane(SubSystemFactory ssFactory, SystemProfile profile, ISystemUDAEditPaneHoster parent, ISystemUDTreeView tv)
          Historical.
protected  SystemUDTypeEditPane getCustomUDTypeEditPane(SubSystem ss, ISystemUDAEditPaneHoster parent, ISystemUDTreeView tv)
          Historical.
 SystemUDTypeEditPane getCustomUDTypeEditPane(SubSystem ss, SubSystemFactory ssf, SystemProfile profile, ISystemUDAEditPaneHoster parent, ISystemUDTreeView tv)
          Subclasses may override to provide a custom type edit pane subclass.
protected  List getDirtyEditors(IStructuredSelection sel)
           
protected abstract  int getDomainFromSelection(IStructuredSelection selection)
          Determine domain, given the selection.
 Image getDomainImage(int domain)
          Get the domain icon to show in the tree views
 String[] getDomainNames()
          Get the list of untranslated domain names
 Image getDomainNewImage(int domain)
          Get the domain icon to show in the tree views, for the new item for this domain
 Image getDomainNewTypeImage(int domain)
          Get the domain icon to show in the named type tree view, for the new item for this domain
protected  ISystemEditableRemoteObject getEditableFor(IAdaptable selected)
           
protected static RemoteFileSubSystem getFileSubSystem(Object selectedObject)
          Get the first file subsystem associated the given remote object.
 int getMaximumDomain()
          For efficiency reasons, internally we use an integer to represent a domain.
protected  char getNameDelimiter()
          When processing an action that has elected to be invoked only once, versus once per selected object, we call this method to get the delimiter character to surround each name in.
protected  String getNewNodeActionLabel()
          Overridable method for child classes to supply the label to display in the "New" node for actions.
protected  String getNewNodeTypeLabel()
          Overridable method for child classes to supply the label to display in the "New" node for type.
protected static ISystemRemoteElementAdapter getRemoteAdapter(Object o)
          Returns the implementation of ISystemRemoteElement for the given object.
 SystemUDAResolvedTypes getResolvedTypesHelper()
           
 int getSingleDomain(SystemUDBaseManager docManager)
          In some cases, we supports domains in general, but only want to expose one of those domains to the user.
 String getSubstitutionValue(String subvar, Object context)
          From the interface ISystemSubstitutor.
 SubSystem getSubsystem()
          Retrieve current subsystem
 SubSystemFactory getSubSystemFactory()
          Retrieve current subsystem factory.
 String getTestActionName()
          Return the command name that tells us this is an action for testing substitution variables.
 String getTestFileName()
          Return the default name of the test file in test mode.
 String getTestFilePath()
          Return the default path of the test file in test mode The test file is generated at action run-time when the action name is getTestActionName().
protected  String getTypesDelimiter()
          Get the delimiter used to delimiter the types in a type string.
 SystemUDActionManager getUDActionManager()
          Get the singleton manager of user-defined actions for this subsystem factory
 SystemUDTypeManager getUDTypeManager()
          Get the singleton manager of named file types for this subsystem factory
 boolean getWorkingOfflineMode()
          We disable user defined actions if we are in work-offline mode.
 String[] getXlatedDomainNames()
          Get the list of translated domain names
 String[] getXlatedDomainNewNames()
          Get the list of translated domain names for use in the tree view, for the "New" nodes, in the Work With User Actions dialog.
 String[] getXlatedDomainNewTypeNames()
          Get the list of translated domain names for use in the tree view, for the "New" nodes, in the Work With User Types dialog.
 boolean hasUnsupportedSubstitutionVars(Object action, int domain)
           
abstract  String internalGetSubstitutionValue(SystemUDActionElement currentAction, String substitutionVariable, Object context)
          Overridable extension point for child class to do variable substitution for variables unique to them.
protected abstract  boolean isMatch(Object actionType, Object selectedObject, int domainType)
          Compares a particular file type (not named, but actual scalar/generic type) to a specific user-selected remote object.
 String mapDomainName(int domainInteger)
          For efficiency reasons, internally we use an integer to represent a domain.
 int mapDomainName(String domainName)
          Map a given untranslated domain name to its integer value
 String mapDomainXlatedName(int domainInteger)
          For efficiency reasons, internally we use an integer to represent a domain.
 String mapDomainXlatedNewName(int domainInteger)
          Same as above but specifically for what is shown in the work with user actions dialog for the new element
 String mapDomainXlatedNewTypeName(int domainInteger)
          Same as above but specifically for what is shown in the work with named types dialog for the new element
protected  boolean meetsSelection(SystemUDActionElement action, IStructuredSelection selection, int domainType)
          Given an action, and the currently selected remote objects, and the domain of those, return true if ALL of the selected remote objects matches any of the type criteria for this action
abstract  SystemUDActionElement[] primeDefaultActions(SystemUDActionManager udad, SystemProfile profile)
          Prime the user data with the default actions.
abstract  SystemUDTypeElement[] primeDefaultTypes(SystemUDTypeManager udtd)
          Prime the user data with the default types.
protected  void printTestActionInvokeOnceInformation(Shell shell, PrintWriter writer)
          Overriddable method for printing out information about the collected names for "invoke once" actions, when in test mode.
protected  void processingSelection(boolean processingSelection)
          Method called at the start and end of running user actions This allows children a chance to perform some action before and after the actions are run by overriding this method.
protected  String promptCommand(Shell shell, String command)
          Called when processing user action that has the "prompt" attribute set.
protected  String promptCommandDefault(Shell shell, String command)
          This allows child classes to call this directly
 void resetResolvedTypes()
           
protected  String[] resolveTypes(String[] p_types, int domainType)
          Given a list of names that represent named types, resolve that into a concatenated list of all types for the given type names.
 boolean restoreDefaultAction(SystemUDActionElement element, int domain, String actionName)
          Given this IBM-supplied user action, restore it to its IBM-supplied state.
 boolean restoreDefaultType(SystemUDTypeElement element, int domain, String typeName)
          Given this IBM-supplied named type, restore it to its IBM-supplied state
 void run(Shell shell, SystemUDActionElement action, IStructuredSelection selection, ISystemResourceChangeListener viewer)
          When the user selects one or more objects in the RSE, then right clicks and selects a user action, this method is called (by the SystemUDAsBaseAction class).
protected  boolean runCommand(Shell shell, SystemUDActionElement action, String cmdString, RemoteCmdSubSystem cmdSubSystem, Object context, Viewer viewer)
          After an action's command has been resolved (vars substituted) this method is called to actually do the remote command execution
 void setSubsystem(SubSystem ss)
          Set current subsystem
 void setSubSystemFactory(SubSystemFactory ssf)
          Set current subsystem factory.
 boolean supportsDomains()
          Return true if the action/type manager supports domains.
 boolean supportsTypes()
          Return true if actions can be scoped by file types Default is true
 boolean supportsTypes(int domain)
          Return true if actions can be scoped by file types for the given domain.
 
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

DOMAIN_NONE

public static final int DOMAIN_NONE
See Also:
Constant Field Values

_subsystem

protected SubSystem _subsystem

subsystemFactory

protected SubSystemFactory subsystemFactory

udActionManager

protected SystemUDActionManager udActionManager

udTypeManager

protected SystemUDTypeManager udTypeManager

udaResolvedTypes

protected SystemUDAResolvedTypes udaResolvedTypes

currentAction

protected SystemUDActionElement currentAction

testAction

protected boolean testAction
Constructor Detail

SystemUDActionSubsystem

public SystemUDActionSubsystem()
Constructor

Method Detail

doActionsMigration

protected abstract boolean doActionsMigration(SystemProfile profile,
                                              String oldRelease)
Overridable method for child classes to do migration of their actions. This is called on first load of a document, which has a release stamp other than the current release

Returns:
true if any migration was done

doTypesMigration

protected abstract boolean doTypesMigration(SystemProfile profile,
                                            String oldRelease)
Overridable method for child classes to do migration of their types. This is called on first load of a document, which has a release stamp other than the current release

Returns:
true if any migration was done

getNewNodeActionLabel

protected String getNewNodeActionLabel()
Overridable method for child classes to supply the label to display in the "New" node for actions. Typically only overridden if domains are not supported, as otherwise the child nodes of "New" have the specific labels.
If not overridden, then "New" is used.

Returns:
translated label

getNewNodeTypeLabel

protected String getNewNodeTypeLabel()
Overridable method for child classes to supply the label to display in the "New" node for type. Typically only overridden if domains are not supported, as otherwise the child nodes of "New" have the specific labels.
If not overridden, then "New" is used.

Returns:
translated label

getUDActionManager

public SystemUDActionManager getUDActionManager()
Get the singleton manager of user-defined actions for this subsystem factory


getUDTypeManager

public SystemUDTypeManager getUDTypeManager()
Get the singleton manager of named file types for this subsystem factory


getActionSubstVarList

public abstract SystemCmdSubstVarList getActionSubstVarList(int actionDomainType)
Return the list of substitution variables for the given domain type. Called from edit pane in work with dialog. This must be overridden!


getSubsystem

public SubSystem getSubsystem()
Retrieve current subsystem


setSubsystem

public void setSubsystem(SubSystem ss)
Set current subsystem


getSubSystemFactory

public SubSystemFactory getSubSystemFactory()
Retrieve current subsystem factory. Useful when we don't have a subsystem


setSubSystemFactory

public void setSubSystemFactory(SubSystemFactory ssf)
Set current subsystem factory. Useful when we don't have a subsystem


supportsTypes

public boolean supportsTypes()
Return true if actions can be scoped by file types Default is true


supportsTypes

public boolean supportsTypes(int domain)
Return true if actions can be scoped by file types for the given domain. Default is supportsTypes()


supportsDomains

public boolean supportsDomains()
Return true if the action/type manager supports domains. Default is false


getSingleDomain

public int getSingleDomain(SystemUDBaseManager docManager)
In some cases, we supports domains in general, but only want to expose one of those domains to the user. For example, for file subsystems, we support folder and file domains, but for named types we really only support the file domain.

Default is -1


getCustomUDActionEditPane

public SystemUDActionEditPane getCustomUDActionEditPane(SubSystem ss,
                                                        SubSystemFactory ssFactory,
                                                        SystemProfile profile,
                                                        ISystemUDAEditPaneHoster parent,
                                                        ISystemUDTreeView tv)
Return the action's edit pane. Subclasses should override if they want to return their own edit pane.

Parameters:
ss - - the subsystem if you have it. If you don't have it, pass null.
ssFactory - - the subsystem factory, if you don't have the subsystem.
profile - - the subsystem factory, if you don't have the subsystem.
parent - - the hosting dialog/property page

getCustomUDActionEditPane

protected final SystemUDActionEditPane getCustomUDActionEditPane(SubSystem ss,
                                                                 ISystemUDAEditPaneHoster parent,
                                                                 ISystemUDTreeView tv)
Historical. Now replaced with getCustomUDActionEditPane(SubSystem, SubSystemFactory, SystemProfile, ISystemUDAEditPaneHoster, ISystemUDTreeView)


getCustomUDActionEditPane

protected final SystemUDActionEditPane getCustomUDActionEditPane(SubSystemFactory ssFactory,
                                                                 SystemProfile profile,
                                                                 ISystemUDAEditPaneHoster parent,
                                                                 ISystemUDTreeView tv)
Historical. Now replaced with getCustomUDActionEditPane(SubSystem, SubSystemFactory, SystemProfile, ISystemUDAEditPaneHoster, ISystemUDTreeView)


getCustomUDTypeEditPane

public SystemUDTypeEditPane getCustomUDTypeEditPane(SubSystem ss,
                                                    SubSystemFactory ssf,
                                                    SystemProfile profile,
                                                    ISystemUDAEditPaneHoster parent,
                                                    ISystemUDTreeView tv)
Subclasses may override to provide a custom type edit pane subclass. Subclasses should override if they want to return their own types pane.

Parameters:
ss - - the subsystem if you have it. If you don't have it, pass null.
profile - - the subsystem factory, if you don't have the subsystem.
parent - - the hosting dialog/property page

getCustomUDTypeEditPane

protected final SystemUDTypeEditPane getCustomUDTypeEditPane(SubSystem ss,
                                                             ISystemUDAEditPaneHoster parent,
                                                             ISystemUDTreeView tv)
Historical. Now replaced with getCustomUDTypeEditPane(SubSystem, SubSystemFactory, SystemProfile, ISystemUDAEditPaneHoster, ISystemUDTreeView)


getCustomUDTypeEditPane

public SystemUDTypeEditPane getCustomUDTypeEditPane(SubSystemFactory ssFactory,
                                                    SystemProfile profile,
                                                    ISystemUDAEditPaneHoster parent,
                                                    ISystemUDTreeView tv)
Historical. Now replaced with getCustomUDTypeEditPane(SubSystem, SubSystemFactory, SystemProfile, ISystemUDAEditPaneHoster, ISystemUDTreeView)


primeDefaultTypes

public abstract SystemUDTypeElement[] primeDefaultTypes(SystemUDTypeManager udtd)
Prime the user data with the default types.


primeDefaultActions

public abstract SystemUDActionElement[] primeDefaultActions(SystemUDActionManager udad,
                                                            SystemProfile profile)
Prime the user data with the default actions. Subsystem and profile specific


restoreDefaultAction

public boolean restoreDefaultAction(SystemUDActionElement element,
                                    int domain,
                                    String actionName)
Given this IBM-supplied user action, restore it to its IBM-supplied state.

Returns:
true if all went well, false if it wasn't restore for some reason

restoreDefaultType

public boolean restoreDefaultType(SystemUDTypeElement element,
                                  int domain,
                                  String typeName)
Given this IBM-supplied named type, restore it to its IBM-supplied state

Returns:
true if all went well, false if it wasn't restore for some reason

getTestActionName

public String getTestActionName()
Return the command name that tells us this is an action for testing substitution variables.

Returns "ibm test action"


getTestFileName

public String getTestFileName()
Return the default name of the test file in test mode. The test file is generated at action run-time when the action name is getTestActionName().

Returns "TESTUSERACTION.TXT"


getTestFilePath

public String getTestFilePath()
Return the default path of the test file in test mode The test file is generated at action run-time when the action name is getTestActionName().

Returns "c:\\Test_RSE_User_Actions"


printTestActionInvokeOnceInformation

protected void printTestActionInvokeOnceInformation(Shell shell,
                                                    PrintWriter writer)
Overriddable method for printing out information about the collected names for "invoke once" actions, when in test mode.


run

public void run(Shell shell,
                SystemUDActionElement action,
                IStructuredSelection selection,
                ISystemResourceChangeListener viewer)
When the user selects one or more objects in the RSE, then right clicks and selects a user action, this method is called (by the SystemUDAsBaseAction class).

For each selected object, the action's command is resolved (variable substitution done) by calling doCommandSubstitution, and then run by calling runCommand(...).

Parameters:
shell - - the shell to use for display the prompt, if appropriate
action - - the user action to run
viewer - - the viewer we are running this from. Used to do the refresh if requested in this action. Can be null.

runCommand

protected boolean runCommand(Shell shell,
                             SystemUDActionElement action,
                             String cmdString,
                             RemoteCmdSubSystem cmdSubSystem,
                             Object context,
                             Viewer viewer)
After an action's command has been resolved (vars substituted) this method is called to actually do the remote command execution

Parameters:
shell - - the shell to use if need to prompt for password or show msg dialog
action - - the action being processed, in case attributes of it need to be queried
cmdString - - the resolved command
cmdSubSystem - - this connection's command subsystem, which will run the command
context - - any context information the subsystem's runCommand might need
Returns:
true if we should continue, false if something went wrong

doCommandSubstitutions

protected String doCommandSubstitutions(SystemUDActionElement action,
                                        String cmd,
                                        Object selectedObject)
Called when user selects a user action to run, from the base user action class. Called by our run(...) method


collectNames

protected Object collectNames(Shell shell,
                              Iterator elements,
                              StringBuffer collectedNames)
When processing an action that has elected to be invoked only once, versus once per selected object, we call this method to collect the names of the selected objects into a single string buffer.

This can be overridden if need be. The default behaviour is to concatenate the quoted absolute name of each selected object.

Returns:
first selected object, or null if something went wrong (msg will have been issued)

collectNamesDefaultMethod

protected Object collectNamesDefaultMethod(Shell shell,
                                           Iterator elements,
                                           StringBuffer collectedNames)
Allows subclasses to call it even if their immediate parent overrides


getAllNamesSubstitutionVariable

protected String getAllNamesSubstitutionVariable()
When processing an action that has elected to be invoked only once, versus once per selected object, we call this method to get the "all names" substitution variable so that we can substitute it with the collection of names of all selected objects.

The default is "${resource_name}", but can be overridden.


getNameDelimiter

protected char getNameDelimiter()
When processing an action that has elected to be invoked only once, versus once per selected object, we call this method to get the delimiter character to surround each name in.

The default is a double quote, but can be overridden. For example, for iSeries native file systems, this is overridden with a single quote.


promptCommand

protected String promptCommand(Shell shell,
                               String command)
Called when processing user action that has the "prompt" attribute set. By default, puts up dialog allowing user to see and edit the fully resolved command.

Parameters:
shell - - the shell to host the modal dialog
command - - the fully resolved (variables substituted) command
Returns:
the edited command string, or null if the user pressed cancel

promptCommandDefault

protected String promptCommandDefault(Shell shell,
                                      String command)
This allows child classes to call this directly


getCommandSubSystem

protected static RemoteCmdSubSystem getCommandSubSystem(Object selectedObject)
Get the command subsystem associated the given remote object


getFileSubSystem

protected static RemoteFileSubSystem getFileSubSystem(Object selectedObject)
Get the first file subsystem associated the given remote object. May return null!


getRemoteAdapter

protected static ISystemRemoteElementAdapter getRemoteAdapter(Object o)
Returns the implementation of ISystemRemoteElement for the given object. Returns null if this object does not adaptable to this.


getSubstitutionValue

public String getSubstitutionValue(String subvar,
                                   Object context)
From the 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.

We try to handle common substitutions here in the base class, and pass on any other requests to the child classes via a call to internalGetSubstitutionValue(String var, Object context)

Specified by:
getSubstitutionValue in interface ISystemSubstitutor

getCommonSubstitutionValues

public String getCommonSubstitutionValues(String subvar,
                                          Object context)
This abstraction allows child subclasses to override getSubstitutionValues, yet grandchild subclasses to still call this common class if needed.


internalGetSubstitutionValue

public abstract String internalGetSubstitutionValue(SystemUDActionElement currentAction,
                                                    String substitutionVariable,
                                                    Object context)
Overridable extension point for child class to do variable substitution for variables unique to them.


hasUnsupportedSubstitutionVars

public boolean hasUnsupportedSubstitutionVars(Object action,
                                              int domain)

eligibleUserActionsForSelection

public boolean eligibleUserActionsForSelection(IStructuredSelection selection,
                                               SystemProfile profile)
Check to see it any actions will apply to this selection. Stop checking as soon as 1 action is found. This method is an optimized, find-1-only, version of addUserActions() below. May be overriden for subsystem specific filtering of actions CURRENTLY WE JUST RETURN TRUE


addUserActions

public void addUserActions(IMenuManager menu,
                           IStructuredSelection selection,
                           SystemProfile profile,
                           Shell shell)
Populate context menu ("User Actions->" cascading action) with user actions that meet their type-scoping criteria for given selection.

If given a profile, the list is scoped to that, else it includes actions for all active profiles.


getWorkingOfflineMode

public boolean getWorkingOfflineMode()
We disable user defined actions if we are in work-offline mode. Currently, how we determine this is dependent on the subsystem factory.


getDomainFromSelection

protected abstract int getDomainFromSelection(IStructuredSelection selection)
Determine domain, given the selection. Eg subsystem that supports domains has to do this via overriding this method. If domains not supported, return -1.


meetsSelection

protected boolean meetsSelection(SystemUDActionElement action,
                                 IStructuredSelection selection,
                                 int domainType)
Given an action, and the currently selected remote objects, and the domain of those, return true if ALL of the selected remote objects matches any of the type criteria for this action


resolveTypes

protected String[] resolveTypes(String[] p_types,
                                int domainType)
Given a list of names that represent named types, resolve that into a concatenated list of all types for the given type names.

Basically, this concatenates all the subtypes together. However, it also weeds out any redundancies


isMatch

protected abstract boolean isMatch(Object actionType,
                                   Object selectedObject,
                                   int domainType)
Compares a particular file type (not named, but actual scalar/generic type) to a specific user-selected remote object. Returns true if the object's information matches that of the given type

Must be overridden, but only called if supportsTypes() returns true. Else, just return true!

Parameters:
actionType - - an unnamed file type, as in "*.cpp"
selectedObject - - one of the currently selected remote objects
domainType - - integer representation of current domain

getTypesDelimiter

protected String getTypesDelimiter()
Get the delimiter used to delimiter the types in a type string. Default is " "


resetResolvedTypes

public void resetResolvedTypes()

getResolvedTypesHelper

public SystemUDAResolvedTypes getResolvedTypesHelper()

getMaximumDomain

public int getMaximumDomain()
For efficiency reasons, internally we use an integer to represent a domain. However, that has to be mapped to a name which is actually what is stored as the "name" attribute for the xml domain node. This returns the maximum integer number supported by this action/type manager. Returns -1 by default. Needs to be overridden by children that support domains


mapDomainName

public String mapDomainName(int domainInteger)
For efficiency reasons, internally we use an integer to represent a domain. However, that has to be mapped to a name which is actually what is stored as the "type" attribute for the xml domain node.

XML ATTRIBUTE SYNTAX FOR A DOMAIN: This maps the given integer to its domain name. Returns null by default. Needs to be overridden by children that support domains


mapDomainName

public int mapDomainName(String domainName)
Map a given untranslated domain name to its integer value


mapDomainXlatedName

public String mapDomainXlatedName(int domainInteger)
For efficiency reasons, internally we use an integer to represent a domain. However, that has to be mapped to a translated name occasionally for the UI, and indeed the translated name is stored in the XML in the "Name" attribute.

XML ATTRIBUTE SYNTAX FOR A DOMAIN: This maps the given integer to its translated domain name. Returns null by default. Needs to be overridden by children that support domains


mapDomainXlatedNewName

public String mapDomainXlatedNewName(int domainInteger)
Same as above but specifically for what is shown in the work with user actions dialog for the new element


mapDomainXlatedNewTypeName

public String mapDomainXlatedNewTypeName(int domainInteger)
Same as above but specifically for what is shown in the work with named types dialog for the new element


getDomainNames

public String[] getDomainNames()
Get the list of untranslated domain names


getXlatedDomainNames

public String[] getXlatedDomainNames()
Get the list of translated domain names


getXlatedDomainNewNames

public String[] getXlatedDomainNewNames()
Get the list of translated domain names for use in the tree view, for the "New" nodes, in the Work With User Actions dialog.


getXlatedDomainNewTypeNames

public String[] getXlatedDomainNewTypeNames()
Get the list of translated domain names for use in the tree view, for the "New" nodes, in the Work With User Types dialog.


getDomainImage

public Image getDomainImage(int domain)
Get the domain icon to show in the tree views


getDomainNewImage

public Image getDomainNewImage(int domain)
Get the domain icon to show in the tree views, for the new item for this domain


getDomainNewTypeImage

public Image getDomainNewTypeImage(int domain)
Get the domain icon to show in the named type tree view, for the new item for this domain


getActiveSystemProfiles

protected SystemProfile[] getActiveSystemProfiles()
Get the active system profiles


getDirtyEditors

protected List getDirtyEditors(IStructuredSelection sel)

getEditableFor

protected ISystemEditableRemoteObject getEditableFor(IAdaptable selected)

checkDirtyEditors

protected boolean checkDirtyEditors(IStructuredSelection selection)

processingSelection

protected void processingSelection(boolean processingSelection)
Method called at the start and end of running user actions This allows children a chance to perform some action before and after the actions are run by overriding this method.


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.