001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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    }