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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a single restricted component within a rule. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringError code for rule component restriction violations. -
Constructor Summary
ConstructorsConstructorDescriptionComponentRestrictionViolation(List<ComponentRestrictionViolation.RestrictedComponent> restrictedComponents) Creates a new component restriction violation. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the error code for this violation.final inthashCode()Returns a hash code value for this object.Returns the value of therestrictedComponentsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
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
Returns the error code for this violation.- Returns:
- the error code
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
restrictedComponents
Returns the value of therestrictedComponentsrecord component.- Returns:
- the value of the
restrictedComponentsrecord component
-