Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.forms.layout.api.impl
Class LayoutImpl

java.lang.Object
  extended by org.nuxeo.ecm.platform.forms.layout.api.impl.LayoutImpl
All Implemented Interfaces:
java.io.Serializable, Layout

public class LayoutImpl
extends java.lang.Object
implements Layout

Implementation for layouts.

Author:
Anahide Tchertchian
See Also:
Serialized Form

Constructor Summary
LayoutImpl(java.lang.String name, java.lang.String mode, java.lang.String template, java.util.List<LayoutRow> rows, int columns)
           
LayoutImpl(java.lang.String name, java.lang.String mode, java.lang.String template, java.util.List<LayoutRow> rows, int columns, java.util.Map<java.lang.String,java.io.Serializable> properties)
           
 
Method Summary
 int getColumns()
          Returns the maximum number of columns.
 java.lang.String getId()
          Returns the layout id, unique within the facelet context.
 java.lang.String getMode()
          Returns the layout mode.
 java.lang.String getName()
          Returns the layout name used to identify it within the layout service.
 java.util.Map<java.lang.String,java.io.Serializable> getProperties()
          Get properties to use in this mode.
 java.io.Serializable getProperty(java.lang.String name)
          Returns property with given name in this mode.
 LayoutRow[] getRows()
          Returns the table of widgets.
 java.lang.String getTemplate()
          Returns the template used to render widgets.
 Widget getWidget(java.lang.String name)
          Returns widget with given name.
 java.util.Map<java.lang.String,Widget> getWidgetMap()
          Returns a widget map, with widget name as key.
 void setId(java.lang.String id)
          Sets the layout id, unique within the facelet context.
 void setProperty(java.lang.String name, java.io.Serializable value)
          Sets property with given name on the layout.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LayoutImpl

public LayoutImpl(java.lang.String name,
                  java.lang.String mode,
                  java.lang.String template,
                  java.util.List<LayoutRow> rows,
                  int columns)

LayoutImpl

public LayoutImpl(java.lang.String name,
                  java.lang.String mode,
                  java.lang.String template,
                  java.util.List<LayoutRow> rows,
                  int columns,
                  java.util.Map<java.lang.String,java.io.Serializable> properties)
Method Detail

getId

public java.lang.String getId()
Description copied from interface: Layout
Returns the layout id, unique within the facelet context.

Specified by:
getId in interface Layout

setId

public void setId(java.lang.String id)
Description copied from interface: Layout
Sets the layout id, unique within the facelet context.

Specified by:
setId in interface Layout

getName

public java.lang.String getName()
Description copied from interface: Layout
Returns the layout name used to identify it within the layout service.

Specified by:
getName in interface Layout

getMode

public java.lang.String getMode()
Description copied from interface: Layout
Returns the layout mode.

Specified by:
getMode in interface Layout

getTemplate

public java.lang.String getTemplate()
Description copied from interface: Layout
Returns the template used to render widgets.

Specified by:
getTemplate in interface Layout

getRows

public LayoutRow[] getRows()
Description copied from interface: Layout
Returns the table of widgets.

This list is computed from the LayoutDefinition rows.

Widgets that are not found are ignored.

Specified by:
getRows in interface Layout

getColumns

public int getColumns()
Description copied from interface: Layout
Returns the maximum number of columns.

Specified by:
getColumns in interface Layout

getWidget

public Widget getWidget(java.lang.String name)
Description copied from interface: Layout
Returns widget with given name.

Only widgets of the first level are retrieved.

Specified by:
getWidget in interface Layout

getWidgetMap

public java.util.Map<java.lang.String,Widget> getWidgetMap()
Description copied from interface: Layout
Returns a widget map, with widget name as key.

Only widgets of the first level are retrieved.

Specified by:
getWidgetMap in interface Layout

getProperties

public java.util.Map<java.lang.String,java.io.Serializable> getProperties()
Description copied from interface: Layout
Get properties to use in this mode.

The way that properties will be mapped to rendered components is managed by the widget type.

Specified by:
getProperties in interface Layout

getProperty

public java.io.Serializable getProperty(java.lang.String name)
Description copied from interface: Layout
Returns property with given name in this mode.

Specified by:
getProperty in interface Layout
Parameters:
name - the property name.
Returns:
the property value or null if not found.

setProperty

public void setProperty(java.lang.String name,
                        java.io.Serializable value)
Description copied from interface: Layout
Sets property with given name on the layout. If there is already a property with this name on the layout, it will be overridden.

Specified by:
setProperty in interface Layout
Parameters:
name - the property name.
value - the property value or null if not found.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.