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    Blob getContent();
077
078    /**
079     * Returns the {@code ImageInfo} of the picture view.
080     *
081     * @since 7.1
082     */
083    ImageInfo getImageInfo();
084
085    /**
086     * Sets the {@code ImageInfo} of the picture view.
087     *
088     * @since 7.1
089     */
090    void setImageInfo(ImageInfo info);
091
092    /**
093     * Returns the {@code Blob} of the picture view.
094     *
095     * @since 5.7
096     */
097    Blob getBlob();
098
099    /**
100     * Sets the {@code Blob} of this picture view.
101     *
102     * @since 5.7
103     */
104    void setBlob(Blob blob);
105
106
107
108
109    /**
110     * Convert this {@code PictureView} as a MAp to be stored inside a document.
111     *
112     * @since 5.7
113     */
114    Map<String, Serializable> asMap();
115
116}