001/*
002 * (C) Copyright 2006-2008 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$
020 *
021 */
022package org.nuxeo.ecm.platform.pictures.tiles.api;
023
024import java.io.IOException;
025import java.util.Map;
026
027import org.nuxeo.ecm.core.api.Blob;
028import org.nuxeo.ecm.platform.picture.api.ImageInfo;
029
030/**
031 * Interface for a collection of Tiles in a given format. Wraps underlying calls to the TilingService
032 *
033 * @author tiry
034 */
035public interface PictureTiles {
036
037    Map<String, String> getInfo();
038
039    String getTilesPath();
040
041    Blob getTile(int x, int y) throws IOException;
042
043    float getZoomfactor();
044
045    int getXTiles();
046
047    int getYTiles();
048
049    void release();
050
051    int getTilesHeight();
052
053    int getTilesWidth();
054
055    int getMaxTiles();
056
057    String getCacheKey();
058
059    void setCacheKey(String cacheKey);
060
061    ImageInfo getSourceImageInfo();
062
063    void setSourceImageInfo(ImageInfo imageInfo);
064
065    ImageInfo getOriginalImageInfo();
066
067    void setOriginalImageInfo(ImageInfo imageInfo);
068
069    String getTileFormatCacheKey();
070
071    boolean isTileComputed(int x, int y);
072
073}