Interface CustomField
- All Superinterfaces:
org.broadleafcommerce.core.search.domain.Field,org.broadleafcommerce.common.copy.MultiTenantCloneable<org.broadleafcommerce.core.search.domain.Field>,Serializable
- All Known Implementing Classes:
CustomFieldImpl
Represents a custom field that may be introduced by an admin user in the admin tool. Custom fields
are maintained in an attributes map on the target entity.
- Author:
- Jeff Fischer
-
Method Summary
Modifier and TypeMethodDescriptionReturns the list of allowed values for this custom field if it is an ENUMERATION type.Get whether multiple values are allowed to be selected for this enum CustomFieldWhether or not a new FieldGroup should be created for the target EntityForm.The type for this field (e.g.Optional - The order for this field in the formOptional - The group in the target entity in which this field will reside.Retrieve the raw, fully-qualified classname for the entity type targeted in this custom fieldWhether or not this field is available to rule builders based on the target entity.Whether or not this field is visible on the target entity form.Optional - The tab in the target entity in which this field will residevoidsetAllowedEnumValues(List<AllowedEnumValue> allowedEnumValues) Sets the list of allowed values for this custom field if it is an ENUMERATION type.voidsetAllowMultiValueSelect(Boolean allowMultiValueSelect) Set whether multiple values are allowed to be selected for this enum CustomFieldvoidsetCreateNewGroup(Boolean createNewGroup) Whether or not a new FieldGroup should be created for the target EntityForm.voidsetCustomFieldType(CustomFieldType customFieldType) The type for this field (e.g.voidsetEntityType(CustomFieldTargetType customFieldTargetType) Set the value that gets saved to BLC_FIELD.ENTITY_TYPE.voidsetFieldOrder(Integer fieldOrder) Optional - the order for this field in the formvoidsetGroupName(String groupName) Optional - The group in the target entity in which this field will reside.voidsetShowFieldInRuleBuilder(Boolean showFieldInRuleBuilder) Whether or not this field is available to rule builders based on the target entity.voidsetShowFieldOnForm(Boolean showFieldOnForm) Whether or not this field is visible on the target entity form.voidsetTabName(String tabName) Optional - The tab in the target entity in which this field will resideMethods inherited from interface org.broadleafcommerce.core.search.domain.Field
getAbbreviation, getEntityType, getFriendlyName, getId, getOverrideGeneratedPropertyName, getPropertyName, getQualifiedFieldName, getSearchConfigs, getTranslatable, setAbbreviation, setEntityType, setFriendlyName, setId, setOverrideGeneratedPropertyName, setPropertyName, setSearchConfigs, setTranslatableMethods inherited from interface org.broadleafcommerce.common.copy.MultiTenantCloneable
createOrRetrieveCopyInstance
-
Method Details
-
getCustomFieldType
CustomFieldType getCustomFieldType()The type for this field (e.g. Boolean, Date, ...). This drives the picker and validation in the admin.- Returns:
- The type for this field
-
setCustomFieldType
The type for this field (e.g. Boolean, Date, ...). This drives the picker and validation in the admin.- Parameters:
customFieldType- The type for this field
-
getFieldOrder
Integer getFieldOrder()Optional - The order for this field in the form- Returns:
- the order of the field in the form
-
setFieldOrder
Optional - the order for this field in the form- Parameters:
fieldOrder- the order of the field in the form
-
getGroupName
String getGroupName()Optional - The group in the target entity in which this field will reside. Grouping effects visual organization of fields in the admin tool form. May be null, in which case the field will be in the default, general group.- Returns:
- The group in the target entity in which this field will reside.
-
setGroupName
Optional - The group in the target entity in which this field will reside. Grouping effects visual organization of fields in the admin tool form. May be null, in which case the field will be in the default, general group.- Parameters:
groupName- The group in the target entity in which this field will reside.
-
getTabName
String getTabName()Optional - The tab in the target entity in which this field will reside- Returns:
- the name of the tab this field should reside in
-
setTabName
Optional - The tab in the target entity in which this field will reside- Parameters:
tabName-
-
getShowFieldInRuleBuilder
Boolean getShowFieldInRuleBuilder()Whether or not this field is available to rule builders based on the target entity.- Returns:
- whether or not this field appears in the rule builder
-
setShowFieldInRuleBuilder
Whether or not this field is available to rule builders based on the target entity.- Parameters:
showFieldInRuleBuilder- whether or not this field appears in the rule builder
-
getShowFieldOnForm
Boolean getShowFieldOnForm()Whether or not this field is visible on the target entity form.- Returns:
- whether or not this field appears on the target entity form
-
setShowFieldOnForm
Whether or not this field is visible on the target entity form.- Parameters:
showFieldOnForm- whether or not this field appears on the target entity form
-
getCreateNewGroup
Boolean getCreateNewGroup()Whether or not a new FieldGroup should be created for the target EntityForm.- Returns:
-
setCreateNewGroup
Whether or not a new FieldGroup should be created for the target EntityForm.- Parameters:
createNewGroup-
-
getAllowedEnumValues
List<AllowedEnumValue> getAllowedEnumValues()Returns the list of allowed values for this custom field if it is an ENUMERATION type.- Returns:
-
setAllowedEnumValues
Sets the list of allowed values for this custom field if it is an ENUMERATION type.- Parameters:
allowedEnumValues-
-
setEntityType
Set the value that gets saved to BLC_FIELD.ENTITY_TYPE.- Parameters:
customFieldTargetType-
-
getAllowMultiValueSelect
Boolean getAllowMultiValueSelect()Get whether multiple values are allowed to be selected for this enum CustomField- Returns:
-
setAllowMultiValueSelect
Set whether multiple values are allowed to be selected for this enum CustomField- Parameters:
allowMultiValueSelect-
-
getRawEntityType
String getRawEntityType()Retrieve the raw, fully-qualified classname for the entity type targeted in this custom field- Returns:
-