public abstract class ComponentModel extends Object
ComponentModel represents the user configuration of a component (flow, config, message processor, etc) defined in an
artifact configuration file.
Every ComponentModel represents the configuration of a core configuration or an extension configuration. Which
configuration element this object represents is identified by a ComponentIdentifier that can be retrieved using
#getName.
It may have simple configuration parameters which are retrieve by using #getParameterGroups or complex parameters which
are retrieved using #getInnerComponents.
There's a set of configuration attributes or custom attributes that may not be mapped directly to the object that runs on
runtime but may be hold by a ComponentModel. Those attributes are retrieved by using #getCustomAttributes.| Modifier and Type | Class and Description |
|---|---|
static class |
ComponentModel.Builder
Builder to create instances of
ComponentModel. |
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT_MODEL_KEY |
| Constructor and Description |
|---|
ComponentModel() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
void |
executedOnEveryInnerComponent(Consumer<ComponentModel> task)
Executes the task on every inner component associated to this componentModel.
|
org.mule.runtime.dsl.api.component.config.DefaultComponentLocation |
getComponentLocation() |
org.mule.runtime.api.component.TypedComponentIdentifier.ComponentType |
getComponentType() |
Optional<String> |
getConfigFileName()
Deprecated.
|
org.mule.runtime.dsl.api.component.config.ComponentConfiguration |
getConfiguration()
Deprecated.
|
Map<String,Object> |
getCustomAttributes()
Deprecated.
|
org.mule.runtime.api.component.ComponentIdentifier |
getIdentifier() |
List<ComponentModel> |
getInnerComponents() |
Optional<Integer> |
getLineNumber()
Deprecated.
|
org.mule.runtime.ast.api.ComponentMetadataAst |
getMetadata() |
<M> Optional<M> |
getModel(Class<M> modelClass) |
String |
getNameAttribute()
Deprecated.
Use
ComponentAst.getComponentId() instead. |
Object |
getObjectInstance() |
ComponentModel |
getParent() |
Map<String,String> |
getRawParameters() |
String |
getSourceCode()
Deprecated.
|
Optional<Integer> |
getStartColumn()
Deprecated.
|
String |
getTextContent() |
Class<?> |
getType() |
int |
hashCode() |
boolean |
isParameterValueProvidedBySchema(String parameterName) |
boolean |
isRoot() |
boolean |
isScope() |
void |
resolveTypedComponentIdentifier(ExtensionModelHelper extensionModelHelper,
boolean runtimeMode) |
void |
setComponentLocation(org.mule.runtime.dsl.api.component.config.DefaultComponentLocation componentLocation) |
void |
setComponentModel(org.mule.runtime.api.meta.model.ComponentModel model) |
void |
setComponentType(org.mule.runtime.api.component.TypedComponentIdentifier.ComponentType componentType) |
void |
setConfigurationModel(org.mule.runtime.api.meta.model.config.ConfigurationModel model) |
void |
setConnectionProviderModel(org.mule.runtime.api.meta.model.connection.ConnectionProviderModel connectionProviderModel) |
void |
setMetadataTypeModelAdapter(org.mule.runtime.config.internal.model.MetadataTypeModelAdapter metadataTypeModelAdapter) |
void |
setNestableElementModel(org.mule.runtime.api.meta.model.nested.NestableElementModel nestableElementModel) |
void |
setObjectInstance(Object objectInstance)
Setter used for components that should be created eagerly without going through spring.
|
void |
setParameter(org.mule.runtime.api.meta.model.parameter.ParameterModel parameterModel,
org.mule.runtime.ast.api.ComponentParameterAst value) |
void |
setParent(ComponentModel parent) |
void |
setRoot(boolean root)
Marked as true if it's a top level configuration.
|
void |
setType(Class<?> type) |
public static String COMPONENT_MODEL_KEY
@Deprecated public Optional<Integer> getLineNumber()
@Deprecated public Optional<Integer> getStartColumn()
@Deprecated public Optional<String> getConfigFileName()
public org.mule.runtime.api.component.ComponentIdentifier getIdentifier()
public Map<String,String> getRawParameters()
java.util.Map with the simple parameters of the configuration.public List<ComponentModel> getInnerComponents()
java.util.List of all the child ComponentModels@Deprecated public Map<String,Object> getCustomAttributes()
java.util.Map with all the custom attributes.public boolean isRoot()
ComponentModel is a top level configuration element, false otherwise.public void setRoot(boolean root)
public void setParameter(org.mule.runtime.api.meta.model.parameter.ParameterModel parameterModel,
org.mule.runtime.ast.api.ComponentParameterAst value)
parameterName - name of the configuration parameter.value - value contained by the configuration parameter.public Class<?> getType()
ComponentModel.public void setType(Class<?> type)
type - the type of the object to be created when processing this ComponentModel.public void setComponentType(org.mule.runtime.api.component.TypedComponentIdentifier.ComponentType componentType)
componentType - the TypedComponentIdentifier.ComponentType of the object to be
created when processing this ComponentModel.public org.mule.runtime.api.component.TypedComponentIdentifier.ComponentType getComponentType()
public void resolveTypedComponentIdentifier(ExtensionModelHelper extensionModelHelper, boolean runtimeMode)
public void setComponentModel(org.mule.runtime.api.meta.model.ComponentModel model)
public void setNestableElementModel(org.mule.runtime.api.meta.model.nested.NestableElementModel nestableElementModel)
public void setConfigurationModel(org.mule.runtime.api.meta.model.config.ConfigurationModel model)
public void setConnectionProviderModel(org.mule.runtime.api.meta.model.connection.ConnectionProviderModel connectionProviderModel)
public void setMetadataTypeModelAdapter(org.mule.runtime.config.internal.model.MetadataTypeModelAdapter metadataTypeModelAdapter)
@Deprecated public String getNameAttribute()
ComponentAst.getComponentId() instead.public boolean isScope()
ComponentModel represents a org.mule.runtime.core.api.processor.MessageProcessor scope.public void setParent(ComponentModel parent)
public ComponentModel getParent()
public String getTextContent()
public void setComponentLocation(org.mule.runtime.dsl.api.component.config.DefaultComponentLocation componentLocation)
componentLocation - the location of the component in the configuration.public org.mule.runtime.dsl.api.component.config.DefaultComponentLocation getComponentLocation()
public Object getObjectInstance()
public void setObjectInstance(Object objectInstance)
ObjectProvider interface that require to be created before the
application components so they can be referenced.objectInstance - the object instance created from this model.public boolean isParameterValueProvidedBySchema(String parameterName)
parameterName - configuration parameter name@Deprecated public org.mule.runtime.dsl.api.component.config.ComponentConfiguration getConfiguration()
public void executedOnEveryInnerComponent(Consumer<ComponentModel> task)
task - to be executed on inner components.@Deprecated public String getSourceCode()
public org.mule.runtime.ast.api.ComponentMetadataAst getMetadata()
Copyright © 2003–2020 MuleSoft, Inc.. All rights reserved.