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:[email protected]">Anahide Tchertchian</a> 018 * 019 * $Id: LayoutRow.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 interface. 029 * <p> 030 * A layout row is a list {@link Widget} instances, built from a {@link LayoutRowDefinition} in a given mode. It gives 031 * information about the widgets presentation. 032 * 033 * @author <a href="mailto:[email protected]">Anahide Tchertchian</a> 034 */ 035public interface LayoutRow extends Serializable { 036 037 String getName(); 038 039 /** 040 * Returns the unique identifier of this widget to be used in tag configuration. 041 * 042 * @since 5.4.2 043 * @see {@link Layout#getTagConfigId()}. 044 */ 045 String getTagConfigId(); 046 047 /** 048 * Returns true if this row should be considered selected by default 049 */ 050 boolean isSelectedByDefault(); 051 052 /** 053 * Return true if this row should be considered always selected 054 */ 055 boolean isAlwaysSelected(); 056 057 Widget[] getWidgets(); 058 059 int getSize(); 060 061 /** 062 * Get properties to use in this mode. 063 * <p> 064 * The way that properties will be mapped to rendered components is managed by the widget type. 065 * 066 * @since 5.3.1 067 */ 068 Map<String, Serializable> getProperties(); 069 070 /** 071 * Returns property with given name in this mode. 072 * 073 * @param name the property name. 074 * @return the property value or null if not found. 075 * @since 5.3.1 076 */ 077 Serializable getProperty(String name); 078 079}