001/* 002 * (C) Copyright 2006-2016 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:[email protected]">Anahide Tchertchian</a> 018 */ 019package org.nuxeo.ecm.platform.forms.layout.api; 020 021import java.io.Serializable; 022import java.util.Map; 023 024/** 025 * Layout row definition interface. 026 * 027 * @author <a href="mailto:[email protected]">Anahide Tchertchian</a> 028 */ 029public interface LayoutRowDefinition extends Serializable { 030 031 /** 032 * Returns the row name 033 */ 034 String getName(); 035 036 /** 037 * Returns the default name for this row, given an index. 038 * 039 * @since 6.0 040 */ 041 String getDefaultName(int index); 042 043 /** 044 * Returns true if this row should be considered selected by default 045 */ 046 boolean isSelectedByDefault(); 047 048 /** 049 * Return true if this row should be considered always selected 050 */ 051 boolean isAlwaysSelected(); 052 053 /** 054 * Returns the row size 055 */ 056 int getSize(); 057 058 /** 059 * Returns the list of widget references to use at a given row. 060 * 061 * @since 5.5 062 */ 063 WidgetReference[] getWidgetReferences(); 064 065 /** 066 * Returns a map of properties to use in a given mode. 067 */ 068 Map<String, Serializable> getProperties(String layoutMode); 069 070 /** 071 * Returns properties by mode. 072 */ 073 Map<String, Map<String, Serializable>> getProperties(); 074 075 /** 076 * Returns a clone instance of this row definition. 077 * <p> 078 * Useful for conversion of layout definition during export. 079 * 080 * @since 5.5 081 */ 082 LayoutRowDefinition clone(); 083 084}