Interceptors and Custom Events
Interceptors and Custom Events
https://help.sap.com/viewer/3fb5dcdfe37f40edbac7098ed40442c0/1808/en-US/bec6c3a13b1b4ec59cbd4150ebd4df17.html
Interceptors intercept model object lifecycle transitions and, depending on the conditions of that transition, may publish an event when they do so.
Model classes represent SAP Commerce items. Each model contains all item attributes from all extensions, which unifies access to the data for an item.
An interceptor addresses a particular step in the life cycle of a model. When the life cycle reaches a certain step, you can activate a corresponding interceptor. An interceptor can modify the model, raise an exception to interrupt the current step, or publish an event if the model matches certain criteria. For example, you could check that an attribute contains certain values before saving the model.
Comments
Post a Comment