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_ITEM
C - 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 Details

    • AbstractCircularDependencyValidationInterceptor

      public AbstractCircularDependencyValidationInterceptor()
  • Method Details

    • getChildren

      public abstract Set<P> getChildren(C modifiedItem)
      Extracts the children of the item given
      Parameters:
      modifiedItem - item that has been modified
      Returns:
      Set<P extends ItemModel>
    • getParents

      public abstract Set<C> getParents(C existingItem)
      Extracts item's parent items
      Parameters:
      existingItem - existing item to be validated
      Returns:
      Set<C extends P>
    • filterCompositeItem

      public abstract Set<C> filterCompositeItem(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<C extends P>
    • 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