@Component(value="batchValidator")
public class BatchValidator
extends java.lang.Object
implements java.lang.Runnable, org.springframework.context.ApplicationContextAware
Constructor and Description |
---|
BatchValidator() |
Modifier and Type | Method and Description |
---|---|
ICdmRepository |
getAppController()
Get the application context that will provide the services that will, on
their turn, provide the entities to be validated.
|
java.lang.Class<?>[] |
getValidationGroups()
Get the validation groups to be applied by the
Validator . |
javax.validation.Validator |
getValidator()
Get the
Validator instance that will carry out the validations. |
void |
run() |
void |
setAppController(ICdmRepository context)
Set the application context.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext appContext) |
void |
setValidationGroups(java.lang.Class<?>... validationGroups)
Set the validation groups to be applied by the
Validator . |
void |
setValidator(javax.validation.Validator validator)
Set the
Validator instance that will carry out the validations. |
public void setApplicationContext(org.springframework.context.ApplicationContext appContext)
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
public void run()
run
in interface java.lang.Runnable
public ICdmRepository getAppController()
public void setAppController(ICdmRepository context)
context
- The application contextpublic javax.validation.Validator getValidator()
Validator
instance that will carry out the validations.Validator
public void setValidator(javax.validation.Validator validator)
Validator
instance that will carry out the validations.validator
- The Validator
public java.lang.Class<?>[] getValidationGroups()
Validator
.public void setValidationGroups(java.lang.Class<?>... validationGroups)
Validator
. By
default all Level2 and Level3 will be checked. So if that is what you
want, you do not need to call this method before calling run()
.validationGroups
- The validation groupsCopyright © 2007-2020 EDIT. All Rights Reserved.