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     * @author Mika Koivisto
022     */
023    public class DLProcessorRegistryUtil {
024    
025            public static void cleanUp(FileEntry fileEntry) {
026                    getDLProcessorRegistry().cleanUp(fileEntry);
027            }
028    
029            public static void cleanUp(FileVersion fileVersion) {
030                    getDLProcessorRegistry().cleanUp(fileVersion);
031            }
032    
033            public static DLProcessorRegistry getDLProcessorRegistry() {
034                    return _dlProcessorRegistry;
035            }
036    
037            public static void register(DLProcessor dlProcessor) {
038                    getDLProcessorRegistry().register(dlProcessor);
039            }
040    
041            public static void trigger(FileEntry fileEntry) {
042                    getDLProcessorRegistry().trigger(fileEntry);
043            }
044    
045            public static void unregister(DLProcessor dlProcessor) {
046                    getDLProcessorRegistry().unregister(dlProcessor);
047            }
048    
049            public void setDLProcessorRegistry(
050                    DLProcessorRegistry dlProcessorRegistry) {
051    
052                    _dlProcessorRegistry = dlProcessorRegistry;
053            }
054    
055            private static DLProcessorRegistry _dlProcessorRegistry;
056    
057    }