Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.15.5. Customizing Fixed Value Attribute Mapping
Overview Copy linkLink copied to clipboard!
globalBindings customization element. You can also customize the mapping of fixed value attributes to Java constants at a more localized level using the property element.
Global customization Copy linkLink copied to clipboard!
globalBinding element's fixedAttributeAsConstantProperty attribute. Setting this attribute to true instructs the code generator to map any attribute defined using fixed attribute to a Java constant.
Example 15.21. in-Line Customization to Force Generation of Constants
Example 15.22. Binding File to Force Generation of Constants
Local mapping Copy linkLink copied to clipboard!
property element's fixedAttributeAsConstantProperty attribute. Setting this attribute to true instructs the code generator to map any attribute defined using fixed attribute to a Java constant.
Example 15.23. In-Line Customization to Force Generation of Constants
Example 15.24. Binding File to Force Generation of Constants
Java mapping Copy linkLink copied to clipboard!
fixed attribute, the attribute is mapped to a Java constant, as shown in Example 15.25, “Mapping of a Fixed Value Attribute to a Java Constant”.
Example 15.25. Mapping of a Fixed Value Attribute to a Java Constant
@XmlAttribute public final static type NAME = value;
@XmlAttribute
public final static type NAME = value;
attribute element's name attribute to all capital letters.
attribute element's fixed attribute.
Example 15.26. Fixed Value Attribute Mapped to a Java Constant