@NoExtend public abstract class EnrichableElementDeclaration extends ElementDeclaration implements CustomizableElementDeclaration, MetadataPropertiesAwareElementDeclaration
ElementDeclaration that can be enriched with custom properties and parameters.declaringExtension, name| Constructor and Description |
|---|
EnrichableElementDeclaration() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomConfigurationParameter(ParameterElementDeclaration customParameter)
Adds a
custom parameter to this enrichable element declaration. |
void |
addMetadataProperty(String name,
Serializable value)
Adds a
metadataProperty to the ElementDeclaration. |
boolean |
equals(Object o) |
List<ParameterElementDeclaration> |
getCustomConfigurationParameters()
The
customConfigurationParameters refer to parameters that are part of a declaration configuration but do not match
to an element in the model, thus being custom of how the declaration was created. |
Map<String,Serializable> |
getMetadataProperties() |
Optional<Serializable> |
getMetadataProperty(String name)
Retrieves a
metadataProperty to the ElementDeclaration. |
int |
hashCode() |
getDeclaringExtension, getName, setDeclaringExtension, setNamepublic List<ParameterElementDeclaration> getCustomConfigurationParameters()
customConfigurationParameters refer to parameters that are part of a declaration configuration but do not match
to an element in the model, thus being custom of how the declaration was created.
An example for this would be having a <ns:identifier doc:name="myCustomName">, where doc:name is a custom
attribute that enriches the XML representation of an ElementDeclarationgetCustomConfigurationParameters in interface CustomizableElementDeclarationList of parameters associated with thispublic void addCustomConfigurationParameter(ParameterElementDeclaration customParameter)
custom parameter to this enrichable element declaration.
The customConfigurationParameters refer to parameters that are part of a declaration configuration but do not match
to an element in the model, thus being custom of how the declaration was created.
An example for this would be having a <ns:identifier doc:name="myCustomName">, where doc:name is a custom
attribute that enriches the XML representation of an ElementDeclaration
No validation of any kind will be performed over this customParameter and its value.addCustomConfigurationParameter in interface CustomizableElementDeclarationcustomParameter - the ParameterElementDeclaration to associate to this element declarationpublic 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.getMetadataProperty in interface MetadataPropertiesAwareElementDeclarationname - the name of the propertyOptional.empty() if none was found.public Map<String,Serializable> getMetadataProperties()
getMetadataProperties in interface MetadataPropertiesAwareElementDeclarationEnrichableElementDeclarationpublic void 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.addMetadataProperty in interface MetadataPropertiesAwareElementDeclarationname - custom attribute name.value - custom attribute value.public boolean equals(Object o)
equals in class ElementDeclarationpublic int hashCode()
hashCode in class ElementDeclarationCopyright © 2025 MuleSoft, Inc.. All rights reserved.