public static class AttributeConverter.Factory extends Object
| Constructor and Description |
|---|
Factory() |
| Modifier and Type | Method and Description |
|---|---|
static AttributeConverter |
createHardCoded(org.jboss.dmr.ModelNode hardCodedValue)
Creates an AttributeConverter where the conversion is to a hard-coded value
|
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 is
ModelType.UNDEFINED. |
public static AttributeConverter createHardCoded(org.jboss.dmr.ModelNode hardCodedValue)
hardCodedValue - the value to set the attribute topublic static AttributeConverter createHardCoded(org.jboss.dmr.ModelNode hardCodedValue, boolean undefinedOnly)
ModelType.UNDEFINED.
The expected use case for setting the undefinedOnly param to true 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".
hardCodedValue - the value to set the attribute toundefinedOnly - true if the conversion should only occur if the attributeValue
param is ModelType.UNDEFINEDCopyright © 2021 JBoss by Red Hat. All rights reserved.