001 /** 002 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.documentlibrary.util; 016 017 import com.liferay.portal.kernel.repository.model.FileEntry; 018 import com.liferay.portal.kernel.repository.model.FileVersion; 019 020 /** 021 * Common interface for all the processors of the document library. All document 022 * library processors must implement this interface. 023 * 024 * @author Alexander Chow 025 * @author Mika Koivisto 026 * @see AudioProcessor 027 * @see DLPreviewableProcessor 028 * @see ImageProcessor 029 * @see PDFProcessor 030 * @see RawMetadataProcessor 031 * @see VideoProcessor 032 */ 033 public interface DLProcessor { 034 035 public void cleanUp(FileEntry fileEntry); 036 037 public void cleanUp(FileVersion fileVersion); 038 039 public boolean isSupported(FileVersion fileVersion); 040 041 public boolean isSupported(String mimeType); 042 043 /** 044 * Launches the processor's work with respect to the given file version. 045 * 046 * @param fileVersion the latest file version to process 047 */ 048 public void trigger(FileVersion fileVersion); 049 050 }