Class CatalogGroupSelectionChain

  • java.lang.Object

  • public class CatalogGroupSelectionChain
    extends java.lang.Object
    Each CatalogGroupSelection instance should belongs to a catalog group selection chain.

    Each catalog group selection chain(shorten as selection chain) should have a root catalog group selection according to the position of its catalog group in the catalog tree, in catalog filter terminology, the root catalog group selection(shorten as selection) is called Chain Head and its descendant selections are called Chain Entry. Note that Chain Head is a kind of Chain Entry.

    For Example, in the following catalog tree:

     Catalog X
     |      |           |--A12
     |      |           |--A13 
     |      |------A2   |--A14
     |      |
     |      |------B2---|--B21
     |      |           |--B22
     |      |           |--B23 
     |      |------B3   |--B24

    1. If we define 4 selections for 'A', 'A2', 'A12' and 'A13', there is just one selection chain in the catalog. The selection against 'A' is the Chain Head because of its higher position in the catalog tree. Since there is no selection defined for 'A1', the direct descendant chain entry list of 'A' should include 'A2', 'A12' and 'A13'.

      Vice versa, The direct ancestor selection chain entry of 'A2', 'A12' and 'A13' should be 'A'.

    2. If we define 4 selections for 'A1', 'A2', 'A12' and 'A13', there are 2 selection chains in the catalog. The chain heads of the 2 chains are 'A1' and 'A2', 'A1' has 'A12' and 'A13' as its direct descendant chain entries
    3. If we define 3 selections for 'A2', 'A12' and 'A13', there are 3 selection chain in the catalog. The chain heads of the 3 chains are 'A2' and 'A12' and 'A13', each of them has no direct descendant chain entries out there.
    The reason why we adopt chain collection is we need to implement the inheritance ability of the catalog group selection. Catalog group selection in higher position should propagate its filtering attribute to its descendant catalog groups that do not have selection defined, the catalog groups shouldn't have the filtering attributes defined by their ancestors if they already have been selected as a catalog group selection.
    • Constructor Detail

      • CatalogGroupSelectionChain

        public CatalogGroupSelectionChain()
        The constructor.
    • Method Detail

      • addChainEntry

        public void addChainEntry(CatalogGroupSelectionChainEntry chainEntry)
        Add a chain entry into chain.
        chainEntry - the chain entry.
      • setChainHead

        public void setChainHead(CatalogGroupSelectionChainEntry chainHead)
        Set the chain head for chain.
        chainHead - the chain head.
      • getCatGroupChainEntryMap

        public java.util.Map<java.lang.Long,CatalogGroupSelectionChainEntry> getCatGroupChainEntryMap()
        Get the Map between catalog group ID and chain entries in the chain.
        The Map between catalog group ID and chain entries in the chain.