public interface MetadataPropertiesAwareElementDeclaration
This is useful for extending the information over a particular data element of the declared artifact. Examples of this can go from the fact that the data has to be escaped as a CDATA element, all the way to actually storing the origin element.
| Modifier and Type | Method and Description |
|---|---|
void |
addMetadataProperty(String name,
Serializable value)
Adds a
metadataProperty to the ElementDeclaration. |
Map<String,Serializable> |
getMetadataProperties() |
Optional<Serializable> |
getMetadataProperty(String name)
Retrieves a
metadataProperty to the ElementDeclaration. |
Optional<Serializable> getMetadataProperty(String name)
metadataProperty to the ElementDeclaration.
This property is meant to hold only metadata of the declaration,
related to how the declaration has to be represented but not affecting nor containing
information related to the model configured with this declaration.name - the name of the propertyOptional.empty() if none was found.Map<String,Serializable> getMetadataProperties()
EnrichableElementDeclarationvoid addMetadataProperty(String name, Serializable value)
metadataProperty to the ElementDeclaration.
This property is meant to hold only metadata of the declaration,
related to how the declaration has to be represented but not affecting nor containing
information related to the model configured with this declaration.
This property may contain information regarding things like transformations required for
the persistence of a given element, or propagating particular metadata of how the
declaration was originally declared before deserialization.
An example for this would be having an xmlns prefix declared different than
the one declared by the extension. So in order to represent:
<my-http-alias:listener-config> we will declare an http:listener-config
adding also a metadataProperty with the custom prefix my-http-alias.
This way, we can honour the original XML representation, but keep
the ElementDeclaration closer the the model it represents.name - custom attribute name.value - custom attribute value.Copyright © 2017 MuleSoft, Inc.. All rights reserved.