public interface PersistenceManagerEventHandler
extends org.springframework.core.Ordered
PersistenceManager
.
These events occur as part of the standard admin persistence lifecycle for entities.
PersistenceManagerEventHandler instances are generally registered via the following approach in application
context xml
<bean class="org.broadleafcommerce.common.extensibility.context.merge.LateStageMergeBeanPostProcessor">
<property name="collectionRef" value="blSandBoxPersistenceManagerEventHandlers"/>
<property name="targetRef" value="blPersistenceManagerEventHandlers"/>
</bean>
<bean id="blSandBoxPersistenceManagerEventHandlers" class="org.springframework.beans.factory.config.ListFactoryBean">
<property name="sourceList">
<list>
<ref bean="blSandBoxPersistenceManagerEventHandler"/>
</list>
</property>
</bean>
Modifier and Type | Method and Description |
---|---|
PersistenceManagerEventHandlerResponse |
postAdd(PersistenceManager persistenceManager,
Entity entity,
PersistencePackage persistencePackage)
Called after an add
|
PersistenceManagerEventHandlerResponse |
postFetch(PersistenceManager persistenceManager,
DynamicResultSet resultSet,
PersistencePackage persistencePackage,
CriteriaTransferObject cto)
Called after the fetch, which is a request for one or more persisted entities
|
PersistenceManagerEventHandlerResponse |
postInspect(PersistenceManager persistenceManager,
DynamicResultSet resultSet,
PersistencePackage persistencePackage)
Called after the inspection for the entity described by persistencePackage
|
PersistenceManagerEventHandlerResponse |
postRemove(PersistenceManager persistenceManager,
PersistencePackage persistencePackage)
Called after a remove
|
PersistenceManagerEventHandlerResponse |
postUpdate(PersistenceManager persistenceManager,
Entity entity,
PersistencePackage persistencePackage)
Called after an update
|
PersistenceManagerEventHandlerResponse |
preAdd(PersistenceManager persistenceManager,
PersistencePackage persistencePackage)
Called prior to an add
|
PersistenceManagerEventHandlerResponse |
preFetch(PersistenceManager persistenceManager,
PersistencePackage persistencePackage,
CriteriaTransferObject cto)
Called prior to a fetch, which is a request for one or more persisted entities
|
PersistenceManagerEventHandlerResponse |
preInspect(PersistenceManager persistenceManager,
PersistencePackage persistencePackage)
Called prior to inspection for the entity described by persistencePackage
|
PersistenceManagerEventHandlerResponse |
preRemove(PersistenceManager persistenceManager,
PersistencePackage persistencePackage)
Called prior to a remove
|
PersistenceManagerEventHandlerResponse |
preUpdate(PersistenceManager persistenceManager,
PersistencePackage persistencePackage)
Called prior to an update
|
PersistenceManagerEventHandlerResponse |
processValidationError(PersistenceManager persistenceManager,
Entity entity,
PersistencePackage persistencePackage)
Called after a validation error.
|
PersistenceManagerEventHandlerResponse preInspect(PersistenceManager persistenceManager, PersistencePackage persistencePackage) throws ServiceException
persistenceManager
- the PersistenceManager instance making the callpersistencePackage
- the descriptive information for the callServiceException
PersistenceManagerEventHandlerResponse postInspect(PersistenceManager persistenceManager, DynamicResultSet resultSet, PersistencePackage persistencePackage) throws ServiceException
persistenceManager
- the PersistenceManager instance making the callresultSet
- the inspection result datapersistencePackage
- the descriptive information for the callServiceException
PersistenceManagerEventHandlerResponse preFetch(PersistenceManager persistenceManager, PersistencePackage persistencePackage, CriteriaTransferObject cto) throws ServiceException
persistenceManager
- the PersistenceManager instance making the callpersistencePackage
- the descriptive information for the callcto
- the criteria describing the parameters of the fetch - converted into the where clause for the select queryServiceException
PersistenceManagerEventHandlerResponse postFetch(PersistenceManager persistenceManager, DynamicResultSet resultSet, PersistencePackage persistencePackage, CriteriaTransferObject cto) throws ServiceException
persistenceManager
- the PersistenceManager instance making the callresultSet
- the fetch result datapersistencePackage
- the descriptive information for the callcto
- the criteria describing the parameters of the fetch - converted into the where clause for the select queryServiceException
PersistenceManagerEventHandlerResponse preAdd(PersistenceManager persistenceManager, PersistencePackage persistencePackage) throws ServiceException
persistenceManager
- the PersistenceManager instance making the callpersistencePackage
- the descriptive information for the callServiceException
PersistenceManagerEventHandlerResponse postAdd(PersistenceManager persistenceManager, Entity entity, PersistencePackage persistencePackage) throws ServiceException
persistenceManager
- the PersistenceManager instance making the callentity
- the result of the addpersistencePackage
- the descriptive information for the callServiceException
PersistenceManagerEventHandlerResponse preUpdate(PersistenceManager persistenceManager, PersistencePackage persistencePackage) throws ServiceException
persistenceManager
- the PersistenceManager instance making the callpersistencePackage
- the descriptive information for the callServiceException
PersistenceManagerEventHandlerResponse postUpdate(PersistenceManager persistenceManager, Entity entity, PersistencePackage persistencePackage) throws ServiceException
persistenceManager
- the PersistenceManager instance making the callentity
- the result of the updatepersistencePackage
- the descriptive information for the callServiceException
PersistenceManagerEventHandlerResponse preRemove(PersistenceManager persistenceManager, PersistencePackage persistencePackage) throws ServiceException
persistenceManager
- the PersistenceManager instance making the callpersistencePackage
- the descriptive information for the callServiceException
PersistenceManagerEventHandlerResponse postRemove(PersistenceManager persistenceManager, PersistencePackage persistencePackage) throws ServiceException
persistenceManager
- the PersistenceManager instance making the callpersistencePackage
- the descriptive information for the callServiceException
PersistenceManagerEventHandlerResponse processValidationError(PersistenceManager persistenceManager, Entity entity, PersistencePackage persistencePackage) throws ServiceException
Entity.getPropertyValidationErrors()
persistenceManager
- the PersistenceManager instance making the callentity
- the results of the persistence requestpersistencePackage
- the descriptive information for the callServiceException
Copyright © 2022. All rights reserved.