public static class FailedOperationTransformationConfig.ChainedConfig extends FailedOperationTransformationConfig.AttributesPathAddressConfig<FailedOperationTransformationConfig.ChainedConfig>
Modifier and Type | Class and Description |
---|---|
static interface |
FailedOperationTransformationConfig.ChainedConfig.Builder |
attributes, complexAttributes, noWriteFailureAttributes, readOnlyAttributes
Constructor and Description |
---|
ChainedConfig(List<FailedOperationTransformationConfig.AttributesPathAddressConfig<?>> configs,
AttributeDefinition... attributes)
Constructor
|
ChainedConfig(List<FailedOperationTransformationConfig.AttributesPathAddressConfig<?>> configs,
String... attributes)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
canCorrectMore(org.jboss.dmr.ModelNode operation)
Whether something can be corrected in the operation to make it pass.
|
protected boolean |
checkValue(String attrName,
org.jboss.dmr.ModelNode attribute,
boolean isWriteAttribute) |
org.jboss.dmr.ModelNode |
correctOperation(org.jboss.dmr.ModelNode operation)
Correct the operation, only called if
FailedOperationTransformationConfig.PathAddressConfig.canCorrectMore(ModelNode) returned true
It is preferable to correct one attribute at a time. |
protected org.jboss.dmr.ModelNode |
correctValue(org.jboss.dmr.ModelNode toResolve,
boolean isWriteAttribute) |
org.jboss.dmr.ModelNode |
correctWriteAttributeOperation(org.jboss.dmr.ModelNode operation)
Correct the operation.
|
static FailedOperationTransformationConfig.ChainedConfig.Builder |
createBuilder(AttributeDefinition... attributes) |
static FailedOperationTransformationConfig.ChainedConfig.Builder |
createBuilder(String... attributes) |
boolean |
expectFailed(org.jboss.dmr.ModelNode operation)
Whether it is expected that the following operation should fail
|
boolean |
expectFailedWriteAttributeOperation(org.jboss.dmr.ModelNode operation)
Whether it is expected that the following write attribute operation should fail
|
protected boolean |
isAttributeWritable(String attributeName) |
configureComplexAttribute, convert, correctUndefinedValue, createWriteAttributeOperations, expectDiscarded, setNotExpectedWriteFailure, setNotExpectedWriteFailure, setReadOnly, setReadOnly
public ChainedConfig(List<FailedOperationTransformationConfig.AttributesPathAddressConfig<?>> configs, String... attributes)
configs
- the configurations to use. For proper test coverage, these should be added in the same order as the rejecting transformersattributes
- the attributes to apply these transformers topublic ChainedConfig(List<FailedOperationTransformationConfig.AttributesPathAddressConfig<?>> configs, AttributeDefinition... attributes)
configs
- the configurations to use. For proper test coverage, these should be added in the same order as the rejecting transformersattributes
- the attributes to apply these transformers topublic boolean expectFailed(org.jboss.dmr.ModelNode operation)
FailedOperationTransformationConfig.PathAddressConfig
expectFailed
in interface FailedOperationTransformationConfig.PathAddressConfig
expectFailed
in class FailedOperationTransformationConfig.AttributesPathAddressConfig<FailedOperationTransformationConfig.ChainedConfig>
operation
- the operation to checktrue
if expected to failpublic org.jboss.dmr.ModelNode correctOperation(org.jboss.dmr.ModelNode operation)
FailedOperationTransformationConfig.PathAddressConfig
FailedOperationTransformationConfig.PathAddressConfig.canCorrectMore(ModelNode)
returned true
It is preferable to correct one attribute at a time.correctOperation
in interface FailedOperationTransformationConfig.PathAddressConfig
correctOperation
in class FailedOperationTransformationConfig.AttributesPathAddressConfig<FailedOperationTransformationConfig.ChainedConfig>
operation
- the operation to correctpublic org.jboss.dmr.ModelNode correctWriteAttributeOperation(org.jboss.dmr.ModelNode operation)
FailedOperationTransformationConfig.PathAddressConfig
FailedOperationTransformationConfig.PathAddressConfig.correctWriteAttributeOperation(ModelNode)
returned true
, so make sure to do everything to correct the value
attribute.correctWriteAttributeOperation
in interface FailedOperationTransformationConfig.PathAddressConfig
correctWriteAttributeOperation
in class FailedOperationTransformationConfig.AttributesPathAddressConfig<FailedOperationTransformationConfig.ChainedConfig>
operation
- the 'write-attribute' operation to correctprotected boolean isAttributeWritable(String attributeName)
public boolean canCorrectMore(org.jboss.dmr.ModelNode operation)
FailedOperationTransformationConfig.PathAddressConfig
canCorrectMore
in interface FailedOperationTransformationConfig.PathAddressConfig
canCorrectMore
in class FailedOperationTransformationConfig.AttributesPathAddressConfig<FailedOperationTransformationConfig.ChainedConfig>
operation
- the operation to checktrue
if expected to fail, false
otherwisepublic boolean expectFailedWriteAttributeOperation(org.jboss.dmr.ModelNode operation)
FailedOperationTransformationConfig.PathAddressConfig
expectFailedWriteAttributeOperation
in interface FailedOperationTransformationConfig.PathAddressConfig
expectFailedWriteAttributeOperation
in class FailedOperationTransformationConfig.AttributesPathAddressConfig<FailedOperationTransformationConfig.ChainedConfig>
operation
- the 'add' operation to correcttrue
if expected to failprotected boolean checkValue(String attrName, org.jboss.dmr.ModelNode attribute, boolean isWriteAttribute)
protected org.jboss.dmr.ModelNode correctValue(org.jboss.dmr.ModelNode toResolve, boolean isWriteAttribute)
public static FailedOperationTransformationConfig.ChainedConfig.Builder createBuilder(String... attributes)
public static FailedOperationTransformationConfig.ChainedConfig.Builder createBuilder(AttributeDefinition... attributes)
Copyright © 2023 JBoss by Red Hat. All rights reserved.