public abstract class ExtensionWalker extends Object
ExtensionModel and invokes methods when important
model components are found.
This is useful to centralize the logic of how to iterate through a
model's structure without coupling to it. For example, the
onOperation(HasOperationModels, OperationModel) method allows
handling operations without requiring to know that they can exist
at global or configuration level. Something similar can be said
about the onParameter(ParameterizedModel, ParameterGroupModel, ParameterModel),
etc.
| Constructor and Description |
|---|
ExtensionWalker() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
onConfiguration(ConfigurationModel model)
Invoked when a
ConfigurationModel is found in the
traversed extensionModel |
protected void |
onConnectionProvider(HasConnectionProviderModels owner,
ConnectionProviderModel model)
Invoked when an
ConnectionProviderModel is found in the
traversed extensionModel |
protected void |
onConstruct(HasConstructModels owner,
ConstructModel model)
Invoked when an
ConstructModel is found in the
traversed extensionModel |
protected void |
onFunction(HasFunctionModels owner,
FunctionModel model)
Invoked when an
FunctionModel is found in the
traversed extensionModel. |
protected void |
onOperation(HasOperationModels owner,
OperationModel model)
Invoked when an
OperationModel is found in the
traversed extensionModel. |
protected void |
onParameter(ParameterizedModel owner,
ParameterGroupModel groupModel,
ParameterModel model)
Invoked when an
ParameterModel is found in the
traversed extensionModel |
protected void |
onParameterGroup(ParameterizedModel owner,
ParameterGroupModel model)
Invoked when an
ParameterGroupModel is found in the
traversed extensionModel |
protected void |
onSource(HasSourceModels owner,
SourceModel model)
Invoked when an
SourceModel is found in the
traversed extensionModel |
protected void |
stop()
When invoked, the traversal of the
ExtensionModel will
stop once the current visit is completed. |
void |
walk(ExtensionModel extensionModel)
Navigates the given
extensionModel and invokes the
other public method's in this class as the navigation
progresses |
public final void walk(ExtensionModel extensionModel)
extensionModel and invokes the
other public method's in this class as the navigation
progressesextensionModel - the model to navigateprotected final void stop()
ExtensionModel will
stop once the current visit is completed.
This will not break the execution within the invoking method,
but instead avoid further traversal of the model from that point on.protected void onConfiguration(ConfigurationModel model)
ConfigurationModel is found in the
traversed extensionModelmodel - a ConfigurationModelprotected void onOperation(HasOperationModels owner, OperationModel model)
OperationModel is found in the
traversed extensionModel.
owner - The component that owns the operationmodel - the OperationModelprotected void onFunction(HasFunctionModels owner, FunctionModel model)
FunctionModel is found in the
traversed extensionModel.
owner - The component that owns the functionmodel - the FunctionModelprotected void onConstruct(HasConstructModels owner, ConstructModel model)
ConstructModel is found in the
traversed extensionModelowner - The component that owns the sourcemodel - the ConstructModelprotected void onConnectionProvider(HasConnectionProviderModels owner, ConnectionProviderModel model)
ConnectionProviderModel is found in the
traversed extensionModelowner - The component that owns the providermodel - the ConnectionProviderModelprotected void onSource(HasSourceModels owner, SourceModel model)
SourceModel is found in the
traversed extensionModelowner - The component that owns the sourcemodel - the SourceModelprotected void onParameterGroup(ParameterizedModel owner, ParameterGroupModel model)
ParameterGroupModel is found in the
traversed extensionModelowner - The component that owns the sourcemodel - the ParameterGroupModelprotected void onParameter(ParameterizedModel owner, ParameterGroupModel groupModel, ParameterModel model)
ParameterModel is found in the
traversed extensionModelowner - The component that owns the parametergroupModel - the ParameterGroupModel in which the model is containedmodel - the ParameterModelCopyright © 2017 MuleSoft, Inc.. All rights reserved.