public class ExtensionModelHelper extends Object
ExtensionModels
Contains a cache for searches within the extension models so we avoid processing each extension model twice.
It's recommended that the application only has one instance of this class to avoid processing the extension models several
times.
since 4.0
| Constructor and Description |
|---|
ExtensionModelHelper(Set<org.mule.runtime.api.meta.model.ExtensionModel> extensionModels) |
| Modifier and Type | Method and Description |
|---|---|
Optional<? extends org.mule.runtime.api.meta.model.ComponentModel> |
findComponentModel(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier)
Finds a
ComponentModel within the provided set of ExtensionModels by a
ComponentIdentifier. |
org.mule.runtime.api.component.TypedComponentIdentifier.ComponentType |
findComponentType(ComponentModel componentModel)
Find a
DslElementModel for a given ComponentModel |
public ExtensionModelHelper(Set<org.mule.runtime.api.meta.model.ExtensionModel> extensionModels)
extensionModels - the set of ExtensionModels to work with. Usually this is the set of models configured within a
mule artifact.public org.mule.runtime.api.component.TypedComponentIdentifier.ComponentType findComponentType(ComponentModel componentModel)
DslElementModel for a given ComponentModelcomponentModel - the component model from the configuration.DslElementModel associated with the configuration or an Optional.empty() if there isn't one.public Optional<? extends org.mule.runtime.api.meta.model.ComponentModel> findComponentModel(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier)
ComponentModel within the provided set of ExtensionModels by a
ComponentIdentifier.componentIdentifier - the identifier to use for the search.ComponentModel or Optional.empty() if it couldn't be found.Copyright © 2003–2019 MuleSoft, Inc.. All rights reserved.