java.lang.Object
com.broadleafcommerce.catalog.service.product.consolidation.util.ProductConsolidationUtil

public class ProductConsolidationUtil extends Object
Provides utility support for operations performed throughout Product Consolidation.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    getSandboxOwner(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState context)
    Get the sandbox owner for the context based on field changes if in a user sandbox context.
    static <T extends com.broadleafcommerce.data.tracking.core.ContextStateAware>
    boolean
    isDeleted(T entity)
    Check if the entity is deleted in its context.
    static boolean
    isInheriting(String reference, String candidate, com.broadleafcommerce.data.tracking.core.tenant.domain.InheritanceLines inheritanceLines)
    Determine if the candidate catalog id represents a catalog that inherits from a catalog represented by the reference catalog id.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getSandboxOwner

      public static String getSandboxOwner(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState context)
      Get the sandbox owner for the context based on field changes if in a user sandbox context.
      Parameters:
      context - context information surrounding sandboxing/multitenant state
      Returns:
      sandbox owner of current context if in user context
    • isDeleted

      public static <T extends com.broadleafcommerce.data.tracking.core.ContextStateAware> boolean isDeleted(T entity)
      Check if the entity is deleted in its context.
      Type Parameters:
      T - the type of the entity
      Parameters:
      entity - the entity which represents an override in its context
      Returns:
      whether or not the entity has been deleted in its context
    • isInheriting

      public static boolean isInheriting(String reference, String candidate, com.broadleafcommerce.data.tracking.core.tenant.domain.InheritanceLines inheritanceLines)
      Determine if the candidate catalog id represents a catalog that inherits from a catalog represented by the reference catalog id.
      Parameters:
      reference - The id of the reference catalog
      candidate - The id of the candidate catalog
      inheritanceLines - the catalog inheritance lines top-down
      Returns:
      Whether or not the candidate inherits from the reference