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