Class XmlDslSyntaxResolver
java.lang.Object
org.mule.runtime.extension.api.dsl.syntax.XmlDslSyntaxResolver
- All Implemented Interfaces:
DslSyntaxResolver
Default implementation of a
DslSyntaxResolver based on XML.
Provides the DslElementSyntax of any Component, Parameter or
Type within the context of the Extension model where the Component was declared.
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionXmlDslSyntaxResolver(org.mule.runtime.api.meta.model.ExtensionModel model, org.mule.runtime.api.dsl.DslResolvingContext context) Creates an instance using the default implementationXmlDslSyntaxResolver(org.mule.runtime.api.meta.model.ExtensionModel model, ImportTypesStrategy importTypesStrategy) Creates an instance using the default implementation -
Method Summary
Modifier and TypeMethodDescriptionresolve(org.mule.metadata.api.model.MetadataType type) Resolves theDslElementSyntaxfor the standalone xml element for the givenMetadataTyperesolve(org.mule.runtime.api.meta.model.parameter.ParameterModel parameter) Resolves theDslElementSyntaxfor the givenparameter, providing all the required information for representing thisparameterelement in the DSL.resolve(org.mule.runtime.api.meta.NamedObject component) Resolves theDslElementSyntaxfor the givencomponent.resolveInline(org.mule.runtime.api.meta.model.parameter.ParameterGroupModel group) Resolves theDslElementSyntaxfor aParameterGroupModelthat has to be shown as an inline element of the DSL
-
Constructor Details
-
XmlDslSyntaxResolver
public XmlDslSyntaxResolver(org.mule.runtime.api.meta.model.ExtensionModel model, org.mule.runtime.api.dsl.DslResolvingContext context) Creates an instance using the default implementation- Parameters:
model- theExtensionModelthat provides context for resolving the component'sDslElementSyntaxcontext- theDslResolvingContextin which the Dsl resolution takes place- Throws:
IllegalArgumentException- if theExtensionModeldeclares an imported type from anExtensionModelnot present in the providedDslResolvingContextor if the importedExtensionModeldoesn't have anyImportedTypeModel
-
XmlDslSyntaxResolver
public XmlDslSyntaxResolver(org.mule.runtime.api.meta.model.ExtensionModel model, ImportTypesStrategy importTypesStrategy) Creates an instance using the default implementation- Parameters:
model- theExtensionModelthat provides context for resolving the component'sDslElementSyntaximportTypesStrategy- theImportTypesStrategyused for external types resolution- Throws:
IllegalArgumentException- if theExtensionModeldeclares an imported type from anExtensionModelnot present in the providedDslResolvingContextor if the importedExtensionModeldoesn't have anyImportedTypeModel
-
-
Method Details
-
resolve
Resolves theDslElementSyntaxfor the givencomponent.- Specified by:
resolvein interfaceDslSyntaxResolver- Parameters:
component- theNamedObjectelement to be described in theDslElementSyntax- Returns:
- the
DslElementSyntaxfor themodel
-
resolve
Resolves theDslElementSyntaxfor the givenparameter, providing all the required information for representing thisparameterelement in the DSL.- Specified by:
resolvein interfaceDslSyntaxResolver- Parameters:
parameter- theParameterModelto be described in theDslElementSyntax- Returns:
- the
DslElementSyntaxfor theparameter
-
resolveInline
public DslElementSyntax resolveInline(org.mule.runtime.api.meta.model.parameter.ParameterGroupModel group) Resolves theDslElementSyntaxfor aParameterGroupModelthat has to be shown as an inline element of the DSL- Specified by:
resolveInlinein interfaceDslSyntaxResolver- Parameters:
group- theParameterGroupModelto be described in theDslElementSyntax- Returns:
- the
DslElementSyntaxfor thegroup
-
resolve
Resolves theDslElementSyntaxfor the standalone xml element for the givenMetadataType- Specified by:
resolvein interfaceDslSyntaxResolver- Parameters:
type- theMetadataTypeto be described in theDslElementSyntax- Returns:
- the
DslElementSyntaxfor the top level element associated to theMetadataTypeorOptional.empty()if thetypeis not supported as an standalone element
-