Class AttributeConverter.Factory
- java.lang.Object
-
- org.jboss.as.controller.transform.description.AttributeConverter.Factory
-
- Enclosing interface:
- AttributeConverter
public static class AttributeConverter.Factory extends Object
Factory for common types of AttributeConverters
-
-
Constructor Summary
Constructors Constructor Description Factory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AttributeConverter
createHardCoded(org.jboss.dmr.ModelNode hardCodedValue)
Creates an AttributeConverter where the conversion is to a hard-coded valuestatic 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
.
-
-
-
Method Detail
-
createHardCoded
public static AttributeConverter createHardCoded(org.jboss.dmr.ModelNode hardCodedValue)
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
undefinedOnly
param totrue
is 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
-true
if the conversion should only occur if theattributeValue
param isModelType.UNDEFINED
- Returns:
- the created attribute converter
-
-