Module org.mule.runtime.dsl.api
Class ComponentConfiguration.Builder
java.lang.Object
org.mule.runtime.dsl.api.component.config.ComponentConfiguration.Builder
- Enclosing class:
- ComponentConfiguration
Builder for creating
ComponentConfiguration instances.-
Method Summary
Modifier and TypeMethodDescriptionbuild()withComponentLocation(org.mule.runtime.api.component.location.ComponentLocation componentLocation) withIdentifier(org.mule.runtime.api.component.ComponentIdentifier identifier) withNestedComponent(ComponentConfiguration nestedComponent) Adds a complex configuration parameter to the component.withParameter(String name, String value) Adds a configuration parameter to the componentwithProperty(String name, Object value) Adds a property to theComponentConfiguration.Sets the inner content of the configuration element.
-
Method Details
-
getComponentConfiguration
- Returns:
- the location of the component in the configuration.
-
withIdentifier
public ComponentConfiguration.Builder withIdentifier(org.mule.runtime.api.component.ComponentIdentifier identifier) - Parameters:
identifier- identifier for the configuration element this object represents.- Returns:
- the builder.
-
withParameter
Adds a configuration parameter to the component- Parameters:
name- configuration attribute namevalue- configuration attribute value- Returns:
- the builder
-
withValue
Sets the inner content of the configuration element.- Parameters:
textContent- inner text content from the configuration- Returns:
- the builder
-
withProperty
Adds a property to theComponentConfiguration. This property is meant to hold only metadata of the configuration.- Parameters:
name- custom attribute name.value- custom attribute value.- Returns:
- the builder.
-
withComponentLocation
public ComponentConfiguration.Builder withComponentLocation(org.mule.runtime.api.component.location.ComponentLocation componentLocation) - Parameters:
componentLocation- the location of the component in the configuration.- Returns:
- the builder.
-
withNestedComponent
Adds a complex configuration parameter to the component.For instance, to define a file:matcher for a file:read component: *
<file:read> <file:matcher regex="XYZ"/> </file:read>- Parameters:
nestedComponent- theComponentConfigurationthat represents the nested configuration- Returns:
thisComponentConfiguration.Builder
-
build
- Returns:
- a
ComponentConfigurationwith the provided configuration
-