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.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 String getDisplayName(String servletContextName) {
033                    return getCustomJspRegistry().getDisplayName(servletContextName);
034            }
035    
036            public static Set<String> getServletContextNames() {
037                    return getCustomJspRegistry().getServletContextNames();
038            }
039    
040            public static void registerServletContextName(
041                    String servletContextName, String displayName) {
042    
043                    getCustomJspRegistry().registerServletContextName(
044                            servletContextName, displayName);
045            }
046    
047            public static void unregisterServletContextName(
048                    String servletContextName) {
049    
050                    getCustomJspRegistry().unregisterServletContextName(servletContextName);
051            }
052    
053            public void setCustomJspRegistry(CustomJspRegistry customJspRegistry) {
054                    _customJspRegistry = customJspRegistry;
055            }
056    
057            public static CustomJspRegistry getCustomJspRegistry() {
058                    return _customJspRegistry;
059            }
060    
061            private static CustomJspRegistry _customJspRegistry;
062    
063    }