Class ContentZone

java.lang.Object
com.broadleafcommerce.content.domain.ContentZone
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable

public class ContentZone extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
Represents an area in a UI view that displays variable content. This can be used to display different ContentItems in the same space on a page based on various display rules such as if the user is logged in, if the URL contains a marketing code, etc.
Author:
Nathan Moore (nathandmoore)
See Also:
  • Constructor Details

    • ContentZone

      public ContentZone()
  • Method Details

    • getId

      public String getId()
      The system ID of the zone.
      Returns:
      The system ID of the zone
    • getName

      public String getName()
      A unique name for the content zone, used for retrieval.
      Returns:
      a unique name for the content zone, used for retrieval
    • getAllowedModels

      public List<String> getAllowedModels()
      When the `referenceType` is `CONTENT`, this field holds allowed content models. If empty, allows all.
      Returns:
      the allowed content models this field can reference
    • getDefaultItems

      public List<ContentZoneItem> getDefaultItems()
      The default ContentItem to display. This will be displayed if alternateItemSets is empty or none match the request context.
      Returns:
      The default ContentItem to display.
    • getAlternateItemSets

      public List<ContentZoneItemList> getAlternateItemSets()
      List of ContentZoneItemLists to display based on their rules. These are grouped lists of ContentItems.
      Returns:
      List of other ContentItems to display based on their rules.
    • getContextState

      public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Returns:
      a subset of Tracking information to expose the context state for this object
    • setId

      public void setId(String id)
      The system ID of the zone.
      Parameters:
      id - The system ID of the zone
    • setName

      public void setName(String name)
      A unique name for the content zone, used for retrieval.
      Parameters:
      name - a unique name for the content zone, used for retrieval
    • setAllowedModels

      public void setAllowedModels(List<String> allowedModels)
      When the `referenceType` is `CONTENT`, this field holds allowed content models. If empty, allows all.
      Parameters:
      allowedModels - the allowed content models this field can reference
    • setDefaultItems

      public void setDefaultItems(List<ContentZoneItem> defaultItems)
      The default ContentItem to display. This will be displayed if alternateItemSets is empty or none match the request context.
      Parameters:
      defaultItemId - The default ContentItem to display.
    • setAlternateItemSets

      public void setAlternateItemSets(List<ContentZoneItemList> alternateItemSets)
      List of ContentZoneItemLists to display based on their rules. These are grouped lists of ContentItems.
      Parameters:
      items - List of ContentZoneItemLists to display based on their rules.
    • setContextState

      public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Parameters:
      contextState - a subset of Tracking information to expose the context state for this object
    • 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