Package su.onno.ui
Class UiViewResolver
java.lang.Object
su.onno.ui.UiViewResolver
Resolves a per-entity
EntityView (authored in code) over the
auto-generated metadata defaults into a renderer-agnostic ResolvedListView. Internal
resolution can produce defaults, but routed DivKit surfaces treat the registered views as an
allowlist and call hasView(Class, String) before rendering. The model remains
renderer-neutral.-
Constructor Summary
ConstructorsConstructorDescriptionUiViewResolver(ResolvedMetadataService metadata, List<EntityView> entityViews) Resolver with the built-in 50-row keyset window.UiViewResolver(ResolvedMetadataService metadata, List<EntityView> entityViews, int defaultPageSize) -
Method Summary
Modifier and TypeMethodDescriptioncatalogList(CatalogDescriptor d, String profileId) booleancommentsEnabled(Class<?> entity) Whether comments are enabled for this entity — true if any of its views (default or profile-specific) opts in viaEntityView.comments().documentList(DocumentDescriptor d, String profileId) booleanWhether this entity is declared by a view (profile-specific or default) and may therefore appear in the UI.The entity's conditional row-formatting function (ListSpec.rowStyle(java.util.function.Function<su.onno.ui.ActionRow, su.onno.ui.ListSpec.RowStyle>)), ornullwhen no view declares one.
-
Constructor Details
-
UiViewResolver
Resolver with the built-in 50-row keyset window. -
UiViewResolver
public UiViewResolver(ResolvedMetadataService metadata, List<EntityView> entityViews, int defaultPageSize)
-
-
Method Details
-
catalogList
-
documentList
-
hasView
Whether this entity is declared by a view (profile-specific or default) and may therefore appear in the UI. The view layer is the allowlist: an entity with no view is hidden from nav and its surfaces 404 — only what's authored renders. -
commentsEnabled
Whether comments are enabled for this entity — true if any of its views (default or profile-specific) opts in viaEntityView.comments(). The comment panel and the/api/commentsendpoint are both gated on this, so comments are an opt-in, per-entity capability (on top of the globalonno.comments.enabledswitch). Resolved at the entity level, not per profile. -
rowStyle
The entity's conditional row-formatting function (ListSpec.rowStyle(java.util.function.Function<su.onno.ui.ActionRow, su.onno.ui.ListSpec.RowStyle>)), ornullwhen no view declares one. Resolved at the entity level — the default-profile view first, then any profile-specific one — because the list-data feed that evaluates it has no profile context (mirroring howUiActionResolveraggregates actions across views).
-