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: MimetypeEntry.java 20676 2007-06-17 15:28:28Z sfermigier $ 018 */ 019package org.nuxeo.ecm.platform.mimetype.interfaces; 020 021import java.io.Serializable; 022import java.util.List; 023 024/** 025 * MimetypeEntry entry. 026 * <p> 027 * Holds meta information about a mimetype. 028 * 029 * @author <a href="mailto:ja@nuxeo.com">Julien Anguenot</a> 030 * @author <a href="mailto:lgodard@nuxeo.com">Laurent Godard</a> 031 */ 032public interface MimetypeEntry extends Serializable { 033 034 /** 035 * Returns the mimetype's names. 036 * 037 * @return list of strings containing the mimetype names 038 */ 039 List<String> getMimetypes(); 040 041 /** 042 * Returns the main RFC-2046 name for this mime type. 043 * <p> 044 * If this mime type has several names ('text/restructured', 'text-x-rst'), then this method will always return the 045 * first form. 046 * 047 * @return the main RFC-2046 name for this mime type 048 */ 049 String getNormalized(); 050 051 /** 052 * Returns the major part of the RFC-2046. 053 * 054 * @see #getNormalized() 055 * @return the major part of the RFC-2046 name of this mime type. 056 */ 057 String getMajor(); 058 059 /** 060 * Returns the minor part of the RFC-2046. 061 * 062 * @see #getNormalized() 063 * @return string 064 */ 065 String getMinor(); 066 067 /** 068 * Returns the path of the icon for this mimetype. 069 * 070 * @return String 071 */ 072 String getIconPath(); 073 074 /** 075 * Returns the list of extensions for this mimetype. 076 * 077 * @return list of strings that contain different mimetypes 078 */ 079 List<String> getExtensions(); 080 081 /** 082 * Is this a binary mimetype? 083 * <p> 084 * Might be useful to know if we can read it as human. 085 * 086 * @return boolean 087 */ 088 boolean isBinary(); 089 090 /** 091 * Is this mimetype supported by a LiveEdit plugin? 092 * <p> 093 * Might be useful to know to display the Edit online link. 094 * 095 * @return boolean 096 */ 097 boolean isOnlineEditable(); 098 099 /** 100 * Is this mimetype supported by a oleExtract plugin? 101 * <p> 102 * If the property is true, processes the ole Extraction, otherwise skip. 103 * 104 * @return boolean 105 */ 106 boolean isOleSupported(); 107 108}