Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.rse.ui.uda
Class NFSUDActionSubsystem

java.lang.Object
  extended by SystemUDActionSubsystem
      extended by com.ibm.etools.iseries.rse.ui.uda.QSYSUDActionSubsystem
          extended by com.ibm.etools.iseries.rse.ui.uda.NFSUDActionSubsystem

public class NFSUDActionSubsystem
extends QSYSUDActionSubsystem


Field Summary
static String copyright
           
static int DOMAIN_MEMBER
           
static int DOMAIN_OBJECT
           
static String[] DOMAINS
           
static String[][] IBMTYPES_MBR_V5
          IBM supplied member types
static String[][] IBMTYPES_OBJ_V5
          IBM supplied object types
static String XE_DOMTYPE
           
 
Fields inherited from class com.ibm.etools.iseries.rse.ui.uda.QSYSUDActionSubsystem
ATTR_RUNENV, Copyright, msgs, RUNENV_BATCH, RUNENV_INTERACTIVE, RUNENV_NORMAL, TEMPMBR_FILE, TEMPMBR_LIB
 
Constructor Summary
NFSUDActionSubsystem()
          Constructor
NFSUDActionSubsystem(ISubSystem subsystem, ISubSystemConfiguration ssc, ISystemProfile profile)
           
 
Method Summary
protected  boolean doActionsMigration(ISystemProfile profile, String oldRelease)
          Overridable extension point for child classes to do migration of their actions.
protected  boolean doTypesMigration(ISystemProfile profile, String oldRelease)
          Overridable extension point for child classes to do migration of their types.
 SystemCmdSubstVarList getActionSubstVarList(int actionDomainType)
          Return the list of substitution variables for the given domain type.
 SystemUDTypeEditPane getCustomUDTypeEditPane(ISystemUDAEditPaneHoster parent, ISystemUDTreeView tv)
           
protected  int getDomainFromSelection(IStructuredSelection selection)
          Parent override.
 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
 IHost getHost(Object element)
           
 int getMaximumDomain()
          Parent override.
 String getOSType()
           
 String[] getXlatedDomainNames()
          Get the list of translated domain names
 String[] getXlatedDomainNewNames()
          Get the list of translated domain names for "new" nodes in tree view
 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)
          Check to see if the given action in the given domain contains substitution variables we don't support yet.
 String internalGetSubstitutionValue(SystemUDActionElement currentAction, String subvar, Object subvarDE)
          Required override of parent for doing substitutions for our unique variables.
protected  boolean isMatch(Object actionType, Object selectedObject, int domainType)
          Parent override.
 SystemUDActionElement[] primeDefaultActions(SystemUDActionManager udad, ISystemProfile profile)
          Prime the user data with the default actions.
 SystemUDTypeElement[] primeDefaultTypes(SystemUDTypeManager typeMgr)
          Prime the user data with the default types.
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.
 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
protected  boolean runCommand(Shell shell, SystemUDActionElement action, String cmdString, IRemoteCmdSubSystem 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
 boolean supportsDomains()
          Return true if the action/type manager supports domains.
 boolean supportsTypes()
          Return true if actions can be scoped by file types The iSeries native file system does support types
 
Methods inherited from class com.ibm.etools.iseries.rse.ui.uda.QSYSUDActionSubsystem
collectNames, collectNamesQSYS, getAllNamesSubstitutionVariable, getCommandSubsystem, getCustomUDActionEditPane, getNameDelimiter, getRunnableContext, getSubstitutionValue, getWorkingOfflineMode, printTestActionInvokeOnceInformation, promptCommand, run
 
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

XE_DOMTYPE

public static final String XE_DOMTYPE
See Also:
Constant Field Values

DOMAINS

public static final String[] DOMAINS

DOMAIN_OBJECT

public static final int DOMAIN_OBJECT
See Also:
Constant Field Values

DOMAIN_MEMBER

public static final int DOMAIN_MEMBER
See Also:
Constant Field Values

IBMTYPES_OBJ_V5

public static final String[][] IBMTYPES_OBJ_V5
IBM supplied object types


IBMTYPES_MBR_V5

public static final String[][] IBMTYPES_MBR_V5
IBM supplied member types

Constructor Detail

NFSUDActionSubsystem

public NFSUDActionSubsystem()
Constructor


NFSUDActionSubsystem

public NFSUDActionSubsystem(ISubSystem subsystem,
                            ISubSystemConfiguration ssc,
                            ISystemProfile profile)
Method Detail

getCustomUDTypeEditPane

public SystemUDTypeEditPane getCustomUDTypeEditPane(ISystemUDAEditPaneHoster parent,
                                                    ISystemUDTreeView tv)

getActionSubstVarList

public 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!


doActionsMigration

protected boolean doActionsMigration(ISystemProfile profile,
                                     String oldRelease)
Overridable extension point 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 boolean doTypesMigration(ISystemProfile profile,
                                   String oldRelease)
Overridable extension point 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

supportsTypes

public boolean supportsTypes()
Return true if actions can be scoped by file types The iSeries native file system does support types


supportsDomains

public boolean supportsDomains()
Return true if the action/type manager supports domains. The iSeries native file system does support domains


primeDefaultTypes

public SystemUDTypeElement[] primeDefaultTypes(SystemUDTypeManager typeMgr)
Prime the user data with the default types. Subsystem specific.


primeDefaultActions

public SystemUDActionElement[] primeDefaultActions(SystemUDActionManager udad,
                                                   ISystemProfile 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

internalGetSubstitutionValue

public String internalGetSubstitutionValue(SystemUDActionElement currentAction,
                                           String subvar,
                                           Object subvarDE)
Required override of parent for doing substitutions for our unique variables.


getDomainFromSelection

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


isMatch

protected boolean isMatch(Object actionType,
                          Object selectedObject,
                          int domainType)
Parent override. 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

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

hasUnsupportedSubstitutionVars

public boolean hasUnsupportedSubstitutionVars(Object action,
                                              int domain)
Check to see if the given action in the given domain contains substitution variables we don't support yet. Only called from CPO import wizard.


getMaximumDomain

public int getMaximumDomain()
Parent override. 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. This returns the maximum integer number supported by this action/type manager. Returns 1 for us.


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 "new" nodes in tree view


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


runCommand

protected boolean runCommand(Shell shell,
                             SystemUDActionElement action,
                             String cmdString,
                             IRemoteCmdSubSystem 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

Overrides:
runCommand in class QSYSUDActionSubsystem
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

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.

Parameters:
true - before proecssing, false after processing

getOSType

public String getOSType()
Overrides:
getOSType in class QSYSUDActionSubsystem

getHost

public IHost getHost(Object element)
Specified by:
getHost in class QSYSUDActionSubsystem

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.