@NoImplement 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
ConnectionProviderModel s which will be available to every ConfigurationModel defined in
this extension. |
Set<ErrorModel> |
getErrorModels() |
Set<ImportedTypeModel> |
getImportedTypes() |
String |
getName()
A simple name for this extension.
|
Set<NotificationModel> |
getNotificationModels() |
List<OperationModel> |
getOperationModels()
Returns a
List of OperationModel s defined at the extension level. |
Set<String> |
getPrivilegedArtifacts() |
Set<String> |
getPrivilegedPackages() |
Set<String> |
getResources() |
List<SourceModel> |
getSourceModels()
Returns a
List of SourceModel s defined at the extension level. |
Set<SubTypesModel> |
getSubTypes() |
Set<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() |
getDescription
getModelProperties, getModelProperty
getOperationModel
getSourceModel
getFunctionModel, getFunctionModels
getConnectionProviderModel
getDisplayModel
getExternalLibraryModels
getConstructModel, getConstructModels
String 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 NamedObject
String 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
ConfigurationModel
List<OperationModel> getOperationModels()
List
of OperationModel
s 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 HasOperationModels
List
of OperationModel
List<ConnectionProviderModel> getConnectionProviders()
ConnectionProviderModel
s 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 HasConnectionProviderModels
List
of ConnectionProviderModel
List<SourceModel> getSourceModels()
List
of SourceModel
s 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 HasSourceModels
List
of SourceModel
Set<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 extensionSet<ErrorModel> getErrorModels()
Set
of ErrorModel
registered in the extension.Set<NotificationModel> getNotificationModels()
Set
of NotificationModel
registered in the extension.Copyright © 2018. All rights reserved.