public static class ComponentModel.Builder extends Object
ComponentModel.| Constructor and Description |
|---|
Builder()
Default constructor for this builder.
|
Builder(ComponentModel root)
Creates an instance of the Builder which will allow to merge other root component models to the given one.
|
| Modifier and Type | Method and Description |
|---|---|
ComponentModel.Builder |
addChildComponentModel(ComponentModel componentModel)
Adds a new complex child object to this
ComponentModel. |
ComponentModel.Builder |
addCustomAttribute(QName qname,
Object value)
Adds a custom attribute to the
ComponentModel. |
ComponentModel.Builder |
addCustomAttribute(String name,
Object value)
Adds a custom attribute to the
ComponentModel. |
ComponentModel.Builder |
addParameter(String parameterName,
String value,
boolean valueFromSchema) |
ComponentModel |
build() |
ComponentModel.Builder |
markAsRootComponent()
When invoked the created
ComponentModel will be marked us a top level configuration. |
ComponentModel.Builder |
merge(ComponentModel otherRootComponentModel)
Given the following root component it will merge its customAttributes, parameters and schemaValueParameters to the root
component model.
|
ComponentModel.Builder |
setConfigFileName(String configFileName) |
ComponentModel.Builder |
setIdentifier(org.mule.runtime.api.component.ComponentIdentifier identifier) |
ComponentModel.Builder |
setLineNumber(int lineNumber) |
ComponentModel.Builder |
setSourceCode(String sourceCode) |
ComponentModel.Builder |
setStartColumn(int startColumn) |
ComponentModel.Builder |
setTextContent(String textContent)
Sets the inner content of the configuration element.
|
public Builder()
public Builder(ComponentModel root)
root - ComponentModel to be used as root. It will be modified.public ComponentModel.Builder setIdentifier(org.mule.runtime.api.component.ComponentIdentifier identifier)
identifier - identifier for the configuration element this object represents.public ComponentModel.Builder addParameter(String parameterName, String value, boolean valueFromSchema)
parameterName - name of the configuration parameter.value - value contained by the configuration parameter.valueFromSchema - public ComponentModel.Builder addChildComponentModel(ComponentModel componentModel)
ComponentModel.componentModel - child ComponentModel declared in the configuration.public ComponentModel.Builder setTextContent(String textContent)
textContent - inner text content from the configuration.public ComponentModel.Builder markAsRootComponent()
ComponentModel will be marked us a top level configuration.public ComponentModel.Builder addCustomAttribute(String name, Object value)
ComponentModel. This custom attribute is meant to hold metadata of the configuration
and not to be used to instantiate the runtime object that corresponds to this configuration.name - custom attribute name.value - custom attribute value.public ComponentModel.Builder addCustomAttribute(QName qname, Object value)
ComponentModel. This custom attribute is meant to hold metadata of the configuration
and not to be used to instantiate the runtime object that corresponds to this configuration.name - custom attribute name.value - custom attribute value.public ComponentModel.Builder setConfigFileName(String configFileName)
configFileName - the config file name in which this component was defined.public ComponentModel.Builder setLineNumber(int lineNumber)
lineNumber - the line number within the config file in which this component was defined.public ComponentModel.Builder setStartColumn(int startColumn)
startColumn - the start column within the config file in which this component was defined.public ComponentModel.Builder setSourceCode(String sourceCode)
sourceCode - the source code associated with this component.public ComponentModel.Builder merge(ComponentModel otherRootComponentModel)
otherRootComponentModel - another component model created as root to be merged.public ComponentModel build()
ComponentModel created based on the supplied parameters.Copyright © 2003–2020 MuleSoft, Inc.. All rights reserved.