Interface LayoutDefinition

    • Method Detail

      • getName

        String getName()
        Returns the layout name used to identify it within the layout service.
      • setName

        void setName​(String name)
        Since:
        5.5
      • getType

        String getType()
        Return the layout type, or null if not defined.

        Since 6.0, the layout type can hold templates and properties configuration, so that layout does not need to define them again.

        Since:
        6.0
      • getTypeCategory

        String getTypeCategory()
        Since:
        6.0
      • getTemplate

        String getTemplate​(String mode)
        Returns template to use in a given mode.
      • getTemplates

        Map<String,​String> getTemplates()
        Returns templates by mode
      • setTemplates

        void setTemplates​(Map<String,​String> templates)
        Since:
        5.5
      • getWidgetDefinition

        WidgetDefinition getWidgetDefinition​(String name)
        Returns the widget definition with given name.

        Returns null if a widget with this name is not found within the layout.

      • getWidgetDefinitions

        Map<String,​WidgetDefinition> getWidgetDefinitions()
        Returns the map of widgets defined inside this layout.
        Since:
        8.1
      • getRows

        LayoutRowDefinition[] getRows()
        Returns the list of widget names to use at a given row.

        For instance, this could describe a layout like: [['title'], ['description'], ['creationDate', '', 'modificationDate'], ['subject']].

      • getColumns

        int getColumns()
        Returns the maximum number of columns.
      • getRenderingInfos

        Map<String,​List<RenderingInfo>> getRenderingInfos()
        Returns the map of rendering information per mode.

        Useful for preview management where some configuration needs to be changed: what's changed can be set as rendering information here to be displayed.

        Since:
        5.5
      • getRenderingInfos

        List<RenderingInfo> getRenderingInfos​(String mode)
        Returns the list of rendering information for given mode.
        Since:
        5.5
      • getAliases

        List<String> getAliases()
        Return alias names for this layout definition (useful for compatibility on old layout names).
        Since:
        6.0
      • isEmpty

        boolean isEmpty()
        Returns true if all widget references in this layout are empty
        Since:
        5.6
      • isDynamic

        boolean isDynamic()
        Since:
        6.0
      • clone

        LayoutDefinition clone()
        Returns a clone instance of this layout definition.

        Useful for conversion of layout definition during export.

        Since:
        5.5