Class CxScriptMapperInterceptor
- java.lang.Object
-
- de.hybris.platform.personalizationyprofile.interceptor.CxScriptMapperInterceptor
-
- All Implemented Interfaces:
Interceptor,RemoveInterceptor<CxMapperScriptModel>,ValidateInterceptor<CxMapperScriptModel>
public class CxScriptMapperInterceptor extends java.lang.Object implements RemoveInterceptor<CxMapperScriptModel>, ValidateInterceptor<CxMapperScriptModel>
Interceptor called when CxScriptMapper model is created, edited or removed.
CxScriptMapper has 'requiredField' attribute which is used by ConsumptionLayerUserSegmentsProvider to build fields parameter for profile service.
This interceptor reset fields for ConsumptionLayerUserSegmentsProvider to make it build fields again.
-
-
Constructor Summary
Constructors Constructor Description CxScriptMapperInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConsumptionLayerUserSegmentsProvidergetConsumptionLayerUserSegmentsProvider()voidonRemove(CxMapperScriptModel model, InterceptorContext ctx)Called in themodelService.removeAll()method.voidonValidate(CxMapperScriptModel model, InterceptorContext ctx)Called in themodelService.saveAll()method.voidsetConsumptionLayerUserSegmentsProvider(ConsumptionLayerUserSegmentsProvider consumptionLayerUserSegmentsProvider)voidsetEventService(EventService eventService)
-
-
-
Method Detail
-
onRemove
public void onRemove(CxMapperScriptModel model, InterceptorContext ctx) throws InterceptorException
Description copied from interface:RemoveInterceptorCalled in themodelService.removeAll()method.- Specified by:
onRemovein interfaceRemoveInterceptor<CxMapperScriptModel>- Parameters:
model- the model which should be removedctx- theInterceptorContext- Throws:
InterceptorException- if the remove reports an error
-
onValidate
public void onValidate(CxMapperScriptModel model, InterceptorContext ctx) throws InterceptorException
Description copied from interface:ValidateInterceptorCalled in themodelService.saveAll()method. Validates the values of the given model.- Specified by:
onValidatein interfaceValidateInterceptor<CxMapperScriptModel>- Parameters:
model- the model which values has to be validatedctx- theInterceptorContext- Throws:
InterceptorException- if any values of the model are not valid.
-
getConsumptionLayerUserSegmentsProvider
protected ConsumptionLayerUserSegmentsProvider getConsumptionLayerUserSegmentsProvider()
-
setConsumptionLayerUserSegmentsProvider
public void setConsumptionLayerUserSegmentsProvider(ConsumptionLayerUserSegmentsProvider consumptionLayerUserSegmentsProvider)
-
setEventService
public void setEventService(EventService eventService)
-
-