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     * @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    }