Class SiteLayoutAssembler
java.lang.Object
io.meeds.layout.service.SiteLayoutAssembler
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. A container
or a column addressed by its id keeps its stored element and every option,
styling block or display the call leaves null; 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 container or column at
its index when that one is kept, the call being refused otherwise. A side holding both
an outer and an inner sidebar, which the read reports as one, is refused.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final intstatic final intstatic final intstatic final Stringstatic final Stringstatic final intstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionSiteLayoutAssembler(LayoutModel root, Map<String, Integer> hiddenWindows, LayoutStylingService stylingService, BiFunction<LayoutModel, StylingDestination, StylingDescription> storedStyling, Function<ApplicationDescription, LayoutModel> newApplication) SiteLayoutAssembler(LayoutModel root, Map<String, Integer> hiddenWindows, LayoutStylingService stylingService, BiFunction<LayoutModel, StylingDestination, StylingDescription> storedStyling, Function<ApplicationDescription, LayoutModel> newApplication, ImageConsumption images) -
Method Summary
-
Field Details
-
SITE_TEMPLATE
- See Also:
-
SITE_MIDDLE_TEMPLATE
- See Also:
-
SITE_MIDDLE_CENTER_TEMPLATE
- See Also:
-
SIDEBAR_TEMPLATE
- See Also:
-
SIDEBAR_CELL_TEMPLATE
- See Also:
-
BANNER_TEMPLATE
- See Also:
-
BANNER_CELL_TEMPLATE
- See Also:
-
STICKY_SECTION_TOKEN
- See Also:
-
BANNER_TOP_TOKEN
- See Also:
-
BANNER_BOTTOM_TOKEN
- See Also:
-
SITE_LAYOUT_NOT_EDITABLE
- See Also:
-
TWO_LEFT_SIDEBARS
- See Also:
-
TWO_RIGHT_SIDEBARS
- See Also:
-
STYLING_NOT_ACCEPTED
- See Also:
-
ELEMENTS_NOT_ACCEPTED
- See Also:
-
SITE_LAYOUT_HIDDEN
- See Also:
-
CONTAINER_NOT_FOUND
- See Also:
-
CONTAINER_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:
-
TOPBARS_NOT_ACCEPTED
- See Also:
-
BOTTOM_BARS_NOT_ACCEPTED
- See Also:
-
HEIGHT_NOT_ACCEPTED
- See Also:
-
WIDTH_NOT_ACCEPTED
- See Also:
-
FULL_HEIGHT_NOT_ACCEPTED
- See Also:
-
DISPLAY_NOT_ACCEPTED
- See Also:
-
STICKY_NOT_ACCEPTED
- See Also:
-
APPLICATION_DISPLAY_NOT_ACCEPTED
- See Also:
-
COLUMNS_NOT_ACCEPTED
- See Also:
-
COLUMN_ID_NOT_ACCEPTED
- See Also:
-
COLUMN_NOT_FOUND
- See Also:
-
COLUMN_WIDTH_NOT_ACCEPTED
- See Also:
-
COLUMN_FIT_CONTENT_NOT_ACCEPTED
- See Also:
-
FIT_CONTENT
- See Also:
-
COLUMN_APPLICATIONS_NOT_ACCEPTED
- See Also:
-
DEFAULT_BANNER_HEIGHT
public static final int DEFAULT_BANNER_HEIGHT- See Also:
-
BANNER_HEIGHT_MAX
public static final int BANNER_HEIGHT_MAX- See Also:
-
DEFAULT_SIDEBAR_WIDTH
public static final int DEFAULT_SIDEBAR_WIDTH- See Also:
-
SIDEBAR_WIDTH_MIN
public static final int SIDEBAR_WIDTH_MIN- See Also:
-
SIDEBAR_WIDTH_MAX
public static final int SIDEBAR_WIDTH_MAX- See Also:
-
MAX_BANNERS
public static final int MAX_BANNERS- See Also:
-
MAX_COLUMNS
public static final int MAX_COLUMNS- See Also:
-
COLUMN_WIDTH_MIN
public static final int COLUMN_WIDTH_MIN- See Also:
-
COLUMN_WIDTH_MAX
public static final int COLUMN_WIDTH_MAX- See Also:
-
MAX_APPLICATIONS
public static final int MAX_APPLICATIONS- See Also:
-
MAX_ELEMENTS
public static final int MAX_ELEMENTS- See Also:
-
TITLE_MAX_LENGTH
public static final int TITLE_MAX_LENGTH- See Also:
-
-
Constructor Details
-
SiteLayoutAssembler
public SiteLayoutAssembler(LayoutModel root, Map<String, Integer> hiddenWindows, LayoutStylingService stylingService, BiFunction<LayoutModel, StylingDestination, StylingDescription> storedStyling, Function<ApplicationDescription, LayoutModel> newApplication) - Parameters:
root- the stored tree, 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_site 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
-
SiteLayoutAssembler
public SiteLayoutAssembler(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(SiteLayoutUpdate update) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-