001    /**
002     * Copyright (c) 2000-2013 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            @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    }