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 genericDynamicDiscardPolicythat 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 Constants Enum Constant Description NEVERPolicy that discards if all attributes are undefined and resource has no children; never discards otherwise (DiscardPolicy.NEVER) in order to proceed with resource transformations.REJECT_AND_WARNPolicy that discards if all attributes are undefined and resource has no children; rejects otherwise.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.jboss.as.controller.transform.description.DiscardPolicycheckResource(org.jboss.as.controller.transform.TransformationContext context, org.jboss.as.controller.PathAddress address)static RequiredChildResourceDiscardPolicyvalueOf(String name)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 Detail
-
REJECT_AND_WARN
public static final RequiredChildResourceDiscardPolicy REJECT_AND_WARN
Policy that discards if all attributes are undefined and resource has no children; rejects otherwise.
-
NEVER
public static final RequiredChildResourceDiscardPolicy 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 Detail
-
values
public static RequiredChildResourceDiscardPolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RequiredChildResourceDiscardPolicy c : RequiredChildResourceDiscardPolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RequiredChildResourceDiscardPolicy valueOf(String name)
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.
-
-