java.lang.Object
com.broadleafcommerce.catalog.domain.product.type.BusinessType
All Implemented Interfaces:
Serializable

public class BusinessType extends Object implements 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 Details

  • Method Details

    • getId

      public String getId()
      Id of the business type.
    • getName

      public String getName()
      Name of the type. This is displayed to users.
    • getTypeKey

      public String getTypeKey()
      Key for the type. This is used in business logic.
    • getDescription

      public String getDescription()
      A friendly description of the type.
    • getProductType

      public String getProductType()
      The base type this business type derives from. This can be another business type or DefaultProductType.
    • 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

      public Map<String,BusinessTypeField> 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

      public Map<String,BusinessTypeField> getCustomFields()
      Represents fields that are net new to the entity. This field requires hydration.
    • setId

      public void setId(String id)
      Id of the business type.
    • setName

      public void setName(String name)
      Name of the type. This is displayed to users.
    • setTypeKey

      public void setTypeKey(String typeKey)
      Key for the type. This is used in business logic.
    • setDescription

      public void setDescription(String description)
      A friendly description of the type.
    • setProductType

      public void setProductType(String productType)
      The base type this business type derives from. This can be another business type or DefaultProductType.
    • 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

      public 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. This field requires hydration.
    • setCustomFields

      public void setCustomFields(Map<String,BusinessTypeField> customFields)
      Represents fields that are net new to the entity. This field requires hydration.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object