public class ValidationItem
extends java.lang.Object
ValidationItem
associates a ValidationCode
to
the the supplied parameters. A call to getMessage(Locale)
returns
the message associated with the ValidationCode
passing the
parameters to the ValidationCode#getMessage(Locale, Object[])
method.
ValidationItem
s are to ValidationCode
s what
ErrorCode
s are to AppianException
s (a transport mechanism
for AppianErrorCode
)Constructor and Description |
---|
ValidationItem(ValidationCode code) |
ValidationItem(ValidationCode validationCode,
java.lang.Object... validationCodeParams) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj_) |
java.lang.String |
getMessage(java.util.Locale locale)
Returns this validation items's message representation.
|
java.lang.String |
getMessageWithValidationCode(java.util.Locale locale)
Returns this validation items's default message representation with
validation code information.
|
ValidationCode |
getValidationCode()
Gets the validation code that must be used to render this validation items's message
representation.
|
java.lang.Object[] |
getValidationCodeParams()
Gets the arguments that must be used to render this validation items's message
representation.
|
int |
hashCode() |
java.lang.String |
toString()
Could be used for logging
|
public ValidationItem(ValidationCode code)
public ValidationItem(ValidationCode validationCode, java.lang.Object... validationCodeParams)
public ValidationCode getValidationCode()
public java.lang.Object[] getValidationCodeParams()
public java.lang.String getMessage(java.util.Locale locale)
getValidationCode()
.locale
- message's localetoString()
public java.lang.String getMessageWithValidationCode(java.util.Locale locale)
getMessage(Locale)
does not include any error code
information, as the representation could vary in different ways across the
application, this method provides a utility for a representation with
validation code. Be sure while using this method as the
requirements could vary, in which case use getMessage(Locale)
in conjunction with getValidationCode()
.locale
- message's localegetMessage(Locale)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj_)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.