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