Interface RuleBuilderField<F extends RuleBuilderField<F>>
- All Superinterfaces:
BuilderFieldSource<F>
,Comparable<F>
,Component<F>
,Copyable<F>
,Field<F>
,FormComponent<F>
,Serializable
- All Known Implementing Classes:
DefaultRuleBuilderField
public interface RuleBuilderField<F extends RuleBuilderField<F>>
extends Field<F>, BuilderFieldSource<F>
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
static final class
-
Field Summary
Fields inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.BuilderFieldSource
FIELD_NAME_PATTERN, FIELD_NAME_REGEX
-
Method Summary
Modifier and TypeMethodDescriptiondefault F
Add a field as a child to the current fieldField
.default F
Add a field as a child to the current field with the provided name.default F
Add a field as a child to the current field with the provided name andField
.default F
addFields
(Collection<Field<?>> fields) Add a collection of fields as children to the current field.Finds a field with the specified name.default Field<?>
Gets a field with the specified name.default boolean
Overrides the default implementation so that this returns true unlessBuilderFieldSource.Attributes.ALLOW_CUSTOM_FIELDS
is set.default F
quantityFieldName
(String fieldName) When the rulebuilder is marked with `showQuantity`, this field overrides the quantity field name.default F
Indicates that the rule builder should show a "quantity of matches" field.Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.BuilderFieldSource
addAugmentationFieldSource, addAugmentationFieldSource, addAugmentationFieldSource, addAugmentationFieldSource, allowCustomFields, allowCustomFields, getContainerKey, isStripAttributes, notAllowCustomFields, processFieldName
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.Component
addAction, addAction, addComponent, addEndpoint, addEndpoint, apply, attribute, augmentationKey, classifier, clearConditionals, clearEndpoints, conditional, conditionals, description, description, findAction, findAction, findActions, findAttribute, findAttribute, findComponent, findComponent, findComponents, findEndpoint, findEndpoint, findEndpoint, findEndpoints, get, get, getAction, getAction, getActions, getActionsList, getAttribute, getAttribute, getAttributes, getAugmentationKey, getClassifier, getComponent, getComponent, getComponents, getComponentsList, getConditionals, getDescription, getEndpoint, getEndpoint, getEndpoints, getEndpointsList, getId, getLabel, getOrder, getScope, getType, hasAction, hasAttribute, hasComponent, hasEndpoint, id, isAugmentable, isTranslatable, label, label, notTranslatable, order, removeAction, removeAttribute, removeComponent, removeEndpoint, scope, self, setActions, setAttributes, setAugmentationKey, setClassifier, setComponents, setConditionals, setDescription, setEndpoints, setId, setLabel, setOrder, setScope, setTranslatable, setType, translatable, translatable, type
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.Field
clearReadOnlyConditionals, decorated, decorated, defaultValue, getDefaultValue, getName, getPlaceholder, getReadOnlyConditionals, getRequiredMessage, getValidationSchema, isReadOnly, isRequired, isShowInQueryBuilder, isTargetCollection, name, notReadOnly, notRequired, placeholder, placeholder, readOnly, readOnly, readOnlyConditional, readOnlyConditionals, required, required, required, required, requiredMessage, requiredMessage, setDefaultValue, setName, setPlaceholder, setReadOnly, setReadOnlyConditionals, setRequired, setRequiredMessage, setShowInQueryBuilder, setValidationSchema, targetIsCollection, targetIsNotCollection, validationMethod, validationSchema, validationSchema
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.FormComponent
getHelpText, getHint, getTooltip, helpText, helpText, helpText, hidden, hidden, hint, hint, isHidden, notHidden, setHelpText, setHidden, setHint, setTooltip, tooltip, tooltip
-
Method Details
-
addField
Add a field as a child to the current field with the provided name andField
.- Parameters:
name
- the name of the fieldfield
- the Field object added- Returns:
- this
-
addField
Add a field as a child to the current fieldField
. The field must have a name already attached.- Parameters:
field
- the Field object added- Returns:
- this
-
addField
Add a field as a child to the current field with the provided name. The field is set to astring
and will autogenerate a label based on the name.- Parameters:
name
- the name of the field- Returns:
- this
-
addFields
Add a collection of fields as children to the current field.- Parameters:
fields
- A collection of fields- Returns:
- this
-
findField
Finds a field with the specified name.- Parameters:
name
- the name of the field to find- Returns:
- The field if it is found, otherwise null
-
getField
Gets a field with the specified name.- Parameters:
name
- the name of the field to get- Returns:
- The field if it is found, otherwise throws exception
-
showQuantity
Indicates that the rule builder should show a "quantity of matches" field.- Returns:
- this
-
quantityFieldName
When the rulebuilder is marked with `showQuantity`, this field overrides the quantity field name.- Parameters:
fieldName
- the field name to store the quantity of matches- Returns:
- this
-
isAllowCustomFields
default boolean isAllowCustomFields()Overrides the default implementation so that this returns true unlessBuilderFieldSource.Attributes.ALLOW_CUSTOM_FIELDS
is set.- Specified by:
isAllowCustomFields
in interfaceBuilderFieldSource<F extends RuleBuilderField<F>>
- Returns:
this
.- Since:
- Metadata 2.0.6
-