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.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            public void processAction(
031                            PortletConfig portletConfig, ActionRequest actionRequest,
032                            ActionResponse actionResponse)
033                    throws Exception {
034            }
035    
036            public void processAction(
037                            StrutsPortletAction originalStrutsPortletAction,
038                            PortletConfig portletConfig, ActionRequest actionRequest,
039                            ActionResponse actionResponse)
040                    throws Exception {
041    
042                    processAction(portletConfig, actionRequest, actionResponse);
043            }
044    
045            public String render(
046                            PortletConfig portletConfig, RenderRequest renderRequest,
047                            RenderResponse renderResponse)
048                    throws Exception {
049    
050                    return null;
051            }
052    
053            public String render(
054                            StrutsPortletAction originalStrutsPortletAction,
055                            PortletConfig portletConfig, RenderRequest renderRequest,
056                            RenderResponse renderResponse)
057                    throws Exception {
058    
059                    return render(portletConfig, renderRequest, renderResponse);
060            }
061    
062            public void serveResource(
063                            PortletConfig portletConfig, ResourceRequest resourceRequest,
064                            ResourceResponse resourceResponse)
065                    throws Exception {
066            }
067    
068            public void serveResource(
069                            StrutsPortletAction originalStrutsPortletAction,
070                            PortletConfig portletConfig, ResourceRequest resourceRequest,
071                            ResourceResponse resourceResponse)
072                    throws Exception {
073    
074                    serveResource(portletConfig, resourceRequest, resourceResponse);
075            }
076    
077    }