java.lang.Object
org.mule.sdk.api.metadata.MetadataKeyBuilder
An implementation of the builder design pattern to create a new
MetadataKey instance.- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a new instance ofMetadataKey.static MetadataKeyBuilderCreates and returns new instance of aMetadataKeyBuilder, to help building a newMetadataKeyrepresented by the givenprotected voidsetPartName(String partName) withChild(MetadataKey metadataKey) Adds a newMetadataKeychild to theMetadataKeythat is being built.withChild(MetadataKeyBuilder metadataKeyBuilder) Adds a newMetadataKeyBuilderchild to theMetadataKeythat is being built.withDisplayName(String displayName) Adds a display name to theMetadataKeythat is being builtwithPartName(String partName) Adds a newMetadataKeyBuilderchild to theMetadataKeythat is being built.withProperty(org.mule.runtime.api.metadata.MetadataProperty property) Adds a customMetadataPropertyto theMetadataKeythat is being built
-
Constructor Details
-
MetadataKeyBuilder
-
-
Method Details
-
newKey
Creates and returns new instance of aMetadataKeyBuilder, to help building a newMetadataKeyrepresented by the given- Parameters:
id- of theMetadataKeyto be created- Returns:
- an initialized instance of
MetadataKeyBuilder
-
withDisplayName
Adds a display name to theMetadataKeythat is being built- Parameters:
displayName- of theMetadataKeyto be created- Returns:
thisbuilder with the configured display name
-
withProperty
Adds a customMetadataPropertyto theMetadataKeythat is being built- Parameters:
property- The newMetadataPropertyto be added into theMetadataKey- Returns:
thisbuilder with the new property
-
withChild
Adds a newMetadataKeyBuilderchild to theMetadataKeythat is being built.- Parameters:
metadataKeyBuilder- theMetadataKeyBuilderthat is used to create the instance of the new child.- Returns:
thisbuilder with a new child.
-
withChild
Adds a newMetadataKeychild to theMetadataKeythat is being built.- Parameters:
metadataKey- theMetadataKeythat is used to create the instance of the new child.- Returns:
thisbuilder with a new child.
-
withPartName
Adds a newMetadataKeyBuilderchild to theMetadataKeythat is being built.- Parameters:
partName- thepartNamethat is associated to this key part.- Returns:
thisbuilder with a new child.
-
setPartName
-
build
Builds a new instance ofMetadataKey.- Returns:
- an initialized
MetadataKey
-