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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanWhen the `referenceType` is `CONTENT`, this field holds allowed content models.List ofContentZoneItemListsto display based on theirrules.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.The defaultContentItemto display.getId()The system ID of the zone.getName()A unique name for the content zone, used for retrieval.inthashCode()voidsetAllowedModels(List<String> allowedModels) When the `referenceType` is `CONTENT`, this field holds allowed content models.voidsetAlternateItemSets(List<ContentZoneItemList> alternateItemSets) List ofContentZoneItemListsto display based on theirrules.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetDefaultItems(List<ContentZoneItem> defaultItems) The defaultContentItemto display.voidThe system ID of the zone.voidA unique name for the content zone, used for retrieval.toString()
-
Constructor Details
-
ContentZone
public ContentZone()
-
-
Method Details
-
getId
The system ID of the zone.- Returns:
- The system ID of the zone
-
getName
A unique name for the content zone, used for retrieval.- Returns:
- a unique name for the content zone, used for retrieval
-
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
The defaultContentItemto display. This will be displayed ifalternateItemSetsis empty or none match the request context.- Returns:
- The default
ContentItemto display.
-
getAlternateItemSets
List ofContentZoneItemListsto display based on theirrules. These are grouped lists ofContentItems.- Returns:
- List of other
ContentItemsto display based on theirrules.
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()A subset ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- a subset of
Trackinginformation to expose the context state for this object
-
setId
The system ID of the zone.- Parameters:
id- The system ID of the zone
-
setName
A unique name for the content zone, used for retrieval.- Parameters:
name- a unique name for the content zone, used for retrieval
-
setAllowedModels
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
The defaultContentItemto display. This will be displayed ifalternateItemSetsis empty or none match the request context.- Parameters:
defaultItemId- The defaultContentItemto display.
-
setAlternateItemSets
List ofContentZoneItemListsto display based on theirrules. These are grouped lists ofContentItems.- Parameters:
items- List ofContentZoneItemListsto display based on theirrules.
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-