001/* 002 * (C) Copyright 2006-2007 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a> 018 * 019 * $Id: LayoutRowDefinition.java 26053 2007-10-16 01:45:43Z atchertchian $ 020 */ 021 022package org.nuxeo.ecm.platform.forms.layout.api; 023 024import java.io.Serializable; 025import java.util.Map; 026 027/** 028 * Layout row definition interface. 029 * 030 * @author <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a> 031 */ 032public interface LayoutRowDefinition extends Serializable { 033 034 /** 035 * Returns the row name 036 */ 037 String getName(); 038 039 /** 040 * Returns the default name for this row, given an index. 041 * 042 * @since 6.0 043 */ 044 String getDefaultName(int index); 045 046 /** 047 * Returns true if this row should be considered selected by default 048 */ 049 boolean isSelectedByDefault(); 050 051 /** 052 * Return true if this row should be considered always selected 053 */ 054 boolean isAlwaysSelected(); 055 056 /** 057 * Returns the row size 058 */ 059 int getSize(); 060 061 /** 062 * Returns the list of widget names to use at a given row. 063 * <p> 064 * For instance, this could describe a layout like: ['title'], or ['creationDate', '', 'modificationDate']. 065 * 066 * @deprecated since 5.5: use {@link #getWidgetReferences()} instead. 067 */ 068 @Deprecated 069 String[] getWidgets(); 070 071 /** 072 * Returns the list of widget references to use at a given row. 073 * 074 * @since 5.5 075 */ 076 WidgetReference[] getWidgetReferences(); 077 078 /** 079 * Returns a map of properties to use in a given mode. 080 */ 081 Map<String, Serializable> getProperties(String layoutMode); 082 083 /** 084 * Returns properties by mode. 085 */ 086 Map<String, Map<String, Serializable>> getProperties(); 087 088 /** 089 * Returns a clone instance of this row definition. 090 * <p> 091 * Useful for conversion of layout definition during export. 092 * 093 * @since 5.5 094 */ 095 LayoutRowDefinition clone(); 096 097}