Class AbstractCircularDependencyValidationInterceptor<P extends ItemModel,​C extends P>

    • 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 items
      abstract java.util.Set<P> getChildren​(C modifiedItem)
      Extracts the children of the item given
      abstract java.util.Set<C> getParents​(C existingItem)
      Extracts item's parent items
      protected void validateModifiedItem​(C modifiedItem)
      Validates the modified composite attributes of the {@param modifiedItem} given, by searching for circular dependencies within the current configuration.
      protected void validateModifiedParentItem​(C modifiedItem)
      Validates the parent item of the {@param modifiedItem} 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, wait
      • Methods inherited from interface de.hybris.platform.servicelayer.interceptor.ValidateInterceptor

        onValidate
    • Constructor Detail

      • AbstractCircularDependencyValidationInterceptor

        public AbstractCircularDependencyValidationInterceptor()
    • 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