Class PageLayoutAssembler
java.lang.Object
io.meeds.layout.service.PageLayoutAssembler
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. A
section or a cell addressed by its id keeps its stored element and every
styling block the call leaves null, a kept dynamic section its cells when
its column count is unchanged; an application addressed by its id keeps
its window the same way; a window the caller cannot see, which the call
can neither address nor move, stays in its cell at its index when that
cell is kept, the call being refused otherwise.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final String[]static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final intstatic final Stringstatic final StringThe tools that change a layout around the elements the caller cannot see, which a refusal of a whole-layout write points tostatic final Stringstatic final Stringstatic final intstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionPageLayoutAssembler(LayoutModel root, Map<String, Integer> hiddenWindows, LayoutStylingService stylingService, BiFunction<LayoutModel, StylingDestination, StylingDescription> storedStyling, Function<ApplicationDescription, LayoutModel> newApplication) PageLayoutAssembler(LayoutModel root, Map<String, Integer> hiddenWindows, LayoutStylingService stylingService, BiFunction<LayoutModel, StylingDestination, StylingDescription> storedStyling, Function<ApplicationDescription, LayoutModel> newApplication, ImageConsumption images) -
Method Summary
-
Field Details
-
SECTIONS_PARENT_TEMPLATE
- See Also:
-
FLEX_SECTION_CLASS
- See Also:
-
FLEX_SECTION_CLASS_NOT_STICKY
- See Also:
-
STICKY_APPLICATION_TOKEN
- See Also:
-
GRID_SECTION_CLASS
- See Also:
-
FLEX_CELL_TOKEN
- See Also:
-
GRID_CELL_TOKEN
- See Also:
-
BREAKPOINTS
-
DYNAMIC_COLUMNS
-
GRID_MAX
public static final int GRID_MAX- See Also:
-
GRID_COLUMNS
public static final int GRID_COLUMNS- See Also:
-
MAX_SECTIONS
public static final int MAX_SECTIONS- See Also:
-
MAX_ELEMENTS
public static final int MAX_ELEMENTS- See Also:
-
TITLE_MAX_LENGTH
public static final int TITLE_MAX_LENGTH- See Also:
-
HIDDEN_ELEMENTS_HINT
The tools that change a layout around the elements the caller cannot see, which a refusal of a whole-layout write points to- See Also:
-
PAGE_LAYOUT_HIDDEN
- See Also:
-
KEEP_CELL_FORMAT
- See Also:
-
KEEP_SECTION_FORMAT
- See Also:
-
SECTIONS_NOT_ACCEPTED
- See Also:
-
ELEMENTS_NOT_ACCEPTED
- See Also:
-
TYPE_NOT_ACCEPTED
- See Also:
-
COLUMNS_NOT_ACCEPTED
- See Also:
-
ROWS_NOT_ACCEPTED
- See Also:
-
COLUMNS_CONTENT_NOT_ACCEPTED
- See Also:
-
CELLS_NOT_ACCEPTED
- See Also:
-
CELL_TAKEN
- See Also:
-
SECTION_NOT_FOUND
- See Also:
-
SECTION_ID_NOT_ACCEPTED
- See Also:
-
CELL_NOT_FOUND
- See Also:
-
CELL_ID_NOT_ACCEPTED
- See Also:
-
APPLICATION_NOT_FOUND
- See Also:
-
APPLICATION_ID_NOT_ACCEPTED
- See Also:
-
APPLICATIONS_NOT_ACCEPTED
- See Also:
-
TITLE_NOT_ACCEPTED
- See Also:
-
DISPLAY_NOT_ACCEPTED
- See Also:
-
-
Constructor Details
-
PageLayoutAssembler
public PageLayoutAssembler(LayoutModel root, Map<String, Integer> hiddenWindows, LayoutStylingService stylingService, BiFunction<LayoutModel, StylingDestination, StylingDescription> storedStyling, Function<ApplicationDescription, LayoutModel> newApplication) - Parameters:
root- the stored page, wrappedhiddenWindows- the storage id of each window the caller cannot see, with its index in its containerstylingService- the styling writerstoredStyling- reads an element's stored styling as get_page_layout answers it, the base a call's description is merged overnewApplication- builds the window of an application the call adds, from its instance or content id
-
PageLayoutAssembler
public PageLayoutAssembler(LayoutModel root, Map<String, Integer> hiddenWindows, LayoutStylingService stylingService, BiFunction<LayoutModel, StylingDestination, StylingDescription> storedStyling, Function<ApplicationDescription, LayoutModel> newApplication, ImageConsumption images) - Parameters:
images- the call's image consumption, on which a block carrying an image_upload_id claims its id
-
-
Method Details
-
assemble
public LayoutModel assemble(List<SectionDescription> sections) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-