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.portal.kernel.servlet;
016    
017    import com.liferay.portal.kernel.util.JavaConstants;
018    
019    import java.util.HashSet;
020    import java.util.Set;
021    
022    /**
023     * @author Shuyang Zhou
024     */
025    public class RequestDispatcherAttributeNames {
026    
027            public static boolean contains(String name) {
028                    return _attributeNames.contains(name);
029            }
030    
031            private static final Set<String> _attributeNames = new HashSet<String>();
032    
033            static {
034                    _attributeNames.add(JavaConstants.JAVAX_SERVLET_FORWARD_CONTEXT_PATH);
035                    _attributeNames.add(JavaConstants.JAVAX_SERVLET_FORWARD_PATH_INFO);
036                    _attributeNames.add(JavaConstants.JAVAX_SERVLET_FORWARD_QUERY_STRING);
037                    _attributeNames.add(JavaConstants.JAVAX_SERVLET_FORWARD_REQUEST_URI);
038                    _attributeNames.add(JavaConstants.JAVAX_SERVLET_FORWARD_SERVLET_PATH);
039                    _attributeNames.add(JavaConstants.JAVAX_SERVLET_INCLUDE_CONTEXT_PATH);
040                    _attributeNames.add(JavaConstants.JAVAX_SERVLET_INCLUDE_PATH_INFO);
041                    _attributeNames.add(JavaConstants.JAVAX_SERVLET_INCLUDE_QUERY_STRING);
042                    _attributeNames.add(JavaConstants.JAVAX_SERVLET_INCLUDE_REQUEST_URI);
043                    _attributeNames.add(JavaConstants.JAVAX_SERVLET_INCLUDE_SERVLET_PATH);
044            }
045    
046    }