Class AttributeConverter.Factory
java.lang.Object
org.jboss.as.controller.transform.description.AttributeConverter.Factory
- Enclosing interface:
- AttributeConverter
Factory for common types of AttributeConverters
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AttributeConvertercreateHardCoded(org.jboss.dmr.ModelNode hardCodedValue) Creates an AttributeConverter where the conversion is to a hard-coded valuestatic AttributeConvertercreateHardCoded(org.jboss.dmr.ModelNode hardCodedValue, boolean undefinedOnly) Creates an AttributeConverter where the conversion is to a hard-coded value, with the ability to restrict the conversion to cases where the value being converted isModelType.UNDEFINED.
-
Constructor Details
-
Factory
public Factory()
-
-
Method Details
-
createHardCoded
Creates an AttributeConverter where the conversion is to a hard-coded value- Parameters:
hardCodedValue- the value to set the attribute to- Returns:
- the created attribute converter
-
createHardCoded
public static AttributeConverter createHardCoded(org.jboss.dmr.ModelNode hardCodedValue, boolean undefinedOnly) Creates an AttributeConverter where the conversion is to a hard-coded value, with the ability to restrict the conversion to cases where the value being converted isModelType.UNDEFINED.The expected use case for setting the
undefinedOnlyparam totrueis to ensure a legacy slave sees the correct value following a change in a default between releases. If the attribute being converted is undefined, then the default value is relevant, and in order to function consistently with newer slaves, the legacy slave will need to be given the new default in place of "undefined".- Parameters:
hardCodedValue- the value to set the attribute toundefinedOnly-trueif the conversion should only occur if theattributeValueparam isModelType.UNDEFINED- Returns:
- the created attribute converter
-