Package io.meeds.layout.service
package io.meeds.layout.service
-
ClassDescriptionThe registry of the
ApplicationCodePlugins, keyed by portlet name, and the read the layout descriptions make through them: a window whose portlet has no plugin has no code to describeResolves the windows a tool write addresses on the user's layout, the way every draft tool does: the layout read is the user's draft when their co-editing revision names one, the published layout otherwise; an id the read does not show does not exist, a container id is refused; and when no draft exists yet the write creates it first and finds each window again on the draft at the place its live window held.The registry of the application settings plugins and the rules every configuration of placed applications follows: an application without a plugin is not configurable, every application is validated before the first one is applied, each one is applied through its plugin while its window is locked on this node, and a failure after the first apply names the applications already applied, nothing being undone.Converts a page or site container tree into the description the MCP tools return.Resolves the draft a user is editing through the co-editing revision the layout editors record, never through a draft page or a draft site found in storage: the editors re-clone the live layout whenever no revision names a draft, so a leftover draft is a stale copy nobody edits.The images a layout write consumes, as the editor's background inputs save them: each upload id of the call is resolved while the description is applied and before any write, then saved as an attachment of its background keyed on the live page or site, as the user, through the attachment service's edit check; the attachment URL replaces the placeholder in the layout before the draft is written; the upload resources are released whether the write succeeds or fails, and the attachments created are deleted when the write that follows them fails.Places, moves or removes one application of a stored page or site tree, for one move_layout_application or remove_layout_application call, every other element staying where it is stored.Writes the styling of a set_layout_styles call, or the device visibility of a set_layout_visibility call, onto a stored page or site tree, for one call, leaving its structure and every element the call does not address as stored.Writes a styling description onto a layout element exactly as the editor's styling inputs do, the inverse of LayoutDescriptionService.toStyling: the vocabulary is checked block by block against the destination's matrix before a field is written; a block, a text role or a text background the call leaves null is not written at all, a block whose enabled flag is false clears its fields, and a value outside the vocabulary is refused naming its path.Updates what the topbar and the sidebar show the way the navigation settings page does: the stored configuration is loaded unresolved, the given options are merged into it, and the whole is submitted with both parts, since the navigation configuration service stores whatever it is given and reads the sidebar after the write.Rebuilds a page's sections from a set_page_layout call, for one call: the page's ancestors down to the sections parent are kept from the stored tree and the parent's children are written in the order given, as the page editor's newSection and newCell shape them: a dynamic section is a FlexContainer over one CellContainer per column, each spanning 12 / N of the grid; a grid section is a GridContainer over the editor's full matrix of CellContainers in reading order, a described cell at its row and column with its spans and an empty cell at every position no cell covers.Rebuilds a site layout tree from a set_site_layout call, for one call: the root, the middle body, its center and the page body are kept from the stored tree, the four sidebar slots are always written (empty when unused) and the banners are written in the order given, as the site layout editor's parseSite and newSite shape them, each with the columns given.Thrown when the layout of a site couldn't be read: the site is read with an empty layout, which an edit or a copy of the site would write over a stored one.Updates one part of the theme the way the Branding page's Apply button does: the whole branding is loaded, the part's options and resets are merged into it, and the whole is submitted, so that every field the caller did not name keeps its stored value although the branding service replaces the whole.