|
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
public abstract class QSYSUDActionSubsystem
Abstraction of the common services for both iSeries Objects and iSeries Jobs for the support of user defined actions. There are subclasses for each of these.
Field Summary | |
---|---|
static String |
ATTR_RUNENV
Attribute containing the run environment: "RunEnv" |
static String |
Copyright
|
protected Object[] |
msgs
|
static String |
RUNENV_BATCH
Value of Run Environment attribute for batch: "batch" |
static String |
RUNENV_INTERACTIVE
Value of Run Environment attribute for interactive: "interactive" |
static String |
RUNENV_NORMAL
Value of Run Environment attribute for normal: "normal" |
static String |
TEMPMBR_FILE
File containing temporary member for collected names, when using "Invoke once": QRSESELECT |
static String |
TEMPMBR_LIB
Library containing temporary member for collected names, when using "Invoke once": QRSETEMP |
Constructor Summary | |
---|---|
QSYSUDActionSubsystem()
Constructor |
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 Object |
collectNamesQSYS(Shell shell,
Iterator elements,
StringBuffer collectedNames)
Abstract out this code so subsystems can avoid calling it. |
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. |
QSYSCommandSubSystem |
getCommandSubsystem(Object context)
|
SystemUDActionEditPane |
getCustomUDActionEditPane(ISubSystem ss,
ISubSystemConfiguration ssc,
ISystemProfile profile,
ISystemUDAEditPaneHoster parent,
ISystemUDTreeView tv)
|
abstract IHost |
getHost(Object element)
|
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. |
String |
getOSType()
|
protected IRunnableContext |
getRunnableContext(Shell rshell)
Get the progress monitor dialog for this operation. |
String |
getSubstitutionValue(String subvar,
Object context)
From the interface ISystemSubstitutor. |
boolean |
getWorkingOfflineMode()
We disable user defined actions if we are in work-offline mode. |
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 String |
promptCommand(Shell shell,
String command)
Called when processing user action that has the "prompt" attribute set. |
void |
run(IProgressMonitor monitor)
As per IRunnableWithProgress interface. |
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 |
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 String ATTR_RUNENV
public static final String RUNENV_NORMAL
public static final String RUNENV_BATCH
public static final String RUNENV_INTERACTIVE
public static final String TEMPMBR_LIB
public static final String TEMPMBR_FILE
protected Object[] msgs
Constructor Detail |
---|
public QSYSUDActionSubsystem()
Method Detail |
---|
public SystemUDActionEditPane getCustomUDActionEditPane(ISubSystem ss, ISubSystemConfiguration ssc, ISystemProfile profile, ISystemUDAEditPaneHoster parent, ISystemUDTreeView tv)
protected boolean runCommand(Shell shell, SystemUDActionElement action, String cmdString, IRemoteCmdSubSystem cmdSubSystem, Object context, Viewer viewer)
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
- - any context information the subsystem's runCommand might need
protected String promptCommand(Shell shell, String command)
shell
- - the shell to host the modal dialogcommand
- - the fully resolved (variables substituted) command
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.
protected Object collectNamesQSYS(Shell shell, Iterator elements, StringBuffer collectedNames)
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
InvocationTargetException
InterruptedException
protected IRunnableContext getRunnableContext(Shell rshell)
protected void printTestActionInvokeOnceInformation(Shell shell, PrintWriter writer)
protected String getAllNamesSubstitutionVariable()
We return null to indicate to our parent class that we handle this option differently
protected char getNameDelimiter()
We return a single quote.
public boolean getWorkingOfflineMode()
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.
public QSYSCommandSubSystem getCommandSubsystem(Object context)
public String getOSType()
public abstract IHost getHost(Object element)
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |