001    /**
002     * Copyright (c) 2000-present 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 interface StrutsPortletAction {
029    
030            public boolean isCheckMethodOnProcessAction();
031    
032            public void processAction(
033                            PortletConfig portletConfig, ActionRequest actionRequest,
034                            ActionResponse actionResponse)
035                    throws Exception;
036    
037            public void processAction(
038                            StrutsPortletAction originalStrutsPortletAction,
039                            PortletConfig portletConfig, ActionRequest actionRequest,
040                            ActionResponse actionResponse)
041                    throws Exception;
042    
043            public String render(
044                            PortletConfig portletConfig, RenderRequest renderRequest,
045                            RenderResponse renderResponse)
046                    throws Exception;
047    
048            public String render(
049                            StrutsPortletAction originalStrutsPortletAction,
050                            PortletConfig portletConfig, RenderRequest renderRequest,
051                            RenderResponse renderResponse)
052                    throws Exception;
053    
054            public void serveResource(
055                            PortletConfig portletConfig, ResourceRequest resourceRequest,
056                            ResourceResponse resourceResponse)
057                    throws Exception;
058    
059            public void serveResource(
060                            StrutsPortletAction originalStrutsPortletAction,
061                            PortletConfig portletConfig, ResourceRequest resourceRequest,
062                            ResourceResponse resourceResponse)
063                    throws Exception;
064    
065    }