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 anOperationFailedExceptionunless 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 OperationTransformergetUndefineAttributeTransformer()OperationTransformergetWriteAttributeTransformer()OperationTransformer.TransformedOperationtransformOperation(TransformationContext context, PathAddress address, org.jboss.dmr.ModelNode operation)Transform the operation.voidtransformResource(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:ResourceTransformerTransform a resource.- Specified by:
transformResourcein 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:OperationTransformerTransform the operation.- Specified by:
transformOperationin interfaceOperationTransformer- Parameters:
context- the operation contextaddress- the path addressoperation- the operation- Returns:
- the transformed operation
- Throws:
OperationFailedException
-
-