Class InheritanceLines
- 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 assignedCatalog
instances on aApplication
. 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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
InheritanceLines.BestMember
-
Constructor Summary
Constructors Constructor Description InheritanceLines(List<InheritanceLine> lines)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
protected void
checkLine(String catalogId, InheritanceLines.BestMember bestMember, InheritanceLine line)
boolean
equals(Object o)
Set<String>
flatten()
Extract a flat list of catalog ids in order to include relevant catalogs in queries during the narrowing phase (seeNarrowExecutor
).List<InheritanceLine>
getLines()
The upward catalog hierarchies for one or more assignedCatalog
instancesint
hashCode()
String
mutabilityType(String catalogId)
If the catalog id is visible to the current application, return the mutability of the closest matching catalog.String
toString()
-
-
-
Constructor Detail
-
InheritanceLines
public InheritanceLines(List<InheritanceLine> lines)
-
-
Method Detail
-
flatten
public Set<String> flatten()
Extract a flat list of catalog ids in order to include relevant catalogs in queries during the narrowing phase (seeNarrowExecutor
).- 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 assignedCatalog
instances- Returns:
- the upward catalog hierarchies for one or more assigned
Catalog
instances
-
canEqual
protected boolean canEqual(Object other)
-
-