Class LayoutRowDefinitionImpl
- java.lang.Object
-
- org.nuxeo.ecm.platform.forms.layout.api.impl.LayoutRowDefinitionImpl
-
- All Implemented Interfaces:
Serializable
,LayoutRowDefinition
public class LayoutRowDefinitionImpl extends Object implements LayoutRowDefinition
Default implementation for a layout row definition.Useful to compute rows independently from the layout service.
- Since:
- 5.4
- Author:
- Anahide Tchertchian, Antoine Taillefer
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
alwaysSelected
protected String
name
protected Map<String,Map<String,Serializable>>
properties
protected boolean
selectedByDefault
protected WidgetReference[]
widgets
-
Constructor Summary
Constructors Modifier Constructor Description protected
LayoutRowDefinitionImpl()
LayoutRowDefinitionImpl(String name, String widget)
LayoutRowDefinitionImpl(String name, String widget, String category)
Instantiates a newLayoutRowDefinitionImpl
with a given widget name and category.LayoutRowDefinitionImpl(String name, Map<String,Map<String,Serializable>> properties, List<WidgetReference> widgets, boolean alwaysSelected, boolean selectedByDefault)
LayoutRowDefinitionImpl(String name, Map<String,Map<String,Serializable>> properties, WidgetReference[] widgets, boolean alwaysSelected, boolean selectedByDefault)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LayoutRowDefinition
clone()
Returns a clone instance of this row definition.boolean
equals(Object obj)
String
getDefaultName(int index)
Returns the default name for this row, given an index.String
getName()
Returns the row nameMap<String,Map<String,Serializable>>
getProperties()
Returns properties by mode.Map<String,Serializable>
getProperties(String layoutMode)
Returns a map of properties to use in a given mode.int
getSize()
Returns the row sizeWidgetReference[]
getWidgetReferences()
Returns the list of widget references to use at a given row.boolean
isAlwaysSelected()
Return true if this row should be considered always selectedboolean
isSelectedByDefault()
Returns true if this row should be considered selected by default
-
-
-
Field Detail
-
name
protected String name
-
properties
protected Map<String,Map<String,Serializable>> properties
-
widgets
protected WidgetReference[] widgets
-
alwaysSelected
protected boolean alwaysSelected
-
selectedByDefault
protected boolean selectedByDefault
-
-
Constructor Detail
-
LayoutRowDefinitionImpl
protected LayoutRowDefinitionImpl()
-
LayoutRowDefinitionImpl
public LayoutRowDefinitionImpl(String name, String widget, String category)
Instantiates a newLayoutRowDefinitionImpl
with a given widget name and category.- Parameters:
name
- the row namewidget
- the widget namecategory
- the category- Since:
- 5.6
-
LayoutRowDefinitionImpl
public LayoutRowDefinitionImpl(String name, Map<String,Map<String,Serializable>> properties, List<WidgetReference> widgets, boolean alwaysSelected, boolean selectedByDefault)
-
LayoutRowDefinitionImpl
public LayoutRowDefinitionImpl(String name, Map<String,Map<String,Serializable>> properties, WidgetReference[] widgets, boolean alwaysSelected, boolean selectedByDefault)
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:LayoutRowDefinition
Returns the row name- Specified by:
getName
in interfaceLayoutRowDefinition
-
getDefaultName
public String getDefaultName(int index)
Description copied from interface:LayoutRowDefinition
Returns the default name for this row, given an index.- Specified by:
getDefaultName
in interfaceLayoutRowDefinition
-
getProperties
public Map<String,Serializable> getProperties(String layoutMode)
Description copied from interface:LayoutRowDefinition
Returns a map of properties to use in a given mode.- Specified by:
getProperties
in interfaceLayoutRowDefinition
-
getProperties
public Map<String,Map<String,Serializable>> getProperties()
Description copied from interface:LayoutRowDefinition
Returns properties by mode.- Specified by:
getProperties
in interfaceLayoutRowDefinition
-
getSize
public int getSize()
Description copied from interface:LayoutRowDefinition
Returns the row size- Specified by:
getSize
in interfaceLayoutRowDefinition
-
getWidgetReferences
public WidgetReference[] getWidgetReferences()
Description copied from interface:LayoutRowDefinition
Returns the list of widget references to use at a given row.- Specified by:
getWidgetReferences
in interfaceLayoutRowDefinition
-
isAlwaysSelected
public boolean isAlwaysSelected()
Description copied from interface:LayoutRowDefinition
Return true if this row should be considered always selected- Specified by:
isAlwaysSelected
in interfaceLayoutRowDefinition
-
isSelectedByDefault
public boolean isSelectedByDefault()
Description copied from interface:LayoutRowDefinition
Returns true if this row should be considered selected by default- Specified by:
isSelectedByDefault
in interfaceLayoutRowDefinition
-
clone
public LayoutRowDefinition clone()
Description copied from interface:LayoutRowDefinition
Returns a clone instance of this row definition.Useful for conversion of layout definition during export.
- Specified by:
clone
in interfaceLayoutRowDefinition
- Overrides:
clone
in classObject
-
-