public class ValidatingRepositoryEventListener extends AbstractRepositoryEventListener<ValidatingRepositoryEventListener> implements org.springframework.beans.factory.InitializingBean
applicationContextrepositoryExporters| Constructor and Description |
|---|
ValidatingRepositoryEventListener() |
| Modifier and Type | Method and Description |
|---|---|
ValidatingRepositoryEventListener |
addValidator(java.lang.String event,
org.springframework.validation.Validator validator)
Add a
Validator that will be triggered on the given event. |
void |
afterPropertiesSet() |
java.util.Map<java.lang.String,java.util.Collection<org.springframework.validation.Validator>> |
getValidators()
Get a Map of
Validators that are assigned to the various RepositoryEvents. |
protected void |
onAfterDelete(java.lang.Object entity)
Override this method if you are interested in afterDelete events.
|
protected void |
onAfterLinkSave(java.lang.Object parent,
java.lang.Object linked)
Override this method if you are interested in afterLinkSave events.
|
protected void |
onAfterSave(java.lang.Object entity)
Override this method if you are interested in afterSave events.
|
protected void |
onBeforeDelete(java.lang.Object entity)
Override this method if you are interested in beforeDelete events.
|
protected void |
onBeforeLinkSave(java.lang.Object parent,
java.lang.Object linked)
Override this method if you are interested in beforeLinkSave events.
|
protected void |
onBeforeSave(java.lang.Object entity)
Override this method if you are interested in beforeSave events.
|
ValidatingRepositoryEventListener |
setValidators(java.util.Map<java.lang.String,java.util.Collection<org.springframework.validation.Validator>> validators)
Assign a Map of
Validators that are assigned to the various RepositoryEvents. |
onAfterLinkDelete, onApplicationEvent, onBeforeLinkDelete, setApplicationContext, setRepositoryExportersgetRepositoryExporters, hasRepositoryMetadataFor, hasRepositoryMetadataFor, repositoryExporters, repositoryExporters, repositoryExporters, repositoryMetadataFor, repositoryMetadataFor, repositoryMetadataForpublic void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic java.util.Map<java.lang.String,java.util.Collection<org.springframework.validation.Validator>> getValidators()
Validators that are assigned to the various RepositoryEvents.public ValidatingRepositoryEventListener setValidators(java.util.Map<java.lang.String,java.util.Collection<org.springframework.validation.Validator>> validators)
Validators that are assigned to the various RepositoryEvents.validators - A Map of Validators to wire.public ValidatingRepositoryEventListener addValidator(java.lang.String event, org.springframework.validation.Validator validator)
Validator that will be triggered on the given event.event - The event to listen for.validator - The Validator to execute when that event fires.protected void onBeforeSave(java.lang.Object entity)
AbstractRepositoryEventListeneronBeforeSave in class AbstractRepositoryEventListener<ValidatingRepositoryEventListener>protected void onAfterSave(java.lang.Object entity)
AbstractRepositoryEventListeneronAfterSave in class AbstractRepositoryEventListener<ValidatingRepositoryEventListener>protected void onBeforeLinkSave(java.lang.Object parent,
java.lang.Object linked)
AbstractRepositoryEventListeneronBeforeLinkSave in class AbstractRepositoryEventListener<ValidatingRepositoryEventListener>protected void onAfterLinkSave(java.lang.Object parent,
java.lang.Object linked)
AbstractRepositoryEventListeneronAfterLinkSave in class AbstractRepositoryEventListener<ValidatingRepositoryEventListener>protected void onBeforeDelete(java.lang.Object entity)
AbstractRepositoryEventListeneronBeforeDelete in class AbstractRepositoryEventListener<ValidatingRepositoryEventListener>protected void onAfterDelete(java.lang.Object entity)
AbstractRepositoryEventListeneronAfterDelete in class AbstractRepositoryEventListener<ValidatingRepositoryEventListener>