Package com.onec.ui
Class RelatedListReader
java.lang.Object
com.onec.ui.RelatedListReader
Resolves and reads the rows of a related-list panel for any owning entity — catalog
or document — over any junction — join catalog or information register.
Centralizes what the catalog/document REST
related endpoints and the detail-surface
preload all need, so the resolution (which panel, which junction, which via column,
may the caller read it) lives in one place rather than being copied per caller.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRelatedListReader(FieldHintResolver fieldHints, MetadataRegistry registry, CatalogQueryService catalogQuery, InformationRegisterQueryService registerQuery, UiAccessService access) -
Method Summary
Modifier and TypeMethodDescriptionpreloadForDetail(Class<?> parentClass, UUID parentId, Principal principal) Preloads the read-only rows for every panel that should render onparentClass's detail surface, keyed by panel name.rows(Class<?> parentClass, String parentLogicalName, String relatedName, UUID parentId, Principal principal) Live rows of the panelrelatedNamedeclared onparentClass, scoped to recordparentId— the REST read path the form widget drives.
-
Constructor Details
-
RelatedListReader
public RelatedListReader(FieldHintResolver fieldHints, MetadataRegistry registry, CatalogQueryService catalogQuery, InformationRegisterQueryService registerQuery, UiAccessService access)
-
-
Method Details
-
rows
public List<Map<String,Object>> rows(Class<?> parentClass, String parentLogicalName, String relatedName, UUID parentId, Principal principal) Live rows of the panelrelatedNamedeclared onparentClass, scoped to recordparentId— the REST read path the form widget drives. Throws404when no such panel exists, the junction is unregistered, or itsviaref is gone;403when the caller may not read the junction. The owning entity's own read access is enforced by the controller before this is called. -
preloadForDetail
public Map<String,List<Map<String, preloadForDetailObject>>> (Class<?> parentClass, UUID parentId, Principal principal) Preloads the read-only rows for every panel that should render onparentClass's detail surface, keyed by panel name. Mirrorsrows(java.lang.Class<?>, java.lang.String, java.lang.String, java.util.UUID, java.security.Principal)but degrades gracefully — a panel that opts out of detail (hideInDetail), names a junction that vanished, has noviaref, or the caller may not read is simply skipped, never breaking the surface.
-