Class PartOfModelRegisterForRemoveInterceptor
java.lang.Object
de.hybris.platform.servicelayer.interceptor.impl.PartOfModelRegisterForRemoveInterceptor
- All Implemented Interfaces:
Interceptor,RemoveInterceptor
- Direct Known Subclasses:
ClassificationClassPartOfRemoveInterceptor,ProductPriceRegisterForRemoveInterceptor
This PartOfModelRegisterForRemoveInterceptor checks for the given (to be remove)
ItemModel the partOf
attributes of this model and add the attribute value (if this is an ItemModel) to the
InterceptorContext. This interceptor is invoked by ModelService.removeAll(Collection) and there will
be the additionally registered models deleted. For dealing with special part-of attributes (like
ProductModel.europe1prices) extend this class and overwrite
registerForRemoval(InterceptorContext, ItemModel, ItemModel, String) to implement special behaviour for a
given attribute.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexcludeIgnoredAndDisabledFromPartOfAttributes(Set<String> partOfSet, Set<String> ignoreSet, String itemType) excludeIgnoredFromPartOfAttributes(Set<String> partOfSet, Set<String> ignoreSet) protected voidextractAndRegisterForRemoval(InterceptorContext ctx, ItemModel parentModel, Object attrValue, String partOfAttrQualifier) Goes through theattrValuecontent and calls for each foundItemModelthe methodregisterForRemoval(InterceptorContext, ItemModel, ItemModel, String).getFilteredPartOfAttributes(ItemModelConverter itemModelConverter) voidonRemove(Object model, InterceptorContext ctx) Called in themodelService.removeAll()method.protected voidregisterForRemoval(InterceptorContext ctx, ItemModel parentModel, ItemModel subModel, String partOfAttrQualifier) Hook-in method for special attribute dealing.voidsetConfigurationService(ConfigurationService configurationService) voidsetIgnoreAttributes(Set<String> ignoreAttributes) protected voidvoidsetPropertyActionReader(PropertyActionReader propertyActionReader) voidsetSessionService(SessionService sessionService) voidsetTypeService(TypeService typeService)
-
Constructor Details
-
PartOfModelRegisterForRemoveInterceptor
public PartOfModelRegisterForRemoveInterceptor()
-
-
Method Details
-
setTypeService
-
setSessionService
-
setConfigurationService
-
setPropertyActionReader
-
onRemove
Description copied from interface:RemoveInterceptorCalled in themodelService.removeAll()method.- Specified by:
onRemovein interfaceRemoveInterceptor- Parameters:
model- the model which should be removedctx- theInterceptorContext- Throws:
InterceptorException- if the remove reports an error
-
setPartOfRemovedSessionMarker
-
registerForRemoval
protected void registerForRemoval(InterceptorContext ctx, ItemModel parentModel, ItemModel subModel, String partOfAttrQualifier) Hook-in method for special attribute dealing. This method here callsInterceptorContext.registerElement(Object, Object)with the parameters:submodel, null. Overwrite this method to execute your own logic for a given partOf attribute.- Parameters:
ctx- the Interceptor context. Thesubmodelwill be registered to it.parentModel- this is the model which has the part-of attributesubModel- the content of the part-of attribute from theparentModelpartOfAttrQualifier- the attribute qualifier of the part-of attribute
-
extractAndRegisterForRemoval
protected void extractAndRegisterForRemoval(InterceptorContext ctx, ItemModel parentModel, Object attrValue, String partOfAttrQualifier) Goes through theattrValuecontent and calls for each foundItemModelthe methodregisterForRemoval(InterceptorContext, ItemModel, ItemModel, String). -
getFilteredPartOfAttributes
-
excludeIgnoredAndDisabledFromPartOfAttributes
-
excludeIgnoredFromPartOfAttributes
-
setIgnoreAttributes
-