Interface DslSyntaxResolver
- All Known Implementing Classes:
XmlDslSyntaxResolver
public interface DslSyntaxResolver
Provides the
DslElementSyntax of any Component, Parameter or
Type within the context of the Extension model where the Component was declared.- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic DslSyntaxResolvergetDefault(org.mule.runtime.api.meta.model.ExtensionModel model, org.mule.runtime.api.dsl.DslResolvingContext context) Creates an instance using the default implementationstatic DslSyntaxResolvergetDefault(org.mule.runtime.api.meta.model.ExtensionModel model, ImportTypesStrategy importTypesStrategy) Creates an instance using the default implementationresolve(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
-
Method Details
-
resolve
Resolves theDslElementSyntaxfor the givencomponent.- 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.- Parameters:
parameter- theParameterModelto be described in theDslElementSyntax- Returns:
- the
DslElementSyntaxfor theparameter
-
resolve
Resolves theDslElementSyntaxfor the standalone xml element for the givenMetadataType- 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
-
resolveInline
Resolves theDslElementSyntaxfor aParameterGroupModelthat has to be shown as an inline element of the DSL- Parameters:
group- theParameterGroupModelto be described in theDslElementSyntax- Returns:
- the
DslElementSyntaxfor thegroup
-
getDefault
static DslSyntaxResolver getDefault(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- Returns:
- the default implementation of a
DslSyntaxResolver - Throws:
IllegalArgumentException- if theExtensionModeldeclares an imported type from anExtensionModelnot present in the providedDslResolvingContextor if the importedExtensionModeldoesn't have anyImportedTypeModel
-
getDefault
static DslSyntaxResolver getDefault(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- Returns:
- the default implementation of a
DslSyntaxResolver - Throws:
IllegalArgumentException- if theExtensionModeldeclares an imported type from anExtensionModelnot present in the providedDslResolvingContextor if the importedExtensionModeldoesn't have anyImportedTypeModel
-