public class BeanValidationEventListener extends java.lang.Object implements PreInsertEventListener, PreUpdateEventListener, PreDeleteEventListener
Constructor and Description |
---|
BeanValidationEventListener(javax.validation.ValidatorFactory factory,
java.util.Map settings,
ClassLoaderService classLoaderService)
Constructor used in an environment where validator factory is injected (JPA2).
|
Modifier and Type | Method and Description |
---|---|
void |
initialize(java.util.Map settings,
ClassLoaderService classLoaderService) |
boolean |
onPreDelete(PreDeleteEvent event)
Return true if the operation should be vetoed
|
boolean |
onPreInsert(PreInsertEvent event)
Return true if the operation should be vetoed
|
boolean |
onPreUpdate(PreUpdateEvent event)
Return true if the operation should be vetoed
|
public BeanValidationEventListener(javax.validation.ValidatorFactory factory, java.util.Map settings, ClassLoaderService classLoaderService)
factory
- The ValidatorFactory
to use to create Validator
instance(s)settings
- Configued propertiespublic void initialize(java.util.Map settings, ClassLoaderService classLoaderService)
public boolean onPreInsert(PreInsertEvent event)
PreInsertEventListener
onPreInsert
in interface PreInsertEventListener
public boolean onPreUpdate(PreUpdateEvent event)
PreUpdateEventListener
onPreUpdate
in interface PreUpdateEventListener
public boolean onPreDelete(PreDeleteEvent event)
PreDeleteEventListener
onPreDelete
in interface PreDeleteEventListener
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.