Package com.onec.ui
Class DivKitController
java.lang.Object
com.onec.ui.DivKitController
Emits the server-rendered DivKit app, split so the client can render instantly
and load data lazily:
/shell returns the chrome (top bar + nav, no data
— fast), and each content endpoint returns just that surface's card. The client
paints the shell immediately and streams content in beneath it behind a
skeleton. Everything is resolved for the caller's persona, intersected with
RBAC, in the requested theme/viewport — the same hooks a Flutter client uses.-
Constructor Summary
ConstructorsConstructorDescriptionDivKitController(LayoutSet layoutSet, UiLayoutResolver layoutResolver, UiProfileResolver profileResolver, UiAccessService access, CurrentUserResolver currentUserResolver, ResolvedMetadataService resolvedMetadata, UiViewResolver viewResolver, PageResolver pageResolver, CatalogQueryService catalogQuery, DocumentQueryService documentQuery, RegisterQueryService registerQuery, UiActionResolver actionResolver, RelatedListReader relatedLists, UiProperties uiProperties, org.springframework.beans.factory.ObjectProvider<CommentProperties> commentProperties) -
Method Summary
Modifier and TypeMethodDescriptioncatalogDuplicate(String name, UUID id, Principal principal) catalogEdit(String name, UUID id, Principal principal) catalogList(String name, String profile, String theme, Principal principal) catalogNew(String name, Principal principal) documentDetail(String name, UUID id, String theme, Principal principal) documentDuplicate(String name, UUID id, Principal principal) documentEdit(String name, UUID id, Principal principal) documentList(String name, String profile, String theme, Principal principal) documentNew(String name, Principal principal) The mobile "More" hub: the full navigation (grouped by section) plus the account block.pageAction(String route, String key, String profile, String viewport, Map<String, Object> body, Principal principal) Run a page action button's server handler — the обработка-style logic declared viaPageBuilder.actions(java.lang.String, java.util.function.Consumer<com.onec.ui.ActionSpec>).The Settings surface — opt-in viaonec.ui.settings.enabled(off by default).
-
Constructor Details
-
DivKitController
public DivKitController(LayoutSet layoutSet, UiLayoutResolver layoutResolver, UiProfileResolver profileResolver, UiAccessService access, CurrentUserResolver currentUserResolver, ResolvedMetadataService resolvedMetadata, UiViewResolver viewResolver, PageResolver pageResolver, CatalogQueryService catalogQuery, DocumentQueryService documentQuery, RegisterQueryService registerQuery, UiActionResolver actionResolver, RelatedListReader relatedLists, UiProperties uiProperties, org.springframework.beans.factory.ObjectProvider<CommentProperties> commentProperties)
-
-
Method Details
-
shell
-
account
-
home
-
settings
@GetMapping("/settings") public Map<String,Object> settings(@RequestParam(required=false) String profile, @RequestParam(required=false) String viewport, @RequestParam(required=false) String theme, Principal principal) The Settings surface — opt-in viaonec.ui.settings.enabled(off by default). An app can author its ownPageat route"/settings"to compose lists/widgets next to (or instead of) the constant editor, and that authored page renders regardless of the flag; the built-in default page (the constant editor) is gated on the flag. With neither, the route is404. -
pageAction
@PostMapping("/page-action") public ActionResult pageAction(@RequestParam String route, @RequestParam String key, @RequestParam(required=false) String profile, @RequestParam(required=false) String viewport, @RequestBody(required=false) Map<String, Object> body, Principal principal) Run a page action button's server handler — the обработка-style logic declared viaPageBuilder.actions(java.lang.String, java.util.function.Consumer<com.onec.ui.ActionSpec>). The button posts the pagerouteand actionkey; we re-resolve and re-compose the page (compose is a pure spec build, like the GET render), find the handler by key, and return itsActionResult. Page actions have no entity to gate on, so we require an authenticated user and leave finer authorization to the handler. -
catalogList
-
catalogDetail
-
catalogNew
-
catalogEdit
-
catalogDuplicate
-
documentList
-
documentDetail
-
documentNew
-
documentEdit
-
documentDuplicate
-
registerReport
-