@OpenApiAll
public class RuleViolationResult
extends java.lang.Object
Constructor and Description |
---|
RuleViolationResult(Annotation annotation,
Constraint rule)
Constructor.
|
RuleViolationResult(Annotation annotation,
Constraint rule,
boolean system)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
Annotation |
getAnnotation()
Returns
Annotation of violation. |
static java.util.List<Annotation> |
getAnnotations(java.util.List results)
Collects annotations from a list of RuleViolationResult list.
|
Project |
getConstrainedProject()
Returns project of the violated constraint
|
BaseElement |
getElement()
Returns target
Element |
java.lang.String |
getErrorMessage()
Violation message or empty String.
|
java.lang.Object |
getParentObject()
Returns parent object that should be used for grouping the results.
|
Constraint |
getParentRule()
Returns parent rule if such is specified.
|
Constraint |
getRule()
Returns violated rule.
|
java.lang.Object |
getTargetObject()
Returns target object of the rule violation result.
|
int |
hashCode() |
boolean |
isIgnored()
Checks if this violation result is ignored by user.
|
boolean |
isSystemValidationResult()
If true validation result came from system rule, else false.
|
public RuleViolationResult(Annotation annotation, @CheckForNull Constraint rule)
annotation
- of this violation.rule
- violated constraint.public RuleViolationResult(Annotation annotation, @CheckForNull Constraint rule, boolean system)
annotation
- of this violation.rule
- violated constraint.system
- is system violation result?public Annotation getAnnotation()
Annotation
of violation.@CheckForNull public BaseElement getElement()
Element
@CheckForNull public java.lang.Object getTargetObject()
public java.lang.String getErrorMessage()
@CheckForNull public Constraint getRule()
public boolean isIgnored()
@CheckForNull public Project getConstrainedProject()
@CheckForNull public Constraint getParentRule()
@CheckForNull public java.lang.Object getParentObject()
public static java.util.List<Annotation> getAnnotations(java.util.List results)
results
- list of RuleViolationResult objectspublic boolean isSystemValidationResult()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object