001    /**
002     * Copyright (c) 2000-2013 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.struts;
016    
017    import javax.portlet.ActionRequest;
018    import javax.portlet.ActionResponse;
019    import javax.portlet.PortletConfig;
020    import javax.portlet.RenderRequest;
021    import javax.portlet.RenderResponse;
022    import javax.portlet.ResourceRequest;
023    import javax.portlet.ResourceResponse;
024    
025    /**
026     * @author Mika Koivisto
027     */
028    public class BaseStrutsPortletAction implements StrutsPortletAction {
029    
030            @Override
031            public void processAction(
032                            PortletConfig portletConfig, ActionRequest actionRequest,
033                            ActionResponse actionResponse)
034                    throws Exception {
035            }
036    
037            @Override
038            public void processAction(
039                            StrutsPortletAction originalStrutsPortletAction,
040                            PortletConfig portletConfig, ActionRequest actionRequest,
041                            ActionResponse actionResponse)
042                    throws Exception {
043    
044                    processAction(portletConfig, actionRequest, actionResponse);
045            }
046    
047            @Override
048            public String render(
049                            PortletConfig portletConfig, RenderRequest renderRequest,
050                            RenderResponse renderResponse)
051                    throws Exception {
052    
053                    return null;
054            }
055    
056            @Override
057            public String render(
058                            StrutsPortletAction originalStrutsPortletAction,
059                            PortletConfig portletConfig, RenderRequest renderRequest,
060                            RenderResponse renderResponse)
061                    throws Exception {
062    
063                    return render(portletConfig, renderRequest, renderResponse);
064            }
065    
066            @Override
067            public void serveResource(
068                            PortletConfig portletConfig, ResourceRequest resourceRequest,
069                            ResourceResponse resourceResponse)
070                    throws Exception {
071            }
072    
073            @Override
074            public void serveResource(
075                            StrutsPortletAction originalStrutsPortletAction,
076                            PortletConfig portletConfig, ResourceRequest resourceRequest,
077                            ResourceResponse resourceResponse)
078                    throws Exception {
079    
080                    serveResource(portletConfig, resourceRequest, resourceResponse);
081            }
082    
083    }