001/* 002 * (C) Copyright 2006-2007 Nuxeo SAS (http://nuxeo.com/) and contributors. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser General Public License 006 * (LGPL) version 2.1 which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/lgpl.html 008 * 009 * This library is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 * Lesser General Public License for more details. 013 * 014 * Contributors: 015 * <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a> 016 * 017 * $Id: LayoutRow.java 26053 2007-10-16 01:45:43Z atchertchian $ 018 */ 019 020package org.nuxeo.ecm.platform.forms.layout.api; 021 022import java.io.Serializable; 023import java.util.Map; 024 025/** 026 * Layout row interface. 027 * <p> 028 * A layout row is a list {@link Widget} instances, built from a {@link LayoutRowDefinition} in a given mode. It gives 029 * information about the widgets presentation. 030 * 031 * @author <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a> 032 */ 033public interface LayoutRow extends Serializable { 034 035 String getName(); 036 037 /** 038 * Returns the unique identifier of this widget to be used in tag configuration. 039 * 040 * @since 5.4.2 041 * @see {@link Layout#getTagConfigId()}. 042 */ 043 String getTagConfigId(); 044 045 /** 046 * Returns true if this row should be considered selected by default 047 */ 048 boolean isSelectedByDefault(); 049 050 /** 051 * Return true if this row should be considered always selected 052 */ 053 boolean isAlwaysSelected(); 054 055 Widget[] getWidgets(); 056 057 int getSize(); 058 059 /** 060 * Get properties to use in this mode. 061 * <p> 062 * The way that properties will be mapped to rendered components is managed by the widget type. 063 * 064 * @since 5.3.1 065 */ 066 Map<String, Serializable> getProperties(); 067 068 /** 069 * Returns property with given name in this mode. 070 * 071 * @param name the property name. 072 * @return the property value or null if not found. 073 * @since 5.3.1 074 */ 075 Serializable getProperty(String name); 076 077}