class Builder extends AnyRef
Simple utility to build a non-default jakarta.validation.ConstraintViolation from a jakarta.validation.ConstraintValidatorContext.
- Alphabetic
- By Inheritance
- Builder
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addConstraintViolation(context: ConstraintValidatorContext): Unit
Replaces the default constraint violation report with one built via this method using the given TwitterConstraintValidatorContext.
Replaces the default constraint violation report with one built via this method using the given TwitterConstraintValidatorContext.
- context
the TwitterConstraintValidatorContext to use in building a jakarta.validation.ConstraintViolation
- Annotations
- @throws(scala.this.throws.<init>$default$1[jakarta.validation.ValidationException])
- Exceptions thrown
ValidationException
- if the given TwitterConstraintValidatorContext cannot be unwrapped as expected.
- def addExpressionVariable(name: String, value: AnyRef): Builder
Allows setting of an additional expression variable which will be available as an EL variable during interpolation.
Allows setting of an additional expression variable which will be available as an EL variable during interpolation. The variable will be available for interpolation for all constraint violations generated for this constraint. This includes the default one as well as all violations created by this TwitterConstraintValidatorContext. To create multiple constraint violations with different variable values, this method can be called between successive calls to TwitterConstraintValidatorContext#addConstraintViolation.
- name
the name under which to bind the expression variable, cannot be
null
.- value
the value to be bound to the specified name
- returns
a TwitterConstraintValidatorContext.Builder to allow for method chaining.
- def addMessageParameter(name: String, value: AnyRef): Builder
Allows setting of an additional named parameter which can be interpolated in the constraint violation message.
Allows setting of an additional named parameter which can be interpolated in the constraint violation message. The variable will be available for interpolation for all constraint violations generated for this constraint. This includes the default one as well as all violations created by this TwitterConstraintValidatorContext. To create multiple constraint violations with different variable values, this method can be called between successive calls to TwitterConstraintValidatorContext#addConstraintViolation.
- name
the name under which to bind the parameter, cannot be
null
.- value
the value to be bound to the specified name
- returns
a TwitterConstraintValidatorContext.Builder to allow for method chaining.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withDynamicPayload(payload: Payload): Builder
Allows to set an object that may further describe the violation.
Allows to set an object that may further describe the violation. The user is responsible to ensure that this payload is serializable in case the jakarta.validation.ConstraintViolation has to be serialized.
- payload
payload an object representing additional information about the violation
- returns
a TwitterConstraintValidatorContext.Builder to allow for method chaining.
- def withMessageTemplate(messageTemplate: String): Builder
Specify a new un-interpolated constraint message.
Specify a new un-interpolated constraint message.
- messageTemplate
an un-interpolated constraint message.
- returns
a TwitterConstraintValidatorContext.Builder to allow for method chaining.