public 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. |
| 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.springframework.beans.factory.config.BeanDefinition |
getBeanDefinition() |
org.springframework.beans.factory.config.BeanReference |
getBeanReference() |
DefaultComponentLocation |
getComponentLocation() |
Optional<String> |
getConfigFileName() |
ComponentConfiguration |
getConfiguration() |
Map<String,Object> |
getCustomAttributes() |
org.mule.runtime.api.component.ComponentIdentifier |
getIdentifier() |
List<ComponentModel> |
getInnerComponents() |
Optional<Integer> |
getLineNumber() |
String |
getNameAttribute() |
Map<String,String> |
getParameters() |
ComponentModel |
getParent() |
String |
getTextContent() |
Class<?> |
getType() |
int |
hashCode() |
boolean |
isEnabled() |
boolean |
isParameterValueProvidedBySchema(String parameterName) |
boolean |
isRoot() |
boolean |
isScope() |
void |
setBeanDefinition(org.springframework.beans.factory.config.BeanDefinition beanDefinition) |
void |
setBeanReference(org.springframework.beans.factory.config.BeanReference beanReference) |
void |
setComponentLocation(DefaultComponentLocation componentLocation) |
void |
setEnabled(boolean enabled)
Sets the component as enabled, meaning that it should be created and the beanDefinition associated with created too.
|
void |
setParameter(String parameterName,
String value) |
void |
setParent(ComponentModel parent) |
void |
setRoot(boolean root)
Marked as true if it's a top level configuration.
|
void |
setType(Class<?> type) |
public Optional<Integer> getLineNumber()
public Optional<String> getConfigFileName()
public org.mule.runtime.api.component.ComponentIdentifier getIdentifier()
public Map<String,String> getParameters()
java.util.Map with the simple parameters of the configuration.public List<ComponentModel> getInnerComponents()
java.util.List of all the child ComponentModelspublic 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 setBeanDefinition(org.springframework.beans.factory.config.BeanDefinition beanDefinition)
beanDefinition - the BeanDefinition created based on the ComponentModel values.public void setRoot(boolean root)
public void setParameter(String parameterName, String value)
parameterName - name of the configuration parameter.value - value contained by the configuration parameter.public org.springframework.beans.factory.config.BeanDefinition getBeanDefinition()
BeanDefinition created based on the ComponentModel values.public Class<?> getType()
ComponentModel.public void setType(Class<?> type)
type - the type of the object to be created when processing this ComponentModel.public String getNameAttribute()
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(DefaultComponentLocation componentLocation)
componentLocation - the location of the component in the configuration.public DefaultComponentLocation getComponentLocation()
public void setBeanReference(org.springframework.beans.factory.config.BeanReference beanReference)
beanReference - the BeanReference that represents this object.public org.springframework.beans.factory.config.BeanReference getBeanReference()
BeanReference that represents this object.public boolean isParameterValueProvidedBySchema(String parameterName)
parameterName - configuration parameter namepublic ComponentConfiguration getConfiguration()
public void setEnabled(boolean enabled)
enabled - if this component is enabled and has to be created.public void executedOnEveryInnerComponent(Consumer<ComponentModel> task)
task - to be executed on inner components.public boolean isEnabled()
true if this component is enabled and has to be created.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.