001    /**
002     * Copyright (c) 2000-2013 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.lar.PortletDataContext;
018    import com.liferay.portal.kernel.repository.model.FileEntry;
019    import com.liferay.portal.kernel.repository.model.FileVersion;
020    import com.liferay.portal.kernel.xml.Element;
021    
022    /**
023     * @author Mika Koivisto
024     */
025    public interface DLProcessorRegistry {
026    
027            public void cleanUp(FileEntry fileEntry);
028    
029            public void cleanUp(FileVersion fileVersion);
030    
031            public void exportGeneratedFiles(
032                            PortletDataContext portletDataContext, FileEntry fileEntry,
033                            Element fileEntryElement)
034                    throws Exception;
035    
036            public DLProcessor getDLProcessor(String dlProcessorType);
037    
038            public void importGeneratedFiles(
039                            PortletDataContext portletDataContext, FileEntry fileEntry,
040                            FileEntry importedFileEntry, Element fileEntryElement)
041                    throws Exception;
042    
043            public boolean isPreviewableSize(FileVersion fileVersion);
044    
045            public void register(DLProcessor dlProcessor);
046    
047            public void trigger(FileEntry fileEntry, FileVersion fileVersion);
048    
049            public void trigger(
050                    FileEntry fileEntry, FileVersion fileVersion, boolean trusted);
051    
052            public void unregister(DLProcessor dlProcessor);
053    
054    }