Package com.onec.ui

Class UiViewResolver

java.lang.Object
com.onec.ui.UiViewResolver

public class UiViewResolver extends Object
Resolves a per-entity EntityView (authored in code) over the auto-generated metadata defaults into a renderer-agnostic ResolvedListView. Entities without an EntityView fall back entirely to the defaults (system + visible custom columns, in field-hint order), so adding a view is purely additive. The DivKit emitter compiles the result; the model is renderer-neutral.
  • Constructor Details

  • Method Details

    • catalogList

      public ResolvedListView catalogList(CatalogDescriptor d, String profileId)
    • documentList

      public ResolvedListView documentList(DocumentDescriptor d, String profileId)
    • hasView

      public boolean hasView(Class<?> entity, String profileId)
      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

      public boolean commentsEnabled(Class<?> entity)
      Whether comments are enabled for this entity — true if any of its views (default or profile-specific) opts in via EntityView.comments(). The comment panel and the /api/comments endpoint are both gated on this, so comments are an opt-in, per-entity capability (on top of the global onec.comments.enabled switch). Resolved at the entity level, not per profile.