Enum RequiredChildResourceDiscardPolicy
java.lang.Object
java.lang.Enum<RequiredChildResourceDiscardPolicy>
org.jboss.as.clustering.controller.transform.RequiredChildResourceDiscardPolicy
- All Implemented Interfaces:
Serializable,Comparable<RequiredChildResourceDiscardPolicy>,org.jboss.as.controller.transform.description.DynamicDiscardPolicy
public enum RequiredChildResourceDiscardPolicy
extends Enum<RequiredChildResourceDiscardPolicy>
implements org.jboss.as.controller.transform.description.DynamicDiscardPolicy
Implementation of a generic
DynamicDiscardPolicy that discards child resources which have all their attribute undefined and have no children.
Conditionally rejects or leaves resource for further transformation. It is to be used for required child resources that are auto-created.- Author:
- Radoslav Husar
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPolicy that discards if all attributes are undefined and resource has no children; never discards otherwise (DiscardPolicy.NEVER) in order to proceed with resource transformations.Policy that discards if all attributes are undefined and resource has no children; rejects otherwise. -
Method Summary
Modifier and TypeMethodDescriptionorg.jboss.as.controller.transform.description.DiscardPolicycheckResource(org.jboss.as.controller.transform.TransformationContext context, org.jboss.as.controller.PathAddress address) Returns the enum constant of this type with the specified name.static RequiredChildResourceDiscardPolicy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
REJECT_AND_WARN
Policy that discards if all attributes are undefined and resource has no children; rejects otherwise. -
NEVER
Policy that discards if all attributes are undefined and resource has no children; never discards otherwise (DiscardPolicy.NEVER) in order to proceed with resource transformations.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
checkResource
public org.jboss.as.controller.transform.description.DiscardPolicy checkResource(org.jboss.as.controller.transform.TransformationContext context, org.jboss.as.controller.PathAddress address) - Specified by:
checkResourcein interfaceorg.jboss.as.controller.transform.description.DynamicDiscardPolicy- Returns:
- contextual discard policy if any resource attributes are undefined and has no children;
DiscardPolicy.SILENTotherwise.
-