Class AbstractCircularDependencyValidationInterceptor<P extends ItemModel,C extends P>
java.lang.Object
de.hybris.platform.b2ctelcoservices.interceptors.AbstractCircularDependencyValidationInterceptor<P,C>
- Type Parameters:
P- stands for PARENT_ITEMC- stands for COMPOSITE_ITEM
- All Implemented Interfaces:
de.hybris.platform.servicelayer.interceptor.Interceptor,de.hybris.platform.servicelayer.interceptor.ValidateInterceptor<C>
- Direct Known Subclasses:
BpoCircularDependencyValidationInterceptor,CompositePolicyConditionCircularDependencyValidationInterceptor,CpsCircularDependencyValidationInterceptor
public abstract class AbstractCircularDependencyValidationInterceptor<P extends ItemModel,C extends P>
extends Object
implements de.hybris.platform.servicelayer.interceptor.ValidateInterceptor<C>
Validation Interceptor making sure that no circular dependency can be formed within a give composite Item.
- Since:
- 6.7
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfilterCompositeItem(Set<P> entries) Filters composite items from the set of composite and simple itemsgetChildren(C modifiedItem) Extracts the children of the item givengetParents(C existingItem) Extracts item's parent itemsprotected voidvalidateModifiedItem(C modifiedItem) Validates the modified composite attributes of the given, by searching for circular dependencies within the current configuration.protected voidvalidateModifiedParentItem(C modifiedItem) Validates the parent item of the given, by searching for circular dependencies within the current configuration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.servicelayer.interceptor.ValidateInterceptor
onValidate
-
Constructor Details
-
AbstractCircularDependencyValidationInterceptor
public AbstractCircularDependencyValidationInterceptor()
-
-
Method Details
-
getChildren
Extracts the children of the item given -
getParents
Extracts item's parent items -
filterCompositeItem
Filters composite items from the set of composite and simple items -
validateModifiedItem
protected void validateModifiedItem(C modifiedItem) throws de.hybris.platform.servicelayer.interceptor.InterceptorException Validates the modified composite attributes of the given, by searching for circular dependencies within the current configuration.- Parameters:
modifiedItem- item that have been modified, to be validated- Throws:
de.hybris.platform.servicelayer.interceptor.InterceptorException- if any circular dependency can be found within the given structure
-
validateModifiedParentItem
protected void validateModifiedParentItem(C modifiedItem) throws de.hybris.platform.servicelayer.interceptor.InterceptorException Validates the parent item of the given, by searching for circular dependencies within the current configuration.- Parameters:
modifiedItem- item for which the parent item have been modified, to be validated- Throws:
de.hybris.platform.servicelayer.interceptor.InterceptorException- if any circular dependency can be found within the given structure
-