001    /**
002     * Copyright (c) 2000-present 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;
016    
017    import com.liferay.portal.kernel.portlet.CustomUserAttributes;
018    
019    import java.util.HashMap;
020    import java.util.Map;
021    
022    import javax.portlet.PortletURLGenerationListener;
023    import javax.portlet.filter.PortletFilter;
024    
025    /**
026     * @author Brian Wing Shun Chan
027     */
028    public class PortletContextBag {
029    
030            public PortletContextBag(String servletContextName) {
031                    _servletContextName = servletContextName;
032            }
033    
034            public Map<String, CustomUserAttributes> getCustomUserAttributes() {
035                    return _customUserAttributes;
036            }
037    
038            public Map<String, PortletFilter> getPortletFilters() {
039                    return _portletFilters;
040            }
041    
042            public Map<String, PortletURLGenerationListener> getPortletURLListeners() {
043                    return _urlListeners;
044            }
045    
046            public String getServletContextName() {
047                    return _servletContextName;
048            }
049    
050            private final Map<String, CustomUserAttributes> _customUserAttributes =
051                    new HashMap<>();
052            private final Map<String, PortletFilter> _portletFilters = new HashMap<>();
053            private final String _servletContextName;
054            private final Map<String, PortletURLGenerationListener> _urlListeners =
055                    new HashMap<>();
056    
057    }