public class ValidationContext extends Object implements IValidationContext
IValidationContext
.Constructor and Description |
---|
ValidationContext()
Creates a new validation context with the default locale (
Locale
.getDefault()). |
ValidationContext(Locale locale)
Creates a new validation context with the specified local.
|
ValidationContext(Locale locale,
ClassLoader resourceClassLoader)
Creates a new validation context with the specified local.
|
Modifier and Type | Method and Description |
---|---|
Locale |
getLocale()
Returns the Locale that is to use for the creation of validation messages.
|
ClassLoader |
getResourceClassLoader() |
Object |
getValue(String propertyName)
Returns the value for property with the specified name.
|
void |
setValue(String propertyName,
Object value)
Sets the value of the specified property.
|
public ValidationContext(Locale locale, ClassLoader resourceClassLoader)
locale
- Setting the locale of this contextresourceClassLoader
- setting the ClassLoader
used to load resourcesNullPointerException
- if one of the specified parameters is nullpublic ValidationContext(Locale locale)
NullPointerException
- if the specified parameter is nullpublic ValidationContext()
Locale
.getDefault()).public Locale getLocale()
IValidationContext
getLocale
in interface IValidationContext
public Object getValue(String propertyName)
IValidationContext
getValue
in interface IValidationContext
public void setValue(String propertyName, Object value)
propertyName
- the name of the propertyvalue
- the value of the propertypublic ClassLoader getResourceClassLoader()
Copyright © 2018. All rights reserved.