Class BusinessType
java.lang.Object
com.broadleafcommerce.catalog.domain.product.type.BusinessType
- All Implemented Interfaces:
Serializable
Represents a derivative of the Broadleaf Product Types that allows business users to group
products by shared attributes. The type may drive some additional logic but mainly allows
automatically populating new fields onto Products based on a template. These fields are
effectively the same as Custom Fields (a.k.a. Augmentations) but are created and managed for
specific types of products rather than just for specific forms or views.
Business Types can also derive from other Business Types to allow simply polymorphism. By
default, all fields are stored in Product.getAttributes()
.
- See Also:
-
Constructor Summary
ConstructorDescriptionBusinessType
(String id, String name, String typeKey, String description, String productType, boolean template, Map<String, BusinessTypeField> fields, Map<String, BusinessTypeField> customFields) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Represents fields that are net new to the entity.A friendly description of the type.Represent fields that override the default metadata for an entity such as changing a product's name's field label.getId()
Id of the business type.getName()
Name of the type.The base type this business type derives from.Key for the type.int
hashCode()
boolean
Whether this business type is a template.void
setCustomFields
(Map<String, BusinessTypeField> customFields) Represents fields that are net new to the entity.void
setDescription
(String description) A friendly description of the type.void
setFields
(Map<String, BusinessTypeField> fields) Represent fields that override the default metadata for an entity such as changing a product's name's field label.void
Id of the business type.void
Name of the type.void
setProductType
(String productType) The base type this business type derives from.void
setTemplate
(boolean template) Whether this business type is a template.void
setTypeKey
(String typeKey) Key for the type.toString()
-
Constructor Details
-
BusinessType
public BusinessType() -
BusinessType
-
-
Method Details
-
getId
Id of the business type. -
getName
Name of the type. This is displayed to users. -
getTypeKey
Key for the type. This is used in business logic. -
getDescription
A friendly description of the type. -
getProductType
The base type this business type derives from. This can be another business type orDefaultProductType
. -
isTemplate
public boolean isTemplate()Whether this business type is a template. Templates are used to create new business types and are not used directly. -
getFields
Represent fields that override the default metadata for an entity such as changing a product's name's field label. This field requires hydration. -
getCustomFields
Represents fields that are net new to the entity. This field requires hydration. -
setId
Id of the business type. -
setName
Name of the type. This is displayed to users. -
setTypeKey
Key for the type. This is used in business logic. -
setDescription
A friendly description of the type. -
setProductType
The base type this business type derives from. This can be another business type orDefaultProductType
. -
setTemplate
public void setTemplate(boolean template) Whether this business type is a template. Templates are used to create new business types and are not used directly. -
setFields
Represent fields that override the default metadata for an entity such as changing a product's name's field label. This field requires hydration. -
setCustomFields
Represents fields that are net new to the entity. This field requires hydration. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-