001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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
022     * document library processors must implement this interface.
023     *
024     * @author Alexander Chow
025     * @author Mika Koivisto
026     * @see    AudioProcessor
027     * @see    DLPreviewableProcessor
028     * @see    com.liferay.portal.kernel.image.ImageProcessor
029     * @see    PDFProcessor
030     * @see    com.liferay.portal.kernel.metadata.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    }