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 boolean
boolean
When the `referenceType` is `CONTENT`, this field holds allowed content models.List ofContentZoneItemLists
to display based on theirrules
.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
A subset ofTracking
information to expose the context state for this object.The defaultContentItem
to display.getId()
The system ID of the zone.getName()
A unique name for the content zone, used for retrieval.int
hashCode()
void
setAllowedModels
(List<String> allowedModels) When the `referenceType` is `CONTENT`, this field holds allowed content models.void
setAlternateItemSets
(List<ContentZoneItemList> alternateItemSets) List ofContentZoneItemLists
to display based on theirrules
.void
setContextState
(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTracking
information to expose the context state for this object.void
setDefaultItems
(List<ContentZoneItem> defaultItems) The defaultContentItem
to display.void
The system ID of the zone.void
A 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 defaultContentItem
to display. This will be displayed ifalternateItemSets
is empty or none match the request context.- Returns:
- The default
ContentItem
to display.
-
getAlternateItemSets
List ofContentZoneItemLists
to display based on theirrules
. These are grouped lists ofContentItems
.- Returns:
- List of other
ContentItems
to display based on theirrules
.
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()A subset ofTracking
information to expose the context state for this object.- Specified by:
getContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Returns:
- a subset of
Tracking
information 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 defaultContentItem
to display. This will be displayed ifalternateItemSets
is empty or none match the request context.- Parameters:
defaultItemId
- The defaultContentItem
to display.
-
setAlternateItemSets
List ofContentZoneItemLists
to display based on theirrules
. These are grouped lists ofContentItems
.- Parameters:
items
- List ofContentZoneItemLists
to display based on theirrules
.
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTracking
information to expose the context state for this object.- Specified by:
setContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Parameters:
contextState
- a subset ofTracking
information to expose the context state for this object
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-