Record Class ComponentRestrictionViolation

java.lang.Object
java.lang.Record
com.codebarrel.automation.api.validation.ComponentRestrictionViolation
Record Components:
restrictedComponents - list of restricted components in the rule (must not be empty)

public record ComponentRestrictionViolation(List<ComponentRestrictionViolation.RestrictedComponent> restrictedComponents) extends Record
Represents a component restriction violation for a rule operation.

This record provides structured information about components in a rule that are restricted for the current user.

  • Field Details

    • ERROR_CODE

      public static final String ERROR_CODE
      Error code for rule component restriction violations.
      See Also:
  • Constructor Details

    • ComponentRestrictionViolation

      public ComponentRestrictionViolation(List<ComponentRestrictionViolation.RestrictedComponent> restrictedComponents)
      Creates a new component restriction violation.
      Parameters:
      restrictedComponents - list of restricted components in the rule (must not be empty)
  • Method Details

    • errorCode

      public String errorCode()
      Returns the error code for this violation.
      Returns:
      the error code
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • restrictedComponents

      Returns the value of the restrictedComponents record component.
      Returns:
      the value of the restrictedComponents record component