public abstract class AbstractParentChildValidateInterceptor extends java.lang.Object implements ValidateInterceptor
ItemModels whose parent objects
also need to be modified if they are modified. By
implementing the function onValidate as final, one can make sure
that markParentItemsAsModified(de.hybris.platform.core.model.ItemModel) is called
after all validations in the sub-classes have successfully passed.| Constructor and Description |
|---|
AbstractParentChildValidateInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doValidate(java.lang.Object model,
InterceptorContext ctx)
This function replaces the onValidate method in sub-classes.
|
protected ModelService |
getModelService() |
protected void |
markItemsAsModified(java.util.List<ItemModel> items) |
void |
markParentItemsAsModified(ItemModel item) |
void |
onValidate(java.lang.Object model,
InterceptorContext ctx)
Called in the
modelService.saveAll() method. |
void |
setModelService(ModelService modelService) |
public AbstractParentChildValidateInterceptor()
public final void onValidate(java.lang.Object model,
InterceptorContext ctx)
throws InterceptorException
ValidateInterceptormodelService.saveAll() method. Validates the values of the given model.onValidate in interface ValidateInterceptormodel - the model which values has to be validatedctx - the InterceptorContextInterceptorException - if any values of the model are not valid.protected abstract void doValidate(java.lang.Object model,
InterceptorContext ctx)
throws InterceptorException
InterceptorExceptionpublic void markParentItemsAsModified(ItemModel item)
protected void markItemsAsModified(java.util.List<ItemModel> items)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
Copyright © 2018 SAP SE. All Rights Reserved.