public interface ExtensionModel extends NamedObject, DescribedObject, EnrichableModel, HasOperationModels, HasSourceModels, HasFunctionModels, HasConnectionProviderModels, HasDisplayModel, HasExternalLibraries, HasConstructModels
Extensions can augment a system by providing new features in the form of operations and connection providers. What makes the extension model different from a class implementing a certain interface is the fact that extensions provide enough information at runtime so that they can be used without prior knowledge, and can be both executed or integrated into tooling seamlessly.
An extension model is not a miscellaneous group of methods, but can be seen (and may be derived from) an object model. As such, an extension will provide several ways to configure itself and will provide a set of operations that may be eventually executed.
The extension model doesn't just map a JVM object model. Extensions provide richer metadata, and a dynamic execution model, but more importantly they restrict the way operations are defined and used to a manageable subset that would deterministic data flow analysis.
An extension doesn't define any predefined syntax, evaluation order or execution paradigm. The operations provided
are expected to be used as individual building blocks in a bigger system, hence the name Extension
| Modifier and Type | Method and Description |
|---|---|
Category |
getCategory()
Returns the extension's
Category that identifies the extension. |
Optional<ConfigurationModel> |
getConfigurationModel(String name)
Returns the
ConfigurationModel
that matches the given name. |
List<ConfigurationModel> |
getConfigurationModels()
Returns the
configurationModels
available for this extension. |
List<ConnectionProviderModel> |
getConnectionProviders()
Returns the
ConnectionProviderModels which will be available
to every ConfigurationModel defined in this extension. |
Set<ErrorModel> |
getErrorModels() |
Set<ImportedTypeModel> |
getImportedTypes() |
MuleVersion |
getMinMuleVersion()
Returns the extension's Min
MuleVersion. |
String |
getName()
A simple name for this extension.
|
List<OperationModel> |
getOperationModels()
Returns a
List of OperationModels defined at
the extension level. |
Set<String> |
getPrivilegedArtifacts() |
Set<String> |
getPrivilegedPackages() |
Set<String> |
getResources() |
List<SourceModel> |
getSourceModels()
Returns a
List of SourceModels defined at the
extension level. |
Set<SubTypesModel> |
getSubTypes() |
Set<org.mule.metadata.api.model.ObjectType> |
getTypes() |
String |
getVendor()
Returns the name of the extension's vendor
This name is used to:
Represent the extension's vendor
Differentiate different extensions with the same name, to give the possibility of having two connectors
with the same name, for example, one made by MuleSoft and the second one by a third party
|
String |
getVersion()
Returns this extension's version.
|
XmlDslModel |
getXmlDslModel() |
getDescriptiongetModelProperties, getModelPropertygetOperationModelgetSourceModelgetFunctionModel, getFunctionModelsgetConnectionProviderModelgetDisplayModelgetExternalLibraryModelsgetConstructModel, getConstructModelsString getName()
To follow the convention described above is important since the name has to be unique. The platform will use this name to make resources available based on it. This attribute will be used in a convention over configuration pattern. It cannot contain spaces
getName in interface NamedObjectString getVersion()
The extension version is specified as a Semantic Versioning.
Note that while an extension implements a specific version, nothing prevents several versions of the same extension to coexists at runtime.
List<ConfigurationModel> getConfigurationModels()
configurationModels
available for this extension. Each configuration is guaranteed to have a unique name.
The first configuration is the preferred (default) one, the rest of the configurations are ordered alphabetically.
If the ExtensionModel contains any OperationModel, then at least one ConfigurationModel
is required. However, the existence of one or more ConfigurationModel doesn't require the presence of
any OperationModel.
List with the available configurationModels.Optional<ConfigurationModel> getConfigurationModel(String name)
ConfigurationModel
that matches the given name.name - case sensitive configuration nameOptional ConfigurationModelList<OperationModel> getOperationModels()
List of OperationModels defined at
the extension level.
When an operation is defined at this level, it means that such operation does not require nor accept a configuration.
Each operation is guaranteed to have a unique name which will not
overlap with any SourceModel or ConnectionProviderModel
defined at any level.
getOperationModels in interface HasOperationModelsList of OperationModelList<ConnectionProviderModel> getConnectionProviders()
ConnectionProviderModels which will be available
to every ConfigurationModel defined in this extension.
It is valid to define an ExtensionModel which does nothing but
exposing connection providers. It is not required for the extension
to also expose any ConfigurationModel or OperationModel.
getConnectionProviders in interface HasConnectionProviderModelsList of ConnectionProviderModelList<SourceModel> getSourceModels()
List of SourceModels defined at the
extension level.
When a source is defined at this level, it means that such
source does not require nor accept a configuration.
Each source is guaranteed to have a unique name which will not
overlap with any OperationModel or ConnectionProviderModel
defined at any level.
getSourceModels in interface HasSourceModelsList of SourceModelSet<org.mule.metadata.api.model.ObjectType> getTypes()
Set with all the object types defined by this extensionSet<String> getResources()
Set with the paths to all the resources exposed by this extensionSet<String> getPrivilegedPackages()
Set with all the Java packages that should be exported as privileged API by this extensionSet<String> getPrivilegedArtifacts()
Set with all the artifact IDs that have access to the privileged API exported by this extension. Each artifact is defined using Maven's groupId:artifactIdString getVendor()
XmlDslModel getXmlDslModel()
XmlDslModel which describes the language which allows using the extensionSet<SubTypesModel> getSubTypes()
Set of SubTypesModel which describes the subtypes defined by
this extensionSet<ImportedTypeModel> getImportedTypes()
Set of ImportedTypeModel which describes the types that are imported
by this extensionMuleVersion getMinMuleVersion()
MuleVersion. This MuleVersion represents the minimum version of the
Mule Runtime that the extension requires to work correctly.MuleVersion.Set<ErrorModel> getErrorModels()
Set of ErrorModel registered in the extension.Copyright © 2017 MuleSoft, Inc.. All rights reserved.