Class BusinessTypeField

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

public class BusinessTypeField extends Object implements Serializable
Represents a field common to products based on the parent BusinessType. This defines various metadata for the field, not the value. The value is stored on the Product (in the Product.getAttributes() by default).
See Also:
  • Constructor Details

    • BusinessTypeField

      public BusinessTypeField()
  • Method Details

    • getName

      public String getName()
      The name of the field. This is used in the business logic.
    • getLabel

      public String getLabel()
      The display label for this field.
    • isRequired

      public boolean isRequired()
      Whether the field is required in admin forms.
    • isReadOnly

      public boolean isReadOnly()
      Whether the field should be read-only in admin forms.
    • isHidden

      public boolean isHidden()
      Whether the field should be hidden in admin forms.
    • getDefaultValue

      public Object getDefaultValue()
      The default value for the field.
    • getType

      public String getType()
      The type of field, e.g., STRING, DECIMAL, MONEY etc. See com.broadleafcommerce.metadata.dsl.core.extension.fields.FieldTypes.
    • getClassifier

      public String getClassifier()
      The fields classifier, typically either Field or External.
    • getValidationSchema

      public ValidationSchema getValidationSchema()
      Validation rules to run against the field's value.
    • getTargetKey

      public String getTargetKey()
      Augmentation target key.
    • getOrder

      public Integer getOrder()
      The display order.
    • getChangeType

      public String getChangeType()
      The type of change that this field represents. This is used to determine how to handle the field in the admin.
    • getTimestamp

      public Instant getTimestamp()
      The timestamp of when this was created. Used for determining the order of operations when applying augmentations.
    • getAttributes

      public Map<String,Object> getAttributes()
      Additional arbitrary attributes.
    • setName

      public void setName(String name)
      The name of the field. This is used in the business logic.
    • setLabel

      public void setLabel(String label)
      The display label for this field.
    • setRequired

      public void setRequired(boolean required)
      Whether the field is required in admin forms.
    • setReadOnly

      public void setReadOnly(boolean readOnly)
      Whether the field should be read-only in admin forms.
    • setHidden

      public void setHidden(boolean hidden)
      Whether the field should be hidden in admin forms.
    • setDefaultValue

      public void setDefaultValue(Object defaultValue)
      The default value for the field.
    • setType

      public void setType(String type)
      The type of field, e.g., STRING, DECIMAL, MONEY etc. See com.broadleafcommerce.metadata.dsl.core.extension.fields.FieldTypes.
    • setClassifier

      public void setClassifier(String classifier)
      The fields classifier, typically either Field or External.
    • setValidationSchema

      public void setValidationSchema(ValidationSchema validationSchema)
      Validation rules to run against the field's value.
    • setTargetKey

      public void setTargetKey(String targetKey)
      Augmentation target key.
    • setOrder

      public void setOrder(Integer order)
      The display order.
    • setChangeType

      public void setChangeType(String changeType)
      The type of change that this field represents. This is used to determine how to handle the field in the admin.
    • setTimestamp

      public void setTimestamp(Instant timestamp)
      The timestamp of when this was created. Used for determining the order of operations when applying augmentations.
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      Additional arbitrary attributes.
    • 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