public abstract class DefaultCheckersAndConverter extends DiscardAttributeChecker.DefaultDiscardAttributeChecker implements RejectAttributeChecker, AttributeConverter
DiscardAttributeChecker.DefaultDiscardAttributeChecker
, RejectAttributeChecker.DefaultRejectAttributeChecker
and AttributeConverter.DefaultAttributeConverter
. Only the parts that are registered in BaseAttributeTransformationDescriptionBuilder
will be used.RejectAttributeChecker.DefaultRejectAttributeChecker, RejectAttributeChecker.ListRejectAttributeChecker, RejectAttributeChecker.ObjectFieldsRejectAttributeChecker, RejectAttributeChecker.SimpleAcceptAttributeChecker, RejectAttributeChecker.SimpleRejectAttributeChecker
AttributeConverter.DefaultAttributeConverter, AttributeConverter.DefaultValueAttributeConverter, AttributeConverter.Factory
DiscardAttributeChecker.DefaultDiscardAttributeChecker, DiscardAttributeChecker.DiscardAttributeValueChecker
discardExpressions, discardUndefined
ALL, DEFINED, SIMPLE_EXPRESSIONS, UNDEFINED
NAME_FROM_ADDRESS
ALWAYS, UNDEFINED
Modifier | Constructor and Description |
---|---|
|
DefaultCheckersAndConverter()
Constructor.
|
protected |
DefaultCheckersAndConverter(boolean discardExpressions,
boolean discardUndefined)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkForExpression(org.jboss.dmr.ModelNode node) |
protected abstract void |
convertAttribute(PathAddress address,
String attributeName,
org.jboss.dmr.ModelNode attributeValue,
TransformationContext context)
Gets called by the default implementations of
convertOperationParameter(PathAddress, String, ModelNode, ModelNode, TransformationContext) and
convertResourceAttribute(PathAddress, String, ModelNode, TransformationContext) . |
void |
convertOperationParameter(PathAddress address,
String attributeName,
org.jboss.dmr.ModelNode attributeValue,
org.jboss.dmr.ModelNode operation,
TransformationContext context)
Converts an operation parameter
|
void |
convertResourceAttribute(PathAddress address,
String attributeName,
org.jboss.dmr.ModelNode attributeValue,
TransformationContext context)
Converts a resource attribute
|
String |
getRejectionLogMessageId()
Returns the log message id used by this checker.
|
protected abstract boolean |
rejectAttribute(PathAddress address,
String attributeName,
org.jboss.dmr.ModelNode attributeValue,
TransformationContext context)
Gets called by the default implementations of
#rejectOperationParameter(String, ModelNode, ModelNode, TransformationContext) and
#rejectResourceAttribute(String, ModelNode, TransformationContext) . |
boolean |
rejectOperationParameter(PathAddress address,
String attributeName,
org.jboss.dmr.ModelNode attributeValue,
org.jboss.dmr.ModelNode operation,
TransformationContext context)
Determines whether the given operation parameter value is not understandable by the target process and needs
to be rejected.
|
boolean |
rejectResourceAttribute(PathAddress address,
String attributeName,
org.jboss.dmr.ModelNode attributeValue,
TransformationContext context)
Gets whether the given resource attribute value is not understandable by the target process and needs
to be rejected.
|
isDiscardExpressions, isDiscardUndefined, isOperationParameterDiscardable, isResourceAttributeDiscardable, isValueDiscardable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRejectionLogMessage
protected DefaultCheckersAndConverter(boolean discardExpressions, boolean discardUndefined)
discardExpressions
- true
if the attribute should be discarded if expressions are useddiscardUndefined
- true
if the attribute should be discarded if expressions are usedpublic DefaultCheckersAndConverter()
discardExpressions==false
and discardUndefined==true
public void convertOperationParameter(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, org.jboss.dmr.ModelNode operation, TransformationContext context)
convertOperationParameter
in interface AttributeConverter
address
- the address of the operationattributeName
- the name of the operation parameterattributeValue
- the value of the operation parameter to be convertedoperation
- the operation executed. This is unmodifiable.context
- the context of the transformationpublic void convertResourceAttribute(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, TransformationContext context)
convertResourceAttribute
in interface AttributeConverter
address
- the address of the operationattributeName
- the name of the attributeattributeValue
- the value of the attribute to be convertedcontext
- the context of the transformationpublic boolean rejectOperationParameter(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, org.jboss.dmr.ModelNode operation, TransformationContext context)
rejectOperationParameter
in interface RejectAttributeChecker
address
- the address of the operationattributeName
- the name of the attributeattributeValue
- the value of the attributeoperation
- the operation executed. This is unmodifiable.context
- the context of the transformationtrue
if the parameter value is not understandable by the target process and so needs to be rejected, false
otherwise.public boolean rejectResourceAttribute(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, TransformationContext context)
rejectResourceAttribute
in interface RejectAttributeChecker
address
- the address of the resourceattributeName
- the name of the attributeattributeValue
- the value of the attributecontext
- the context of the transformationtrue
if the attribute value is not understandable by the target process and so needs to be rejected, false
otherwise.public String getRejectionLogMessageId()
getRejectionLogMessageId
in interface RejectAttributeChecker
protected boolean checkForExpression(org.jboss.dmr.ModelNode node)
protected abstract boolean rejectAttribute(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, TransformationContext context)
#rejectOperationParameter(String, ModelNode, ModelNode, TransformationContext)
and
#rejectResourceAttribute(String, ModelNode, TransformationContext)
.address
- the address of the operationattributeName
- the name of the attributeattributeValue
- the value of the attributecontext
- the context of the transformationtrue
if the attribute or parameter value is not understandable by the target process and so needs to be rejected, false
otherwise.protected abstract void convertAttribute(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, TransformationContext context)
convertOperationParameter(PathAddress, String, ModelNode, ModelNode, TransformationContext)
and
convertResourceAttribute(PathAddress, String, ModelNode, TransformationContext)
.address
- the address of the operation or resourceattributeName
- the name of the attributeattributeValue
- the value of the attributecontext
- the context of the transformationCopyright © 2023 JBoss by Red Hat. All rights reserved.