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.portal.kernel.portlet.configuration.icon;
016    
017    import com.liferay.portal.kernel.theme.ThemeDisplay;
018    import com.liferay.portal.kernel.util.PortalUtil;
019    import com.liferay.portal.kernel.util.WebKeys;
020    
021    import java.io.IOException;
022    
023    import java.util.Locale;
024    import java.util.Map;
025    import java.util.ResourceBundle;
026    
027    import javax.portlet.PortletRequest;
028    import javax.portlet.PortletResponse;
029    
030    import javax.servlet.http.HttpServletRequest;
031    import javax.servlet.http.HttpServletResponse;
032    
033    /**
034     * @author Eudaldo Alonso
035     */
036    public abstract class BasePortletConfigurationIcon
037            implements PortletConfigurationIcon {
038    
039            @Override
040            public String getAlt() {
041                    return null;
042            }
043    
044            @Override
045            public String getAriaRole() {
046                    return null;
047            }
048    
049            @Override
050            public String getCssClass() {
051                    return null;
052            }
053    
054            @Override
055            public Map<String, Object> getData() {
056                    return null;
057            }
058    
059            @Override
060            public String getIconCssClass() {
061                    return null;
062            }
063    
064            @Override
065            public String getId() {
066                    return null;
067            }
068    
069            @Override
070            public String getImage() {
071                    return null;
072            }
073    
074            @Override
075            public String getImageHover() {
076                    return null;
077            }
078    
079            @Override
080            public String getLang() {
081                    return null;
082            }
083    
084            @Override
085            public String getLinkCssClass() {
086                    return null;
087            }
088    
089            @Override
090            public String getMessage(PortletRequest portletRequest) {
091                    return null;
092            }
093    
094            @Override
095            public String getMethod() {
096                    return null;
097            }
098    
099            @Override
100            public String getOnClick(
101                    PortletRequest portletRequest, PortletResponse portletResponse) {
102    
103                    return null;
104            }
105    
106            public ResourceBundle getResourceBundle(Locale locale) {
107                    return PortalUtil.getResourceBundle(locale);
108            }
109    
110            @Override
111            public String getSrc() {
112                    return null;
113            }
114    
115            @Override
116            public String getSrcHover() {
117                    return null;
118            }
119    
120            @Override
121            public String getTarget() {
122                    return null;
123            }
124    
125            @Override
126            public String getURL(
127                    PortletRequest portletRequest, PortletResponse portletResponse) {
128    
129                    return null;
130            }
131    
132            @Override
133            public double getWeight() {
134                    return 0;
135            }
136    
137            /**
138             * @throws IOException
139             */
140            @Override
141            public boolean include(
142                            HttpServletRequest request, HttpServletResponse response)
143                    throws IOException {
144    
145                    return false;
146            }
147    
148            @Override
149            public boolean isLabel() {
150                    return false;
151            }
152    
153            @Override
154            public boolean isToolTip() {
155                    return false;
156            }
157    
158            @Override
159            public boolean isUseDialog() {
160                    return false;
161            }
162    
163            protected Locale getLocale(PortletRequest portletRequest) {
164                    ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute(
165                            WebKeys.THEME_DISPLAY);
166    
167                    return themeDisplay.getLocale();
168            }
169    
170    }