Interface ExtensionLoadingContext
- All Known Implementing Classes:
DefaultExtensionLoadingContext
@NoImplement
public interface ExtensionLoadingContext
Used for propagating state across all the components that take part into loading an
ExtensionModel.
Each instance should be used to load one and only one ExtensionModel. Use different instances if you're going to load
several models.
- Since:
- 1.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionRegisters a customDeclarationEnricherwhich is executed before the ones that the runtime automatically applies.Registers customDeclarationEnricherwhich are executed before the ones that the runtime automatically applies.addCustomValidator(ExtensionModelValidator extensionModelValidator) Registers a customExtensionModelValidatorto be executed on top of the ones which the runtime applies by default.addCustomValidators(Collection<ExtensionModelValidator> extensionModelValidators) Registers customExtensionModelValidatorto be executed on top of the ones which the runtime applies by default.voidaddParameter(String key, Object value) Adds a custom parameter registered underkeyvoidaddParameters(Map<String, Object> parameters) Adds the contents of the given map as custom parametersdefault Optional<org.mule.runtime.api.artifact.ArtifactCoordinates>org.mule.runtime.api.dsl.DslResolvingContextorg.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclarerTheExtensionDeclarerin which the extension is being described into<T> Optional<T>getParameter(String key) Obtains the custom parameter registered underkey.org.mule.metadata.api.ClassTypeLoaderbooleanbooleanboolean
-
Field Details
-
EXTENSION_LOADER_PROPERTY_PREFIX
- See Also:
-
-
Method Details
-
getExtensionDeclarer
org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclarer getExtensionDeclarer()TheExtensionDeclarerin which the extension is being described into- Returns:
- a non
nullExtensionDeclarer
-
getTypeLoader
org.mule.metadata.api.ClassTypeLoader getTypeLoader()- Returns:
- a type loader for the types from Java classes within an extension.
- Since:
- 1.9
-
addParameter
Adds a custom parameter registered underkey- Parameters:
key- the key under which thevalueis to be registeredvalue- the custom parameter value- Throws:
IllegalArgumentException- ifkeyorvaluearenull
-
addParameters
Adds the contents of the given map as custom parameters- Parameters:
parameters- a map with custom parameters
-
getParameter
Obtains the custom parameter registered underkey.- Type Parameters:
T- generic type of the expected value- Parameters:
key- the key under which the wanted value is registered- Returns:
- an
Optionalvalue
-
addCustomValidator
Registers a customExtensionModelValidatorto be executed on top of the ones which the runtime applies by default.Custom validators will not apply globally but just for the model being loaded with this context.
- Parameters:
extensionModelValidator- the custom validator- Returns:
thisinstance
-
addCustomValidators
ExtensionLoadingContext addCustomValidators(Collection<ExtensionModelValidator> extensionModelValidators) Registers customExtensionModelValidatorto be executed on top of the ones which the runtime applies by default.These custom validators will not apply globaly but just for the model being loaded with this context.
- Parameters:
extensionModelValidators- the custom validators- Returns:
thisinstance
-
addCustomDeclarationEnricher
Registers a customDeclarationEnricherwhich is executed before the ones that the runtime automatically applies.- Parameters:
enricher- the custom enricher- Returns:
thisinstance
-
addCustomDeclarationEnrichers
Registers customDeclarationEnricherwhich are executed before the ones that the runtime automatically applies.- Parameters:
enrichers- the custom enrichers- Returns:
thisinstance
-
getCustomDeclarationEnrichers
List<DeclarationEnricher> getCustomDeclarationEnrichers()- Returns:
- an immutable list with the registered custom enrichers
-
getCustomValidators
List<ExtensionModelValidator> getCustomValidators()- Returns:
- an immutable list with the registered custom validators
-
getExtensionClassLoader
ClassLoader getExtensionClassLoader()- Returns:
- the extension's
ClassLoader
-
getDslResolvingContext
org.mule.runtime.api.dsl.DslResolvingContext getDslResolvingContext()- Returns:
- the
DslResolvingContextwith all the dependencies to load anExtensionModel
-
isOCSEnabled
boolean isOCSEnabled()- Returns:
- whether OCS is enabled
- Since:
- 1.5
-
isForceExtensionValidation
boolean isForceExtensionValidation()- Returns:
- whether the extension must be validated after being loaded.
- Since:
- 1.7
-
isResolveMinMuleVersion
boolean isResolveMinMuleVersion()- Returns:
- whether the
minMuleVersionof each component must be calculated. - Since:
- 1.9
-
getArtifactCoordinates
- Returns:
- the
ArtifactCoordinatesof the Extension - Since:
- 1.5
-