generateInputParameterStrings(IExecutionContext, ToolDescriptor, List, boolean, IProgressMonitor)
has been replaced by the equally named method in
AbstractCommandBasedToolExecutor.@Deprecated public abstract class AbstractTaurusToolExecutor extends java.lang.Object implements IToolExecutor
| Constructor and Description |
|---|
AbstractTaurusToolExecutor()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
createMassOutputParameters(java.util.List<java.util.Map<RToolOutParameter,java.lang.String>> pMassToolOutParmValues,
IExecutionContext pContext)
Deprecated.
Warning! This method clears any existing mass processing context.
|
void |
createSingleOutputParameters(java.util.List<RToolOutParameter> pRToolOutParams,
java.util.List<java.lang.String> pPropValues,
IExecutionContext pContext,
ToolExecutionStatus pToolExecutionStatus)
Deprecated.
Properly registers returned tool parameters in the execution context and
execution status.
|
abstract ToolExecutionStatus |
execTool(IExecutionContext pContext,
ToolDescriptor pTauToolDescriptor,
java.lang.String pAffectedResName,
org.eclipse.core.runtime.IProgressMonitor pMon)
Deprecated.
Called by AWM as soon as the tool is executed within an action.
|
IToolOutputReader |
getOutputReader()
Deprecated.
Returns the implementation of the IToolOutputReader which is used for
reading the tool output of the implemented IToolExecutor.
|
java.util.List<java.lang.String> |
readParmFile(ISystemImage pImg,
java.lang.String pParmFilePath,
org.eclipse.core.runtime.IProgressMonitor pMon)
Deprecated.
Converts the contents of a parameter file into a list of strings (lines).
|
public abstract ToolExecutionStatus execTool(IExecutionContext pContext, ToolDescriptor pTauToolDescriptor, java.lang.String pAffectedResName, org.eclipse.core.runtime.IProgressMonitor pMon) throws TaurusToolException
IToolExecutorIProgressMonitor.setCanceled(boolean) to cancel the
execution of an action. This is common for tools opening a dialog with a
Cancel button.
TaurusToolException will cancel the action and
display the error message in an error dialog.
ToolExecutionStatus with a return code higher
than the modeled Max RC (application option) will also cause
the action to abort with an error dialog.
Max RC and a message will display the message at the end of
the action.
ResourceOperations by adding them to the
returned ToolExecutionStatus.
ToolExecutionStatus need by AWM to process the modeled
ResourceOperations.
TaurusModelUtilities and TaurusUtility useful
helper methods.
TaurusUtility.readFile(FileDescriptor, IExecutionContext).
ToolDescriptor.getInputParm().
TaurusModelUtilities.getParameterValue(com.microfocus.awm.meta.interfaces.RToolInParameter, IExecutionContext)
to resolve a parameter value.
TaurusModelUtilities.getFileDescriptorByInputParam(com.microfocus.awm.meta.interfaces.RToolInParameter, IExecutionContext)
to resolve file input parameters.
TaurusToolExceptions if the tool has not been configured
properly.
ToolDescriptor.getOutputParm().
IExecutionContext.putParmIntoMemory(com.microfocus.awm.meta.interfaces.Property, IPropertyValue)
to add an output parameter into the memory.
IExecutionContext.putFileParmIntoMemory(com.microfocus.awm.meta.interfaces.FileDescriptor)
to add a file output parameter into the memory.
FileDescriptor.clone() to create a copy of a modeled file
descriptor, before e.g. setting a file descriptor path (physical name) or
input stream. Otherwise the loaded model would be altered.
IExecutionContext.addParmForOutputDialog(com.microfocus.awm.meta.interfaces.RToolOutParameter)
when RToolOutParameter.isToOutputDialog() has been set, to
support the AWM modeled output dialog.
DynamicObject.getDynamicAttributes() or
DynamicObject.getDynamicAttributes(). Complex attributes can be
read by DynamicObject.getComplexAttributes().
EFileTypes.INPUT_STREAM_VALUE is recommended. The stream can be
set by using FileDescriptor.setInputStream(java.io.InputStream).
Please see Processing Output Parameters on how to add the output
file to the memory, since this is required for AWM to find the file
reference. AWM only picks up the last file output parameter of a tool to
create an element list.
IExecutionContext.getMassProcessingContexts(). To
find out whether the tool was modeled to process several elements at
once, use
ActionExecutor.isMassProcessing(IExecutionContext, ToolDescriptor)
.
execTool in interface IToolExecutorpContext - The IExecutionContext. Can be handed over by a previous Tool
or created manually.pTauToolDescriptor - The descriptor of the Tool to be executed.pAffectedResName - a logical resource name (or null if there is
none, see IExecutionContext.getResource(String))pMon - An IProgressMonitor. Setting the progress monitor cancelled
using IProgressMonitor.setCanceled(boolean) will cause
the action to be canceled after the tool.ToolExecutionStatusTaurusToolException - if the tool encounters an exceptionpublic void createSingleOutputParameters(java.util.List<RToolOutParameter> pRToolOutParams, java.util.List<java.lang.String> pPropValues, IExecutionContext pContext, ToolExecutionStatus pToolExecutionStatus) throws TaurusToolException
pRToolOutParams - a list of output parameterspPropValues - a list of values for each output parameterpContext - the execution contextpToolExecutionStatus - the ToolExecutionStatus of a tool. A map of output
parameters will be set to the ToolExecutionStatus.TaurusToolException - if parameters were modelled incorrectlypublic void createMassOutputParameters(java.util.List<java.util.Map<RToolOutParameter,java.lang.String>> pMassToolOutParmValues, IExecutionContext pContext) throws TaurusToolException
Creates a mass processing context for other tools to read. The tool
descriptor for executing this tool must have at least one output
parameters of the type EParameterTypes.MASS_PROCESSING and would
need to be modelled within an action descriptor with mass processing =
true.
pMassToolOutParmValues - a map of output parameters with its mass values for each
resourcepContext - the execution contextTaurusToolException - if parameters were modelled incorrectlypublic IToolOutputReader getOutputReader()
IToolExecutorOnly required for tools which are able to execute batch jobs.
getOutputReader in interface IToolExecutorpublic java.util.List<java.lang.String> readParmFile(ISystemImage pImg, java.lang.String pParmFilePath, org.eclipse.core.runtime.IProgressMonitor pMon) throws java.io.IOException
IToolExecutorOnly required for tools which are able to execute batch jobs.
readParmFile in interface IToolExecutorpImg - the system imagepParmFilePath - the parameter file pathpMon - progress monitorjava.io.IOException - if reading or interpreting the parameter file failsCopyright © 2015 Micro Focus GmbH. All rights reserved.