Class JaloInitDefaultsInterceptor
java.lang.Object
de.hybris.platform.servicelayer.interceptor.impl.JaloInitDefaultsInterceptor
- All Implemented Interfaces:
InitDefaultsInterceptor,Interceptor,PrepareInterceptor
public class JaloInitDefaultsInterceptor
extends Object
implements InitDefaultsInterceptor, PrepareInterceptor
InitDefaultsInterceptor for any model. If the model is not persisted yet this interceptor sets the default values
from the jalo layer to the model.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonInitDefaults(Object model, InterceptorContext ctx) Called byModelService.initDefaults(Object)after instantiate a new model.voidonPrepare(Object model, InterceptorContext ctx) Called in themodelService.saveAll()method.voidsetCommonI18NService(CommonI18NService commonI18NService) voidsetSessionService(SessionService sessionService) voidsetTypeService(TypeService typeService)
-
Constructor Details
-
JaloInitDefaultsInterceptor
public JaloInitDefaultsInterceptor()
-
-
Method Details
-
setCommonI18NService
-
setTypeService
-
setSessionService
-
onPrepare
Description copied from interface:PrepareInterceptorCalled in themodelService.saveAll()method. Prepares the values of the given model.- Specified by:
onPreparein interfacePrepareInterceptor- Parameters:
model- the model which values has to be preparedctx- theInterceptorContext- Throws:
InterceptorException- if an error occured during the preparation
-
onInitDefaults
Description copied from interface:InitDefaultsInterceptorCalled byModelService.initDefaults(Object)after instantiate a new model.- Specified by:
onInitDefaultsin interfaceInitDefaultsInterceptor- Parameters:
model- the model which values should be set to the default valuesctx- theInterceptorContext- Throws:
InterceptorException- if the loading of the default value reports an error.
-