java.lang.Object
com.broadleafcommerce.data.tracking.core.tenant.domain.InheritanceLines
All Implemented Interfaces:
Serializable

public class InheritanceLines extends Object implements Serializable
Represents the upward catalog hierarchies for one or more assigned Catalog instances on a Application. The system reviews this information at runtime in order to make determinations regarding visibility and mutability of catalog members, given the application that's viewing these items.
Author:
Jeff Fischer
See Also:
  • Constructor Details

  • Method Details

    • flatten

      public Set<String> flatten()
      Extract a flat list of catalog ids in order to include relevant catalogs in queries during the narrowing phase (see NarrowExecutor).
      Returns:
      a flat list of catalog ids visible to the current application
    • mutabilityType

      @Nullable public String mutabilityType(String catalogId)
      If the catalog id is visible to the current application, return the mutability of the closest matching catalog. Closeness is determined by how few degrees of separation there are between the requested catalog id and the actual assigned catalog whose inheritance line includes the requested catalog id.
      Parameters:
      catalogId - The catalog id whose mutability is to be determined
      Returns:
      the mutability, or null if the catalog id is not visible
    • checkLine

      protected void checkLine(String catalogId, InheritanceLines.BestMember bestMember, InheritanceLine line)
    • getLines

      public List<InheritanceLine> getLines()
      The upward catalog hierarchies for one or more assigned Catalog instances
      Returns:
      the upward catalog hierarchies for one or more assigned Catalog instances
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object