Class JaloInitDefaultsInterceptor
- java.lang.Object
-
- de.hybris.platform.servicelayer.interceptor.impl.JaloInitDefaultsInterceptor
-
- All Implemented Interfaces:
InitDefaultsInterceptor
,Interceptor
,PrepareInterceptor
public class JaloInitDefaultsInterceptor extends java.lang.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 Constructor Description JaloInitDefaultsInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onInitDefaults(java.lang.Object model, InterceptorContext ctx)
Called byModelService.initDefaults(Object)
after instantiate a new model.void
onPrepare(java.lang.Object model, InterceptorContext ctx)
Called in themodelService.saveAll()
method.void
setCommonI18NService(CommonI18NService commonI18NService)
void
setSessionService(SessionService sessionService)
void
setTypeService(TypeService typeService)
-
-
-
Method Detail
-
setCommonI18NService
public void setCommonI18NService(CommonI18NService commonI18NService)
-
setTypeService
public void setTypeService(TypeService typeService)
-
setSessionService
public void setSessionService(SessionService sessionService)
-
onPrepare
public void onPrepare(java.lang.Object model, InterceptorContext ctx) throws InterceptorException
Description copied from interface:PrepareInterceptor
Called in themodelService.saveAll()
method. Prepares the values of the given model.- Specified by:
onPrepare
in interfacePrepareInterceptor
- Parameters:
model
- the model which values has to be preparedctx
- theInterceptorContext
- Throws:
InterceptorException
- if an error occured during the preparation
-
onInitDefaults
public void onInitDefaults(java.lang.Object model, InterceptorContext ctx) throws InterceptorException
Description copied from interface:InitDefaultsInterceptor
Called byModelService.initDefaults(Object)
after instantiate a new model.- Specified by:
onInitDefaults
in 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.
-
-