Class ContentModel
java.lang.Object
com.broadleafcommerce.catalogbrowse.domain.ContentModel
- All Implemented Interfaces:
Serializable
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 booleanbooleanThe 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.voidsetAddressableByUri(boolean addressableByUri) Whether allContentItemsof this model can be retrieved by navigating tourifrom a storefront app.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:
-
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 map of field names and type that make up this content model
-
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:
-
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 map of field names and type that make up this content model
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-