Class ContentModel
java.lang.Object
com.broadleafcommerce.content.domain.ContentModel
- All Implemented Interfaces:
 com.broadleafcommerce.data.tracking.core.ContextStateAware,Serializable
public class ContentModel
extends Object
implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
Represents the definition for 
ContentItems. This does not hold the actual
 values to be displayed on a commerce-facing frontend, rather it defines the fields and field
 types that are common to all ContentItems based on this model.- See Also:
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleancom.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.The list of fields that make up this content modelgetId()The context ID of the content model.getName()A unique name for the content model, used for retrieval.getUri()SEO-friendly URI to identifyContentItemsof this model.inthashCode()booleanWhether allContentItemsof this model can be retrieved by navigating tourifrom a storefront app.booleanWhether this model is only used as an embedded model.voidsetAddressableByUri(boolean addressableByUri) Whether allContentItemsof this model can be retrieved by navigating tourifrom a storefront app.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetEmbeddedOnly(boolean embeddedOnly) Whether this model is only used as an embedded model.voidsetFields(List<ContentField> fields) The list of fields that make up this content modelvoidThe context ID of the content model.voidA unique name for the content model, used for retrieval.voidSEO-friendly URI to identifyContentItemsof this model.toString() 
- 
Constructor Details
- 
ContentModel
public ContentModel() 
 - 
 - 
Method Details
- 
getId
The context ID of the content model.- Returns:
 - the context ID of the content model
 
 - 
getName
A unique name for the content model, used for retrieval.- Returns:
 - a unique name for the content model, used for retrieval
 
 - 
isAddressableByUri
public boolean isAddressableByUri()Whether allContentItemsof this model can be retrieved by navigating tourifrom a storefront app. For example, navigating to/blogswould result in all Content Items using the "Blog" model being fetching. Moreover, those content items would have their own URIs that would be appended to the model's, e.g.,/:ContentModel.uri/:ContentItem.uri.- Returns:
 - Whether all 
ContentItemsof this model can be retrieved by navigating tourifrom a storefront app. - See Also:
 
 - 
isEmbeddedOnly
public boolean isEmbeddedOnly()Whether this model is only used as an embedded model. Embedded models are not addressable by URL and are only used as part of another model.- Returns:
 - Whether this model is only used as an embedded model.
 - Since:
 - Release Train 2.1.2
 
 - 
getUri
SEO-friendly URI to identifyContentItemsof this model.ContentItemsof this model will have theirURIsappended to this.- Returns:
 - SEO-friendly URI to identify 
ContentItemsof this model. 
 - 
getFields
The list of fields that make up this content model- Returns:
 - a list of field names and type that make up this content model
 
 - 
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 context ID of the content model.- Parameters:
 id- the context ID of the content model
 - 
setName
A unique name for the content model, used for retrieval.- Parameters:
 name- a unique name for the content model, used for retrieval
 - 
setAddressableByUri
public void setAddressableByUri(boolean addressableByUri) Whether allContentItemsof this model can be retrieved by navigating tourifrom a storefront app. For example, navigating to/blogswould result in all Content Items using the "Blog" model being fetching. Moreover, those content items would have their own URIs that would be appended to the model's, e.g.,/:ContentModel.uri/:ContentItem.uri.- Parameters:
 addressableByUrl- Whether allContentItemsof this model can be retrieved by navigating tourifrom a storefront app.- See Also:
 
 - 
setEmbeddedOnly
public void setEmbeddedOnly(boolean embeddedOnly) Whether this model is only used as an embedded model. Embedded models are not addressable by URL and are only used as part of another model.- Parameters:
 embeddedOnly- Whether this model is only used as an embedded model.- Since:
 - Release Train 2.1.2
 
 - 
setUri
SEO-friendly URI to identifyContentItemsof this model.ContentItemsof this model will have theirURIsappended to this.- Parameters:
 SEO- -friendly URI to identifyContentItemsof this model.
 - 
setFields
The list of fields that make up this content model- Parameters:
 fields- a list of field names and type that make up this content model
 - 
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
 
 -