Interface LayoutDefinition

All Superinterfaces:
Serializable
All Known Implementing Classes:
LayoutDefinitionImpl

public interface LayoutDefinition extends Serializable
Layout definition interface.
Author:
Anahide Tchertchian
  • Method Details

    • 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']].

    • setRows

      void setRows(LayoutRowDefinition[] rows)
      Since:
      5.5
    • getColumns

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

      Map<String,Serializable> getProperties(String layoutMode)
      Returns a map of properties to use in a given mode.
    • getProperties

      Map<String,Map<String,Serializable>> getProperties()
      Returns a map of properties by mode.
    • setProperties

      void setProperties(Map<String,Map<String,Serializable>> properties)
      Since:
      5.5
    • 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
    • setRenderingInfos

      void setRenderingInfos(Map<String,List<RenderingInfo>> renderingInfos)
      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

      Returns a clone instance of this layout definition.

      Useful for conversion of layout definition during export.

      Since:
      5.5