Class LayoutPlacementAssembler
java.lang.Object
io.meeds.layout.service.LayoutPlacementAssembler
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. The places addressed are the
ones the read describes: on a page built with the editor's sections, a
column of a dynamic section and a cell of a grid section; on a site, a
column of a topbar or a bottom bar by the banner's id and the column's
number, and a sidebar by the id of its cell, the outer one when a side
holds two. An index counts the
applications the caller can see, every number from 1, and an application
the caller cannot see keeps its stored place among them. A moved
application keeps its window, its preferences and its styling, written
for its new place in the editor's matrix: a block the new place does not
offer is dropped. A grid cell and a column of a topbar or a bottom bar
hold one application: a taken one is refused, never swapped. An
application alone in a column of a topbar or a bottom bar moves to
another column with its own column, which carries the settings the site
layout editor gives it: the two columns swap places. Every value is checked before the tree changes.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLayoutPlacementAssembler(LayoutModel root, boolean site, Set<String> hiddenIds, LayoutStylingService stylingService, LayoutDescriptionService descriptionService) -
Method Summary
Modifier and TypeMethodDescriptionmove(String applicationId, ApplicationPosition position) place(Supplier<LayoutModel> newApplication, ApplicationPosition position)
-
Field Details
-
POSITION_NOT_ACCEPTED
- See Also:
-
CANNOT_BE_PLACED
- See Also:
-
CELL_TAKEN
- See Also:
-
SECTION_NOT_FOUND
- See Also:
-
CONTAINER_NOT_FOUND
- See Also:
-
APPLICATION_NOT_FOUND
- See Also:
-
APPLICATION_ID_NOT_ACCEPTED
- See Also:
-
-
Constructor Details
-
LayoutPlacementAssembler
public LayoutPlacementAssembler(LayoutModel root, boolean site, Set<String> hiddenIds, LayoutStylingService stylingService, LayoutDescriptionService descriptionService) - Parameters:
root- the stored page or site layout, wrappedsite- whether the root is a site layouthiddenIds- the storage id of every element the caller cannot see, an element under a container they cannot see includedstylingService- the styling writerdescriptionService- the reader whose numbering and styling the placement follows
-
-
Method Details
-
move
public PlacedLayout move(String applicationId, ApplicationPosition position) throws org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
place
public PlacedLayout place(Supplier<LayoutModel> newApplication, ApplicationPosition position) throws org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
remove
public LayoutModel remove(String applicationId) throws org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-