Class DiscardUndefinedAttributesTransformer
- java.lang.Object
-
- org.jboss.as.controller.transform.DiscardUndefinedAttributesTransformer
-
- All Implemented Interfaces:
OperationTransformer
,ResourceTransformer
public class DiscardUndefinedAttributesTransformer extends Object implements ResourceTransformer, OperationTransformer
Transformer that hides new attributes from legacy slaves if the attribute value is undefined. A defined value leads to a log warning or anOperationFailedException
unless the resource is ignored by the target.- Author:
- Brian Stansberry (c) 2012 Red Hat Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.as.controller.transform.OperationTransformer
OperationTransformer.TransformedOperation
-
-
Field Summary
-
Fields inherited from interface org.jboss.as.controller.transform.OperationTransformer
DEFAULT, DEFAULT_REJECTION_POLICY, DISCARD, SUCCESSFUL_RESULT
-
Fields inherited from interface org.jboss.as.controller.transform.ResourceTransformer
DEFAULT, DISCARD
-
-
Constructor Summary
Constructors Constructor Description DiscardUndefinedAttributesTransformer(String... attributeNames)
DiscardUndefinedAttributesTransformer(Set<String> attributeNames)
DiscardUndefinedAttributesTransformer(AttributeDefinition... attributes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OperationTransformer
getUndefineAttributeTransformer()
OperationTransformer
getWriteAttributeTransformer()
OperationTransformer.TransformedOperation
transformOperation(TransformationContext context, PathAddress address, org.jboss.dmr.ModelNode operation)
Transform the operation.void
transformResource(ResourceTransformationContext context, PathAddress address, Resource resource)
Transform a resource.
-
-
-
Constructor Detail
-
DiscardUndefinedAttributesTransformer
public DiscardUndefinedAttributesTransformer(AttributeDefinition... attributes)
-
DiscardUndefinedAttributesTransformer
public DiscardUndefinedAttributesTransformer(String... attributeNames)
-
-
Method Detail
-
getWriteAttributeTransformer
public OperationTransformer getWriteAttributeTransformer()
-
getUndefineAttributeTransformer
public OperationTransformer getUndefineAttributeTransformer()
-
transformResource
public void transformResource(ResourceTransformationContext context, PathAddress address, Resource resource) throws OperationFailedException
Description copied from interface:ResourceTransformer
Transform a resource.- Specified by:
transformResource
in interfaceResourceTransformer
- Parameters:
context
- the resource transformation contextaddress
- the path addressresource
- the resource to transform- Throws:
OperationFailedException
-
transformOperation
public OperationTransformer.TransformedOperation transformOperation(TransformationContext context, PathAddress address, org.jboss.dmr.ModelNode operation) throws OperationFailedException
Description copied from interface:OperationTransformer
Transform the operation.- Specified by:
transformOperation
in interfaceOperationTransformer
- Parameters:
context
- the operation contextaddress
- the path addressoperation
- the operation- Returns:
- the transformed operation
- Throws:
OperationFailedException
-
-