Package com.axelor.workflow.compiler
Record Class Violation
java.lang.Object
java.lang.Record
com.axelor.workflow.compiler.Violation
One validation finding: a stable
code (<element>-<attr>-<problem>), the
translated message, and the nodeId it is about, or null for a workflow-level
rule.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the value of thecoderecord component.static StringThe same for a definition, named by its name, or its id when it has none.This finding as a person reads it: the workflow it is about, then what is wrong.static StringJoins violations into the single message thrown at a save boundary, one per line.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.nodeId()Returns the value of thenodeIdrecord component.static ViolationA finding whosemessagethe caller has already passed throughI18n.get, so the extractor sees the literal;argsfill its placeholders.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Violation
Creates an instance of aViolationrecord class.- Parameters:
code- the value for thecoderecord componentmessage- the value for themessagerecord componentnodeId- the value for thenodeIdrecord component
-
-
Method Details
-
of
A finding whosemessagethe caller has already passed throughI18n.get, so the extractor sees the literal;argsfill its placeholders. -
describe
This finding as a person reads it: the workflow it is about, then what is wrong. -
describe
The same for a definition, named by its name, or its id when it has none. -
describe
Joins violations into the single message thrown at a save boundary, one per line. -
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). -
code
Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
nodeId
Returns the value of thenodeIdrecord component.- Returns:
- the value of the
nodeIdrecord component
-