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.picture.api; 021 022import java.io.Serializable; 023import java.util.Map; 024 025import org.nuxeo.ecm.core.api.Blob; 026 027public interface PictureView { 028 029 String FIELD_TITLE = "title"; 030 031 String FIELD_DESCRIPTION = "description"; 032 033 String FIELD_TAG = "tag"; 034 035 String FIELD_WIDTH = "width"; 036 037 String FIELD_HEIGHT = "height"; 038 039 String FIELD_FILENAME = "filename"; 040 041 String FIELD_CONTENT = "content"; 042 043 String FIELD_INFO = "info"; 044 045 String getTitle(); 046 047 void setTitle(String title); 048 049 String getTag(); 050 051 void setTag(String tag); 052 053 String getDescription(); 054 055 void setDescription(String description); 056 057 int getHeight(); 058 059 void setHeight(int height); 060 061 int getWidth(); 062 063 void setWidth(int width); 064 065 String getFilename(); 066 067 void setFilename(String filename); 068 069 /** 070 * Returns the {@code Blob} of the picture view. 071 * 072 * @deprecated since 7.2, use {@link #getBlob} instead 073 */ 074 Blob getContent(); 075 076 /** 077 * Returns the {@code ImageInfo} of the picture view. 078 * 079 * @since 7.1 080 */ 081 ImageInfo getImageInfo(); 082 083 /** 084 * Sets the {@code ImageInfo} of the picture view. 085 * 086 * @since 7.1 087 */ 088 void setImageInfo(ImageInfo info); 089 090 /** 091 * Returns the {@code Blob} of the picture view. 092 * 093 * @since 5.7 094 */ 095 Blob getBlob(); 096 097 /** 098 * Sets the {@code Blob} of this picture view. 099 * 100 * @since 5.7 101 */ 102 void setBlob(Blob blob); 103 104 105 106 107 /** 108 * Convert this {@code PictureView} as a MAp to be stored inside a document. 109 * 110 * @since 5.7 111 */ 112 Map<String, Serializable> asMap(); 113 114}