Class AsBoostItemConfigurationInterceptor
- java.lang.Object
-
- de.hybris.platform.adaptivesearch.model.interceptors.AbstractAsInterceptor
-
- de.hybris.platform.adaptivesearch.model.interceptors.AsBoostItemConfigurationInterceptor
-
- All Implemented Interfaces:
Interceptor,PrepareInterceptor<AbstractAsBoostItemConfigurationModel>,RemoveInterceptor<AbstractAsBoostItemConfigurationModel>,ValidateInterceptor<AbstractAsBoostItemConfigurationModel>
public class AsBoostItemConfigurationInterceptor extends AbstractAsInterceptor implements PrepareInterceptor<AbstractAsBoostItemConfigurationModel>, ValidateInterceptor<AbstractAsBoostItemConfigurationModel>, RemoveInterceptor<AbstractAsBoostItemConfigurationModel>
Interceptor forAbstractAsBoostItemConfigurationModel.
-
-
Constructor Summary
Constructors Constructor Description AsBoostItemConfigurationInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanisUniqueIdxChangeAllowed(java.lang.String previousUniqueIdx, java.lang.String uniqueIdx)When a boost item (e.g.: a product) is removed, the platform automatically sets the reference tonull.voidonPrepare(AbstractAsBoostItemConfigurationModel boostItemConfiguration, InterceptorContext context)Called in themodelService.saveAll()method.voidonRemove(AbstractAsBoostItemConfigurationModel boostItemConfiguration, InterceptorContext context)Called in themodelService.removeAll()method.voidonValidate(AbstractAsBoostItemConfigurationModel boostItemConfiguration, InterceptorContext context)Called in themodelService.saveAll()method.protected voidupdateUniqueIdx(AbstractAsBoostItemConfigurationModel boostItemConfiguration)-
Methods inherited from class de.hybris.platform.adaptivesearch.model.interceptors.AbstractAsInterceptor
decorateIdentifier, generateItemIdentifier, generateUid, getAsItemModelHelper, getAsSearchProviderFactory, getAsUidGenerator, getModelService, getNewPkForNotSavedItem, markItemAsModified, resolveAndValidateSearchConfiguration, resolveAndValidateSearchProfile, resolveSearchConfiguration, resolveSearchProfile, resolveSearchProvider, setAsItemModelHelper, setAsSearchProviderFactory, setAsUidGenerator, setModelService
-
-
-
-
Method Detail
-
onPrepare
public void onPrepare(AbstractAsBoostItemConfigurationModel boostItemConfiguration, InterceptorContext context) throws InterceptorException
Description copied from interface:PrepareInterceptorCalled in themodelService.saveAll()method. Prepares the values of the given model.- Specified by:
onPreparein interfacePrepareInterceptor<AbstractAsBoostItemConfigurationModel>- Parameters:
boostItemConfiguration- the model which values has to be preparedcontext- theInterceptorContext- Throws:
InterceptorException- if an error occured during the preparation
-
updateUniqueIdx
protected void updateUniqueIdx(AbstractAsBoostItemConfigurationModel boostItemConfiguration)
-
isUniqueIdxChangeAllowed
protected boolean isUniqueIdxChangeAllowed(java.lang.String previousUniqueIdx, java.lang.String uniqueIdx)When a boost item (e.g.: a product) is removed, the platform automatically sets the reference tonull. This method prevents the uniqueIdx from being updated in such cases.
-
onValidate
public void onValidate(AbstractAsBoostItemConfigurationModel boostItemConfiguration, InterceptorContext context) throws InterceptorException
Description copied from interface:ValidateInterceptorCalled in themodelService.saveAll()method. Validates the values of the given model.- Specified by:
onValidatein interfaceValidateInterceptor<AbstractAsBoostItemConfigurationModel>- Parameters:
boostItemConfiguration- the model which values has to be validatedcontext- theInterceptorContext- Throws:
InterceptorException- if any values of the model are not valid.
-
onRemove
public void onRemove(AbstractAsBoostItemConfigurationModel boostItemConfiguration, InterceptorContext context) throws InterceptorException
Description copied from interface:RemoveInterceptorCalled in themodelService.removeAll()method.- Specified by:
onRemovein interfaceRemoveInterceptor<AbstractAsBoostItemConfigurationModel>- Parameters:
boostItemConfiguration- the model which should be removedcontext- theInterceptorContext- Throws:
InterceptorException- if the remove reports an error
-
-