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 java.lang.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 Constructor Description AbstractCircularDependencyValidationInterceptor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.util.Set<C>filterCompositeItem(java.util.Set<P> entries)Filters composite items from the set of composite and simple itemsabstract java.util.Set<P>getChildren(C modifiedItem)Extracts the children of the item givenabstract java.util.Set<C>getParents(C existingItem)Extracts item's parent itemsprotected voidvalidateModifiedItem(C modifiedItem)Validates the modified composite attributes of the {@param modifiedItem} given, by searching for circular dependencies within the current configuration.protected voidvalidateModifiedParentItem(C modifiedItem)Validates the parent item of the {@param modifiedItem} given, by searching for circular dependencies within the current configuration.
-
-
-
Method Detail
-
getChildren
public abstract java.util.Set<P> getChildren(C modifiedItem)
Extracts the children of the item given- Parameters:
modifiedItem- item that has been modified- Returns:
Set
-
getParents
public abstract java.util.Set<C> getParents(C existingItem)
Extracts item's parent items- Parameters:
existingItem- existing item to be validated- Returns:
Set
-
filterCompositeItem
public abstract java.util.Set<C> filterCompositeItem(java.util.Set<P> entries)
Filters composite items from the set of composite and simple items- Parameters:
entries- set of children items to be filtered- Returns:
Set
-
validateModifiedItem
protected void validateModifiedItem(C modifiedItem) throws de.hybris.platform.servicelayer.interceptor.InterceptorException
Validates the modified composite attributes of the {@param modifiedItem} 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 {@param modifiedItem} 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
-
-