Interface EclibItemContainer


public interface EclibItemContainer
Accepts and store data from user input, external system, and so on.

This is an interface, not a class because record can be customized according to the specification of page templates. Each record in apps always extends EclibRecord or its extended class, so interface is needed to customize records.
At that time in that interface you want to record feature like getItems(), but if this is a class it can't be used.

It is frequently validated with jakarta validation. So it should have features below.

  • To resolve item name from propertyPath. getItems() is used for it.
    It's used especially for error message to users.
  • Method Details

    • getItems

      EclibItem[] getItems()
      Returns an array of items.
    • getNewItem

      default EclibItem getNewItem(String itemPropertyPath)
      Returns a new instance.
    • getItem

      default EclibItem getItem(String itemPropertyPath)
      Returns EclibItem from EclibItem[] and fieldId.
      Parameters:
      itemPropertyPath - itemPropertyPath
      Returns:
      HtmlItem
    • mergeItems

      default EclibItem[] mergeItems(EclibItem[] items1, EclibItem[] items2)
      Merge common items and record dependent items.

      This is an utility method so it can be defined in Util class, but it's frequently used in record instance and not used outside so let it be defined here.