Package org.jboss.as.model.test
Class FailedOperationTransformationConfig
- java.lang.Object
-
- org.jboss.as.model.test.FailedOperationTransformationConfig
-
public class FailedOperationTransformationConfig extends Object
Sets up how to handle failed transformation for use withModelTestUtils#checkFailedTransformedAddOperation(ModelTestKernelServices, org.jboss.as.controller.ModelVersion, ModelNode, FailedOperationTransformationConfig)- Author:
- Kabir Khan
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFailedOperationTransformationConfig.AttributesPathAddressConfig<T extends FailedOperationTransformationConfig.AttributesPathAddressConfig<T>>static interfaceFailedOperationTransformationConfig.BeforeExecuteCompositeCallbackA callback that can be used to e.g.static classFailedOperationTransformationConfig.ChainedConfigA standard configuration that allows several checkers to be used for an attribute.static classFailedOperationTransformationConfig.NewAttributesConfigA standard configuration for theDiscardUndefinedAttributesTransformerfor use with attributes that are new in a version.static interfaceFailedOperationTransformationConfig.PathAddressConfigConfiguration of how to deal with rejected operations transformations for a PathAddress.static classFailedOperationTransformationConfig.RejectExpressionsConfigA standard configuration for the reject expression values transformer
-
Field Summary
Fields Modifier and Type Field Description static FailedOperationTransformationConfig.PathAddressConfigDISCARDED_RESOURCEstatic FailedOperationTransformationConfigNO_FAILURESstatic FailedOperationTransformationConfig.PathAddressConfigREJECTED_RESOURCE
-
Constructor Summary
Constructors Constructor Description FailedOperationTransformationConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FailedOperationTransformationConfigaddFailedAttribute(org.jboss.as.controller.PathAddress pathAddress, FailedOperationTransformationConfig.PathAddressConfig config)Add a handler for failed operation transformers at a resource addressvoidoperationDone(org.jboss.dmr.ModelNode operation)FailedOperationTransformationConfigsetCallback(FailedOperationTransformationConfig.BeforeExecuteCompositeCallback callback)Sets a callback that gets executed before transforming and executing the resulting composite.FailedOperationTransformationConfigsetDontTransformComposite()THe default behaviour is to add the original operations to a composite, once they have been 'fixed'.
-
-
-
Field Detail
-
NO_FAILURES
public static final FailedOperationTransformationConfig NO_FAILURES
-
DISCARDED_RESOURCE
public static final FailedOperationTransformationConfig.PathAddressConfig DISCARDED_RESOURCE
-
REJECTED_RESOURCE
public static final FailedOperationTransformationConfig.PathAddressConfig REJECTED_RESOURCE
-
-
Method Detail
-
addFailedAttribute
public FailedOperationTransformationConfig addFailedAttribute(org.jboss.as.controller.PathAddress pathAddress, FailedOperationTransformationConfig.PathAddressConfig config)
Add a handler for failed operation transformers at a resource address- Parameters:
pathAddress- the path addressconfig- the config- Returns:
- this config
-
setDontTransformComposite
public FailedOperationTransformationConfig setDontTransformComposite()
THe default behaviour is to add the original operations to a composite, once they have been 'fixed'. That composite is then transformed before executing it in the legacy controller. However some transformers rely on inspecting the model, and use aconfigthat changes the model. For these cases, we can call this method, which instead adds the transformed and fully 'fixed' operations to the resulting composite.- Returns:
- this config
-
setCallback
public FailedOperationTransformationConfig setCallback(FailedOperationTransformationConfig.BeforeExecuteCompositeCallback callback)
Sets a callback that gets executed before transforming and executing the resulting composite.- Parameters:
callback- the callback- Returns:
- this config
-
operationDone
public void operationDone(org.jboss.dmr.ModelNode operation)
-
-