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 * Nuxeo - initial API and implementation 016 * 017 * $Id: JOOoConvertPluginImpl.java 18651 2007-05-13 20:28:53Z sfermigier $ 018 */ 019 020package org.nuxeo.ecm.platform.types.adapter; 021 022import java.util.Map; 023 024import org.nuxeo.ecm.platform.forms.layout.api.BuiltinModes; 025import org.nuxeo.ecm.platform.types.SubType; 026import org.nuxeo.ecm.platform.types.TypeView; 027 028/** 029 * Type representation access via document adapter 030 * <p> 031 * Basically presents all useful Type getters. 032 * 033 * @author <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a> 034 */ 035public interface TypeInfo { 036 037 String getIcon(); 038 039 String getIconExpanded(); 040 041 String getBigIcon(); 042 043 String getBigIconExpanded(); 044 045 String getLabel(); 046 047 /** 048 * Returns the type's description. 049 * 050 * @since 5.7 051 */ 052 String getDescription(); 053 054 String getId(); 055 056 /** 057 * Returns layout names for this mode, defaulting to layouts defined for mode {@link BuiltinModes#ANY} 058 */ 059 String[] getLayouts(String mode); 060 061 /** 062 * Returns layout names for this mode, defaulting to layouts defined for given default mode name. 063 * <p> 064 * If parameter "defaultMode" is null, returns only layout defined for given mode. 065 * 066 * @Since 5.3.1 067 */ 068 String[] getLayouts(String mode, String defaultMode); 069 070 String getDefaultView(); 071 072 String getCreateView(); 073 074 String getEditView(); 075 076 TypeView[] getViews(); 077 078 String getView(String viewId); 079 080 Map<String, SubType> getAllowedSubTypes(); 081 082 /** 083 * Returns content views defined on this document type for given category 084 * 085 * @since 5.4 086 */ 087 String[] getContentViews(String category); 088 089 /** 090 * Returns content views defined on this document type for all categories. 091 * 092 * @since 5.4.2 093 */ 094 Map<String, String[]> getContentViews(); 095 096 /** 097 * Returns content views defined on this document type for all categories that are shown in export views. 098 * <p> 099 * Categories holding no content view shown in export views are omitted. 100 * 101 * @since 5.4.2 102 */ 103 Map<String, String[]> getContentViewsForExport(); 104 105}