|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SystemUDActionSubsystem com.ibm.etools.iseries.rse.ui.uda.QSYSUDActionSubsystem com.ibm.etools.iseries.rse.ui.uda.IFSUDActionSubsystem
public class IFSUDActionSubsystem
Specialization of universal file user action support for IFS
Field Summary | |
---|---|
static String |
ATTR_QSYSCmd
Attribute containing the command type. |
static String |
copyright
|
static int |
DOMAIN_FILE
|
static int |
DOMAIN_FOLDER
|
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 | |
---|---|
IFSUDActionSubsystem()
Constructor for UDActionSubsystemIFS. |
Method Summary | |
---|---|
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 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. |
SystemCmdSubstVarList |
getActionSubstVarList(SystemUDActionElement action)
Return the list of substitution variables for the given domain type. |
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 QSYSCommandSubSystem |
getCmdSubSystem(IRemoteFile selectedFile)
Return the iSeries Commands file subsystem |
SystemUDActionEditPane |
getCustomUDActionEditPane(ISubSystem ss,
ISubSystemConfiguration ssf,
ISystemProfile profile,
ISystemUDAEditPaneHoster parent,
ISystemUDTreeView tv)
Return the edit pane for user actions. |
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 |
protected QSYSCommandSubSystem |
getFileSubSystem(IRemoteFile selectedFile)
Return the iSeries Objects file subsystem |
IHost |
getHost(Object element)
|
int |
getMaximumDomain()
Parent override. |
protected String |
getNewNodeTypeLabel()
Overridable method for child classes to supply the label to display in the "New" node for types. |
String |
getOSType()
|
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. |
protected String |
getTypesDelimiter()
Get the delimiter used to delimiter the types in a type string. |
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 "new" nodes in tree view, for the WW User Actions dialog |
String[] |
getXlatedDomainNewTypeNames()
Get the list of translated domain names for "new" nodes in tree view, for the WW Named Types dialog |
String |
internalGetSubstitutionValue(SystemUDActionElement currentAction,
String substitutionVariable,
Object context)
Overridable extension point for child class to do variable substitution for variables unique to them. |
protected boolean |
isMatch(Object actionType,
Object selectedObject,
int domainType)
Parent override. |
boolean |
isQSYSCommand(SystemUDActionElement currentAction)
Given an existing action, return true if it is a QSYS command, false if it is a QSHELL command |
protected boolean |
isQSYSCommandType()
Query current state (QSYS vs QSHELL) command type |
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 |
SystemUDActionElement[] |
primeDefaultActions(SystemUDActionManager actionMgr,
ISystemProfile profile)
Prime the user data with the default actions. |
SystemUDTypeElement[] |
primeDefaultTypes(SystemUDTypeManager typeMgr)
Prime new document with default types |
protected String |
promptCommand(Shell shell,
String command)
Called when processing user action that has the "prompt" attribute set. |
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 |
protected void |
setCommandType(boolean qsys)
Flip between QSYS and QSHELL command types |
void |
setIsQSYSCommand(SystemUDActionElement currentAction,
boolean qsys)
Given an existing action, set whether it is a qsys or qshell command |
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 |
boolean |
supportsTypes(int domain)
Return true if actions can be scoped by file types for the given domain. |
Methods inherited from class com.ibm.etools.iseries.rse.ui.uda.QSYSUDActionSubsystem |
---|
collectNamesQSYS, getCommandSubsystem, getNameDelimiter, getRunnableContext, printTestActionInvokeOnceInformation, run |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String copyright
public static final int DOMAIN_FOLDER
public static final int DOMAIN_FILE
public static final String ATTR_QSYSCmd
Constructor Detail |
---|
public IFSUDActionSubsystem()
Method Detail |
---|
protected String getNewNodeTypeLabel()
protected void setCommandType(boolean qsys)
protected boolean isQSYSCommandType()
public boolean isQSYSCommand(SystemUDActionElement currentAction)
public void setIsQSYSCommand(SystemUDActionElement currentAction, boolean qsys)
public SystemCmdSubstVarList getActionSubstVarList(SystemUDActionElement action)
public SystemCmdSubstVarList getActionSubstVarList(int actionDomainType)
protected boolean doActionsMigration(ISystemProfile profile, String oldRelease)
protected boolean doTypesMigration(ISystemProfile profile, String oldRelease)
public String getSubstitutionValue(String subvar, Object context)
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.
This is an override of the parent class method, because iSeries has unique variable substitution support (&x vs ${x}).
After processing the variables common to jobs and objs/mbrs, this defers to the child classes by calling internalGetSubstitutionValue.
getSubstitutionValue
in class QSYSUDActionSubsystem
public String internalGetSubstitutionValue(SystemUDActionElement currentAction, String substitutionVariable, Object context)
protected QSYSCommandSubSystem getFileSubSystem(IRemoteFile selectedFile)
protected QSYSCommandSubSystem getCmdSubSystem(IRemoteFile selectedFile)
protected String getTypesDelimiter()
protected boolean runCommand(Shell shell, SystemUDActionElement action, String cmdString, IRemoteCmdSubSystem cmdSubSystem, Object context, Viewer viewer)
Run the user action's command in the default shell, and log result in the command view.
runCommand
in class QSYSUDActionSubsystem
shell
- - the shell to use if need to prompt for password or show msg dialogaction
- - the action being processed, in case attributes of it need to be queriedcmdString
- - the resolved commandcmdSubSystem
- - this connection's command subsystem, which will run the commandcontext
- - the selected IRemoteFile objectviewer
- - the viwer that the action came from
protected String getAllNamesSubstitutionVariable()
We return null to indicate to our parent class that we handle this option differently
getAllNamesSubstitutionVariable
in class QSYSUDActionSubsystem
protected Object collectNames(Shell shell, Iterator elements, StringBuffer collectedNames)
This is an override of the parent, as we handle this option different for iSeries. Rather than collecting all the names into a single list of quoted, blank-delimited names, we instead create a temporary member and put all the fully-qualified names of the selected objects in it. The name of this temporary member can then be passed to a server program via the &Mx substitution variables, and that program can open and read the names from there.
This different behaviour makes it easier to write server side programs to process the list of selected names, as we can neither pre-determine the number of parameters, or the length of a single parameter if we concatenated them. On iSeries, it is necessary for called-programs to know ahead of time the number of parameters and the size of each. Further, there is a limit of 40 parameters for any one call.
collectNames
in class QSYSUDActionSubsystem
protected String promptCommand(Shell shell, String command)
promptCommand
in class QSYSUDActionSubsystem
shell
- - the shell to host the modal dialogcommand
- - the fully resolved (variables substituted) command
public boolean supportsTypes()
public boolean supportsTypes(int domain)
public boolean supportsDomains()
public int getSingleDomain(SystemUDBaseManager docManager)
We return DOMAIN_FILE if the docManager is the type manager
public SystemUDTypeEditPane getCustomUDTypeEditPane(ISystemUDAEditPaneHoster parent, ISystemUDTreeView tv)
public SystemUDActionEditPane getCustomUDActionEditPane(ISubSystem ss, ISubSystemConfiguration ssf, ISystemProfile profile, ISystemUDAEditPaneHoster parent, ISystemUDTreeView tv)
UDActionEditPaneIFS
getCustomUDActionEditPane
in class QSYSUDActionSubsystem
public SystemUDTypeElement[] primeDefaultTypes(SystemUDTypeManager typeMgr)
public SystemUDActionElement[] primeDefaultActions(SystemUDActionManager actionMgr, ISystemProfile profile)
public boolean restoreDefaultAction(SystemUDActionElement element, int domain, String actionName)
public boolean restoreDefaultType(SystemUDTypeElement element, int domain, String typeName)
public boolean getWorkingOfflineMode()
getWorkingOfflineMode
in class QSYSUDActionSubsystem
protected boolean meetsSelection(SystemUDActionElement action, IStructuredSelection selection, int domainType)
Override of parent
protected 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
BECAUSE WE OVERRRIDE meetsSelection, THIS METHOD IS NEVER CALLED FOR US!
actionType
- - an unnamed file type, as in "*.cpp"selectedObject
- - one of the currently selected remote objectsdomainType
- - integer representation of current domainprotected int getDomainFromSelection(IStructuredSelection selection)
public int getMaximumDomain()
public String[] getDomainNames()
public String[] getXlatedDomainNames()
public String[] getXlatedDomainNewNames()
public String[] getXlatedDomainNewTypeNames()
public Image getDomainImage(int domain)
public Image getDomainNewImage(int domain)
public String getOSType()
getOSType
in class QSYSUDActionSubsystem
public IHost getHost(Object element)
getHost
in class QSYSUDActionSubsystem
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |