001    /**
002     * Copyright (c) 2000-2013 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.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    }