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.portal.util;
016    
017    import java.util.Set;
018    
019    /**
020     * @author Ryan Park
021     * @author Brian Wing Shun Chan
022     */
023    public class CustomJspRegistryUtil {
024    
025            public static String getCustomJspFileName(
026                    String servletContextName, String fileName) {
027    
028                    return getCustomJspRegistry().getCustomJspFileName(
029                            servletContextName, fileName);
030            }
031    
032            public static CustomJspRegistry getCustomJspRegistry() {
033                    return _customJspRegistry;
034            }
035    
036            public static String getDisplayName(String servletContextName) {
037                    return getCustomJspRegistry().getDisplayName(servletContextName);
038            }
039    
040            public static Set<String> getServletContextNames() {
041                    return getCustomJspRegistry().getServletContextNames();
042            }
043    
044            public static void registerServletContextName(
045                    String servletContextName, String displayName) {
046    
047                    getCustomJspRegistry().registerServletContextName(
048                            servletContextName, displayName);
049            }
050    
051            public static void unregisterServletContextName(String servletContextName) {
052                    getCustomJspRegistry().unregisterServletContextName(servletContextName);
053            }
054    
055            public void setCustomJspRegistry(CustomJspRegistry customJspRegistry) {
056                    _customJspRegistry = customJspRegistry;
057            }
058    
059            private static CustomJspRegistry _customJspRegistry;
060    
061    }