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>
  • Method Details

    • addField

      default F addField(String name, Field<?> field)
      Add a field as a child to the current field with the provided name and Field.
      Parameters:
      name - the name of the field
      field - the Field object added
      Returns:
      this
    • addField

      default F addField(Field<?> field)
      Add a field as a child to the current field Field. The field must have a name already attached.
      Parameters:
      field - the Field object added
      Returns:
      this
    • addField

      default F addField(String name)
      Add a field as a child to the current field with the provided name. The field is set to a string and will autogenerate a label based on the name.
      Parameters:
      name - the name of the field
      Returns:
      this
    • addFields

      default F addFields(Collection<Field<?>> fields)
      Add a collection of fields as children to the current field.
      Parameters:
      fields - A collection of fields
      Returns:
      this
    • findField

      default Optional<Field<?>> findField(String name)
      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

      default Field<?> getField(String name)
      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

      default F showQuantity()
      Indicates that the rule builder should show a "quantity of matches" field.
      Returns:
      this
    • quantityFieldName

      default F quantityFieldName(String fieldName)
      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 unless BuilderFieldSource.Attributes.ALLOW_CUSTOM_FIELDS is set.
      Specified by:
      isAllowCustomFields in interface BuilderFieldSource<F extends RuleBuilderField<F>>
      Returns:
      this.
      Since:
      Metadata 2.0.6