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: LayoutManager.java 26053 2007-10-16 01:45:43Z atchertchian $ 018 */ 019 020package org.nuxeo.ecm.platform.forms.layout.api.service; 021 022import java.io.Serializable; 023import java.util.List; 024 025import org.nuxeo.ecm.platform.forms.layout.api.LayoutDefinition; 026import org.nuxeo.ecm.platform.forms.layout.api.LayoutTypeDefinition; 027import org.nuxeo.ecm.platform.forms.layout.api.WidgetDefinition; 028import org.nuxeo.ecm.platform.forms.layout.api.WidgetType; 029import org.nuxeo.ecm.platform.forms.layout.api.WidgetTypeDefinition; 030 031/** 032 * Layout manager interface. 033 * <p> 034 * It manages access to layout definitions, widget definitions and widget types for a given category. 035 * 036 * @author <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a> 037 */ 038public interface LayoutManager extends Serializable { 039 040 /** 041 * Return the default category used for storage 042 * 043 * @since 5.5 044 */ 045 String getDefaultStoreCategory(); 046 047 /** 048 * Returns the registered widget type for this type name. 049 * <p> 050 * If the no widget type is found with this name, return null. 051 */ 052 WidgetType getWidgetType(String typeName); 053 054 /** 055 * Returns the widget type definition with given name, or null if no widget type with this name is found. 056 * 057 * @since 5.4 058 */ 059 WidgetTypeDefinition getWidgetTypeDefinition(String typeName); 060 061 /** 062 * Returns the widget type definitions for all the registered widget types. 063 * 064 * @since 5.4 065 */ 066 List<WidgetTypeDefinition> getWidgetTypeDefinitions(); 067 068 /** 069 * Returns the layout type definition with given name, or null if no layout type with this name is found. 070 * 071 * @since 6.0 072 */ 073 LayoutTypeDefinition getLayoutTypeDefinition(String typeName); 074 075 /** 076 * Returns the layout type definitions for all the registered layout types. 077 * 078 * @since 6.0 079 */ 080 List<LayoutTypeDefinition> getLayoutTypeDefinitions(); 081 082 /** 083 * Returns the registered layout definition for this name. 084 * <p> 085 * If the no definition is found with this name, return null. 086 */ 087 LayoutDefinition getLayoutDefinition(String layoutName); 088 089 /** 090 * Returns the names of all the registered layout definitions 091 * 092 * @since 5.5 093 */ 094 List<String> getLayoutDefinitionNames(); 095 096 /** 097 * Returns the registered widget definition for this name. 098 * <p> 099 * If the no definition is found with this name, return null. 100 * 101 * @since 5.1.7, 5.2.0 102 */ 103 WidgetDefinition getWidgetDefinition(String widgetName); 104 105}