Package org.jboss.as.model.test
Class FailedOperationTransformationConfig.AttributesPathAddressConfig<T extends FailedOperationTransformationConfig.AttributesPathAddressConfig<T>>
java.lang.Object
org.jboss.as.model.test.FailedOperationTransformationConfig.AttributesPathAddressConfig<T>
- All Implemented Interfaces:
FailedOperationTransformationConfig.PathAddressConfig
- Direct Known Subclasses:
FailedOperationTransformationConfig.ChainedConfig,FailedOperationTransformationConfig.NewAttributesConfig,FailedOperationTransformationConfig.RejectExpressionsConfig
- Enclosing class:
- FailedOperationTransformationConfig
public abstract static class FailedOperationTransformationConfig.AttributesPathAddressConfig<T extends FailedOperationTransformationConfig.AttributesPathAddressConfig<T>>
extends Object
implements FailedOperationTransformationConfig.PathAddressConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<String,FailedOperationTransformationConfig.AttributesPathAddressConfig<?>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanCorrectMore(org.jboss.dmr.ModelNode operation) Whether something can be corrected in the operation to make it pass.protected abstract booleancheckValue(String attrName, org.jboss.dmr.ModelNode attribute, boolean isGeneratedWriteAttribute) protected booleancheckValue(org.jboss.dmr.ModelNode operation, String attrName, org.jboss.dmr.ModelNode attribute, boolean isGeneratedWriteAttribute) configureComplexAttribute(String attribute, T childConfig) protected static String[]convert(org.jboss.as.controller.AttributeDefinition... defs) org.jboss.dmr.ModelNodecorrectOperation(org.jboss.dmr.ModelNode operation) Correct the operation, only called ifFailedOperationTransformationConfig.PathAddressConfig.canCorrectMore(ModelNode)returnedtrueIt is preferable to correct one attribute at a time.protected booleanprotected abstract org.jboss.dmr.ModelNodecorrectValue(org.jboss.dmr.ModelNode toResolve, boolean isGeneratedWriteAttribute) org.jboss.dmr.ModelNodecorrectWriteAttributeOperation(org.jboss.dmr.ModelNode operation) Correct the operation.List<org.jboss.dmr.ModelNode>createWriteAttributeOperations(org.jboss.dmr.ModelNode operation) Creates write attribute operations for the add operationsbooleanexpectDiscarded(org.jboss.dmr.ModelNode operation) Whether the operation is expected to be discardedbooleanexpectFailed(org.jboss.dmr.ModelNode operation) Whether it is expected that the following operation should failbooleanexpectFailedWriteAttributeOperation(org.jboss.dmr.ModelNode operation) Whether it is expected that the following write attribute operation should failprotected abstract booleanisAttributeWritable(String attributeName) setNotExpectedWriteFailure(String... attributes) setNotExpectedWriteFailure(org.jboss.as.controller.AttributeDefinition... attributes) setReadOnly(String... attributes) setReadOnly(org.jboss.as.controller.AttributeDefinition... attributes) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.as.model.test.FailedOperationTransformationConfig.PathAddressConfig
operationDone
-
Field Details
-
attributes
-
complexAttributes
protected final Map<String,FailedOperationTransformationConfig.AttributesPathAddressConfig<?>> complexAttributes -
noWriteFailureAttributes
-
readOnlyAttributes
-
-
Constructor Details
-
AttributesPathAddressConfig
-
-
Method Details
-
configureComplexAttribute
public FailedOperationTransformationConfig.AttributesPathAddressConfig<T> configureComplexAttribute(String attribute, T childConfig) -
convert
-
createWriteAttributeOperations
public List<org.jboss.dmr.ModelNode> createWriteAttributeOperations(org.jboss.dmr.ModelNode operation) Description copied from interface:FailedOperationTransformationConfig.PathAddressConfigCreates write attribute operations for the add operations- Specified by:
createWriteAttributeOperationsin interfaceFailedOperationTransformationConfig.PathAddressConfig
-
isAttributeWritable
-
setNotExpectedWriteFailure
public FailedOperationTransformationConfig.AttributesPathAddressConfig<T> setNotExpectedWriteFailure(String... attributes) -
setNotExpectedWriteFailure
public FailedOperationTransformationConfig.AttributesPathAddressConfig<T> setNotExpectedWriteFailure(org.jboss.as.controller.AttributeDefinition... attributes) -
setReadOnly
public FailedOperationTransformationConfig.AttributesPathAddressConfig<T> setReadOnly(String... attributes) -
setReadOnly
public FailedOperationTransformationConfig.AttributesPathAddressConfig<T> setReadOnly(org.jboss.as.controller.AttributeDefinition... attributes) -
expectFailed
public boolean expectFailed(org.jboss.dmr.ModelNode operation) Description copied from interface:FailedOperationTransformationConfig.PathAddressConfigWhether it is expected that the following operation should fail- Specified by:
expectFailedin interfaceFailedOperationTransformationConfig.PathAddressConfig- Parameters:
operation- the operation to check- Returns:
trueif expected to fail
-
canCorrectMore
public boolean canCorrectMore(org.jboss.dmr.ModelNode operation) Description copied from interface:FailedOperationTransformationConfig.PathAddressConfigWhether something can be corrected in the operation to make it pass. It is preferable to correct one attribute at a time.- Specified by:
canCorrectMorein interfaceFailedOperationTransformationConfig.PathAddressConfig- Parameters:
operation- the operation to check- Returns:
trueif expected to fail,falseotherwise
-
expectFailedWriteAttributeOperation
public boolean expectFailedWriteAttributeOperation(org.jboss.dmr.ModelNode operation) Description copied from interface:FailedOperationTransformationConfig.PathAddressConfigWhether it is expected that the following write attribute operation should fail- Specified by:
expectFailedWriteAttributeOperationin interfaceFailedOperationTransformationConfig.PathAddressConfig- Parameters:
operation- the 'add' operation to correct- Returns:
trueif expected to fail
-
correctOperation
public org.jboss.dmr.ModelNode correctOperation(org.jboss.dmr.ModelNode operation) Description copied from interface:FailedOperationTransformationConfig.PathAddressConfigCorrect the operation, only called ifFailedOperationTransformationConfig.PathAddressConfig.canCorrectMore(ModelNode)returnedtrueIt is preferable to correct one attribute at a time.- Specified by:
correctOperationin interfaceFailedOperationTransformationConfig.PathAddressConfig- Parameters:
operation- the operation to correct- Returns:
- the corrected operation
-
correctUndefinedValue
protected boolean correctUndefinedValue() -
correctWriteAttributeOperation
public org.jboss.dmr.ModelNode correctWriteAttributeOperation(org.jboss.dmr.ModelNode operation) Description copied from interface:FailedOperationTransformationConfig.PathAddressConfigCorrect the operation. This only deals with one attribute, and the framework will only call this once if it failed andFailedOperationTransformationConfig.PathAddressConfig.correctWriteAttributeOperation(ModelNode)returnedtrue, so make sure to do everything to correct thevalueattribute.- Specified by:
correctWriteAttributeOperationin interfaceFailedOperationTransformationConfig.PathAddressConfig- Parameters:
operation- the 'write-attribute' operation to correct- Returns:
- the corrected operation
-
expectDiscarded
public boolean expectDiscarded(org.jboss.dmr.ModelNode operation) Description copied from interface:FailedOperationTransformationConfig.PathAddressConfigWhether the operation is expected to be discarded- Specified by:
expectDiscardedin interfaceFailedOperationTransformationConfig.PathAddressConfig- Parameters:
operation- the operation to check- Returns:
trueif expected to fail
-
checkValue
protected boolean checkValue(org.jboss.dmr.ModelNode operation, String attrName, org.jboss.dmr.ModelNode attribute, boolean isGeneratedWriteAttribute) -
checkValue
protected abstract boolean checkValue(String attrName, org.jboss.dmr.ModelNode attribute, boolean isGeneratedWriteAttribute) -
correctValue
protected abstract org.jboss.dmr.ModelNode correctValue(org.jboss.dmr.ModelNode toResolve, boolean isGeneratedWriteAttribute)
-