public class LegacyToolExecutorContext extends java.lang.Object implements IMassProcessingToolContext
IToolExecutor
interface. It does not return any IToolInputParameters, since
resolving input parameters might cause exceptions, effectively breaking
backward compatibility.
The reason for possible exceptions is the former lack of a clear way to
define input parameters in models. Old IToolExecutor implementations
were responsible to resolve parameters manually, which caused very "unique"
implementations and modeled tool descriptors.
| Constructor and Description |
|---|
LegacyToolExecutorContext(ToolDescriptor pToolDescriptor,
IExecutionContext pContext)
Basic constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes()
Gets a list of all dynamic attributes and values.
|
java.lang.Object |
getAttributeValue(java.lang.String pName)
Gets the value of an attribute with the given ID or name.
|
IExecutionContext |
getExecutionContext()
Gets the
IExecutionContext of the currently executed action. |
IFunctionPackage |
getFunctionPackage()
Gets the function package instance which defines the
ToolDescriptor type. |
java.util.List<IToolInputParameter> |
getInputParameters()
Gets all input parameters of the tool context.
|
java.util.Collection<IToolInputParameter> |
getInputParameters(java.lang.String pName)
Gets all input parameters of the tool context with the specified name.
|
ToolDescriptor |
getModelObject()
Gets the model object.
|
java.util.List<IModeledToolOutputParameter> |
getOutputParameters()
Gets all output parameters of the tool context.
|
java.util.Collection<IModeledToolOutputParameter> |
getOutputParameters(java.lang.String pName)
Gets all output parameters of the tool context with the specified name.
|
java.util.List<IToolContext> |
getSubContexts()
Returns the list of sub-contexts, representing the resources that are
currently processed.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetComplexAttributespublic LegacyToolExecutorContext(ToolDescriptor pToolDescriptor, IExecutionContext pContext)
pToolDescriptor - the tool descriptorpContext - execution contextpublic IFunctionPackage getFunctionPackage()
IToolContextToolDescriptor type.getFunctionPackage in interface IToolContextnull if it doesn't
exist in the modelpublic ToolDescriptor getModelObject()
IDynamicObjectgetModelObject in interface IDynamicObjectgetModelObject in interface IToolContextpublic IExecutionContext getExecutionContext()
IToolContextIExecutionContext of the currently executed action.getExecutionContext in interface IToolContextpublic java.util.List<IToolInputParameter> getInputParameters()
IToolContext
See ToolUtility for more methods to obtain specific input
parameters.
getInputParameters in interface IToolContextIToolInputParameterpublic java.util.Collection<IToolInputParameter> getInputParameters(java.lang.String pName)
IToolContext
The name can either be the parameter's id attribute of the
toolType extension or the fully qualified id,
starting with the function package ID and ending with the parameter
id.
See ToolUtility for more methods to obtain specific input
parameters.
getInputParameters in interface IToolContextpName - name of the desired parameter(s)public java.lang.Object getAttributeValue(java.lang.String pName)
IDynamicObjectgetAttributeValue in interface IDynamicObjectpName - the attribute ID or namenullpublic java.util.Map<java.lang.String,java.lang.Object> getAttributes()
IDynamicObjectgetAttributes in interface IDynamicObjectpublic java.util.List<IModeledToolOutputParameter> getOutputParameters()
IToolContext
See ToolUtility for more methods to obtain specific output
parameters.
getOutputParameters in interface IToolContextIModeledToolOutputParameterpublic java.util.Collection<IModeledToolOutputParameter> getOutputParameters(java.lang.String pName)
IToolContext
The name can either be the parameter's id attribute of the
toolType extension or the fully qualified id,
starting with the function package ID and ending with the parameter
id.
See ToolUtility for more methods to obtain specific output
parameters.
getOutputParameters in interface IToolContextpName - name of the desired parameter(s)public java.util.List<IToolContext> getSubContexts()
IMassProcessingToolContextgetSubContexts in interface IMassProcessingToolContextCopyright © 2015 Micro Focus GmbH. All rights reserved.