public class ValidatingRepositoryEventListener extends AbstractRepositoryEventListener<ValidatingRepositoryEventListener> implements org.springframework.beans.factory.InitializingBean
applicationContext
repositoryExporters
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
Validator s that are assigned to the various RepositoryEvent s. |
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
Validator s that are assigned to the various RepositoryEvent s. |
onAfterLinkDelete, onApplicationEvent, onBeforeLinkDelete, setApplicationContext, setRepositoryExporters
getRepositoryExporters, hasRepositoryMetadataFor, hasRepositoryMetadataFor, repositoryExporters, repositoryExporters, repositoryExporters, repositoryMetadataFor, repositoryMetadataFor, repositoryMetadataFor
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
public java.util.Map<java.lang.String,java.util.Collection<org.springframework.validation.Validator>> getValidators()
Validator
s that are assigned to the various RepositoryEvent
s.public ValidatingRepositoryEventListener setValidators(java.util.Map<java.lang.String,java.util.Collection<org.springframework.validation.Validator>> validators)
Validator
s that are assigned to the various RepositoryEvent
s.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)
AbstractRepositoryEventListener
onBeforeSave
in class AbstractRepositoryEventListener<ValidatingRepositoryEventListener>
protected void onAfterSave(java.lang.Object entity)
AbstractRepositoryEventListener
onAfterSave
in class AbstractRepositoryEventListener<ValidatingRepositoryEventListener>
protected void onBeforeLinkSave(java.lang.Object parent, java.lang.Object linked)
AbstractRepositoryEventListener
onBeforeLinkSave
in class AbstractRepositoryEventListener<ValidatingRepositoryEventListener>
protected void onAfterLinkSave(java.lang.Object parent, java.lang.Object linked)
AbstractRepositoryEventListener
onAfterLinkSave
in class AbstractRepositoryEventListener<ValidatingRepositoryEventListener>
protected void onBeforeDelete(java.lang.Object entity)
AbstractRepositoryEventListener
onBeforeDelete
in class AbstractRepositoryEventListener<ValidatingRepositoryEventListener>
protected void onAfterDelete(java.lang.Object entity)
AbstractRepositoryEventListener
onAfterDelete
in class AbstractRepositoryEventListener<ValidatingRepositoryEventListener>