Interface DiscardAttributeChecker

All Known Implementing Classes:
DefaultCheckersAndConverter, DiscardAttributeChecker.DefaultDiscardAttributeChecker, DiscardAttributeChecker.DiscardAttributeValueChecker

public interface DiscardAttributeChecker
Checks whether an attribute should be discarded or not
Author:
Kabir Khan
  • Field Details

    • ALWAYS

      static final DiscardAttributeChecker ALWAYS
      A standard checker which will discard the attribute always.
    • UNDEFINED

      static final DiscardAttributeChecker UNDEFINED
      A standard checker which will discard the attribute if it is undefined, as long as it is not an expression
    • DEFAULT_VALUE

      static final DiscardAttributeChecker DEFAULT_VALUE
      A standard checker which will discard the attribute if set to its default value.
  • Method Details

    • isDiscardExpressions

      boolean isDiscardExpressions()
      Returns true if the attribute should be discarded if expressions are used
      Returns:
      whether to discard if expressions are used
    • isDiscardUndefined

      boolean isDiscardUndefined()
      Returns true if the attribute should be discarded if it is undefined
      Returns:
      whether to discard if the attribute is undefined
    • isOperationParameterDiscardable

      boolean isOperationParameterDiscardable(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, org.jboss.dmr.ModelNode operation, TransformationContext context)
      Gets whether the given operation parameter can be discarded
      Parameters:
      address - the address of the operation
      attributeName - the name of the operation parameter
      attributeValue - the value of the operation parameter
      operation - the operation executed. This is unmodifiable.
      context - the context of the transformation
      Returns:
      true if the operation parameter value should be discarded, false otherwise.
    • isResourceAttributeDiscardable

      boolean isResourceAttributeDiscardable(PathAddress address, String attributeName, org.jboss.dmr.ModelNode attributeValue, TransformationContext context)
      Gets whether the given attribute can be discarded
      Parameters:
      address - the address of the resource
      attributeName - the name of the attribute
      attributeValue - the value of the attribute
      context - the context of the transformation
      Returns:
      true if the attribute value should be discarded, false otherwise.