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 Summary
Modifier and TypeMethodDescriptiondefault EclibItemReturnsEclibItemfromEclibItem[]andfieldId.getItems()Returns an array of items.default EclibItemgetNewItem(String itemPropertyPath) Returns a new instance.default EclibItem[]mergeItems(EclibItem[] items1, EclibItem[] items2) Merge common items and record dependent items.
-
Method Details
-
getItems
Returns an array of items. -
getNewItem
Returns a new instance. -
getItem
ReturnsEclibItemfromEclibItem[]andfieldId.- Parameters:
itemPropertyPath- itemPropertyPath- Returns:
- HtmlItem
-
mergeItems
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.
-