object TwitterConstraintValidatorContext
- Alphabetic
- By Inheritance
- TwitterConstraintValidatorContext
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
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
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. E.g., within a ConstraintValidator instance:
def isValid(value: String, constraintValidatorContext: TwitterConstraintValidatorContext): Boolean = { TwitterConstraintValidatorContext .addExpressionVariable("foo", "bar") .withMessageTemplate("${foo}") .addConstraintViolation(context) TwitterConstraintValidatorContext .addExpressionVariable("foo", "snafu") .withMessageTemplate("${foo}") .addConstraintViolation(context) false
- 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. E.g., within a ConstraintValidator instance:
def isValid(value: String, constraintValidatorContext: TwitterConstraintValidatorContext): Boolean = { TwitterConstraintValidatorContext .addMessageParameter("foo", "bar") .withMessageTemplate("{foo}") .addConstraintViolation(context) TwitterConstraintValidatorContext .addMessageParameter("foo", "snafu") .withMessageTemplate("{foo}") .addConstraintViolation(context) false
- 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 builder: Builder
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- 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( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @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.