Interface LayoutDefinition
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
LayoutDefinitionImpl
public interface LayoutDefinition extends Serializable
Layout definition interface.- Author:
- Anahide Tchertchian
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LayoutDefinition
clone()
Returns a clone instance of this layout definition.List<String>
getAliases()
Return alias names for this layout definition (useful for compatibility on old layout names).int
getColumns()
Returns the maximum number of columns.String
getName()
Returns the layout name used to identify it within the layout service.Map<String,Map<String,Serializable>>
getProperties()
Returns a map of properties by mode.Map<String,Serializable>
getProperties(String layoutMode)
Returns a map of properties to use in a given mode.Map<String,List<RenderingInfo>>
getRenderingInfos()
Returns the map of rendering information per mode.List<RenderingInfo>
getRenderingInfos(String mode)
Returns the list of rendering information for given mode.LayoutRowDefinition[]
getRows()
Returns the list of widget names to use at a given row.String
getTemplate(String mode)
Returns template to use in a given mode.Map<String,String>
getTemplates()
Returns templates by modeString
getType()
Return the layout type, or null if not defined.String
getTypeCategory()
WidgetDefinition
getWidgetDefinition(String name)
Returns the widget definition with given name.Map<String,WidgetDefinition>
getWidgetDefinitions()
Returns the map of widgets defined inside this layout.boolean
isDynamic()
boolean
isEmpty()
Returns true if all widget references in this layout are emptyvoid
setName(String name)
void
setProperties(Map<String,Map<String,Serializable>> properties)
void
setRenderingInfos(Map<String,List<RenderingInfo>> renderingInfos)
void
setRows(LayoutRowDefinition[] rows)
void
setTemplates(Map<String,String> templates)
-
-
-
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
-
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
LayoutDefinition clone()
Returns a clone instance of this layout definition.Useful for conversion of layout definition during export.
- Since:
- 5.5
-
-