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.kernel.trash;
016    
017    import com.liferay.portal.kernel.util.WebKeys;
018    import com.liferay.portal.theme.ThemeDisplay;
019    
020    import javax.portlet.PortletRequest;
021    import javax.portlet.RenderRequest;
022    import javax.portlet.RenderResponse;
023    
024    /**
025     * @author Alexander Chow
026     */
027    public abstract class BaseTrashRenderer implements TrashRenderer {
028    
029            public String getIconPath(PortletRequest portletRequest) {
030                    ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute(
031                            WebKeys.THEME_DISPLAY);
032    
033                    return getIconPath(themeDisplay);
034            }
035    
036            public String getIconPath(ThemeDisplay themeDisplay) {
037                    return themeDisplay.getPathThemeImages() + "/common/page.png";
038            }
039    
040            public String render(
041                            RenderRequest renderRequest, RenderResponse renderResponse,
042                            String template)
043                    throws Exception {
044    
045                    return null;
046            }
047    
048            public String renderActions(
049                            RenderRequest renderRequest, RenderResponse renderResponse)
050                    throws Exception {
051    
052                    return null;
053            }
054    
055    }