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: LayoutRowDefinition.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 definition interface. 027 * 028 * @author <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a> 029 */ 030public interface LayoutRowDefinition extends Serializable { 031 032 /** 033 * Returns the row name 034 */ 035 String getName(); 036 037 /** 038 * Returns the default name for this row, given an index. 039 * 040 * @since 6.0 041 */ 042 String getDefaultName(int index); 043 044 /** 045 * Returns true if this row should be considered selected by default 046 */ 047 boolean isSelectedByDefault(); 048 049 /** 050 * Return true if this row should be considered always selected 051 */ 052 boolean isAlwaysSelected(); 053 054 /** 055 * Returns the row size 056 */ 057 int getSize(); 058 059 /** 060 * Returns the list of widget names to use at a given row. 061 * <p> 062 * For instance, this could describe a layout like: ['title'], or ['creationDate', '', 'modificationDate']. 063 * 064 * @deprecated since 5.5: use {@link #getWidgetReferences()} instead. 065 */ 066 @Deprecated 067 String[] getWidgets(); 068 069 /** 070 * Returns the list of widget references to use at a given row. 071 * 072 * @since 5.5 073 */ 074 WidgetReference[] getWidgetReferences(); 075 076 /** 077 * Returns a map of properties to use in a given mode. 078 */ 079 Map<String, Serializable> getProperties(String layoutMode); 080 081 /** 082 * Returns properties by mode. 083 */ 084 Map<String, Map<String, Serializable>> getProperties(); 085 086 /** 087 * Returns a clone instance of this row definition. 088 * <p> 089 * Useful for conversion of layout definition during export. 090 * 091 * @since 5.5 092 */ 093 LayoutRowDefinition clone(); 094 095}