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 Details

    • 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 Details

    • values

      public static RequiredChildResourceDiscardPolicy[] 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

      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 name
      NullPointerException - 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:
      checkResource in interface org.jboss.as.controller.transform.description.DynamicDiscardPolicy
      Returns:
      contextual discard policy if any resource attributes are undefined and has no children; DiscardPolicy.SILENT otherwise.