001/* 002 * (C) Copyright 2006-2008 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$ 018 * 019 */ 020package org.nuxeo.ecm.platform.pictures.tiles.api; 021 022import java.util.Map; 023 024import org.nuxeo.ecm.core.api.Blob; 025import org.nuxeo.ecm.platform.pictures.tiles.api.imageresource.ImageResource; 026 027/** 028 * Interface for the Service that generate the PictureTiles. 029 * 030 * @author tiry 031 */ 032public interface PictureTilingService { 033 034 /** 035 * Gets the picture tiles from a blob. 036 * 037 * @param blob 038 * @param tileWidth 039 * @param tileHeight 040 * @param maxTiles 041 * @return 042 */ 043 @Deprecated 044 PictureTiles getTilesFromBlob(Blob blob, int tileWidth, int tileHeight, int maxTiles); 045 046 /** 047 * Gets the picture tiles from a blob Tiles are lazily generated. 048 * 049 * @param blob 050 * @param tileWidth 051 * @param tileHeight 052 * @param maxTiles 053 * @param progressive 054 * @return 055 */ 056 @Deprecated 057 PictureTiles getTilesFromBlob(Blob blob, int tileWidth, int tileHeight, int maxTiles, int xCenter, int yCenter, 058 boolean fullGeneration); 059 060 PictureTiles completeTiles(PictureTiles existingTiles, int xCenter, int yCenter); 061 062 PictureTiles getTiles(ImageResource resource, int tileWidth, int tileHeight, int maxTiles); 063 064 PictureTiles getTiles(ImageResource resource, int tileWidth, int tileHeight, int maxTiles, int xCenter, 065 int yCenter, boolean fullGeneration); 066 067 void setWorkingDirPath(String path); 068 069 Map<String, String> getBlobProperties(); 070 071 String getBlobProperty(String docType); 072 073 String getBlobProperty(String docType, String defaultValue); 074 075 void removeCacheEntry(ImageResource resource); 076 077}