View Javadoc

1   /*
2    * $Id: PortletActionConstants.java 418521 2006-07-01 23:36:50Z mrdon $
3    *
4    * Copyright 2006 The Apache Software Foundation.
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License");
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    *
10   *      http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  package org.apache.struts2.portlet;
19  
20  /***
21   * Interface defining some constants used in the Struts portlet implementation
22   * 
23   */
24  public interface PortletActionConstants {
25  	/***
26  	 * Default action name to use when no default action has been configured in the portlet
27  	 * init parameters.
28  	 */
29  	String DEFAULT_ACTION_NAME = "default";
30  	
31  	/***
32  	 * Action name parameter name
33  	 */
34  	String ACTION_PARAM = "struts.portlet.action"; 
35  	
36  	/***
37  	 * Key for parameter holding the last executed portlet mode.
38  	 */
39  	String MODE_PARAM = "struts.portlet.mode";
40  	
41  	/***
42       * Key used for looking up and storing the portlet phase
43       */
44      String PHASE = "struts.portlet.phase";
45  
46      /***
47       * Constant used for the render phase (
48       * {@link javax.portlet.Portlet#render(javax.portlet.RenderRequest, javax.portlet.RenderResponse)})
49       */
50      Integer RENDER_PHASE = new Integer(1);
51  
52      /***
53       * Constant used for the event phase (
54       * {@link javax.portlet.Portlet#processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)})
55       */
56      Integer EVENT_PHASE = new Integer(2);
57  
58      /***
59       * Key used for looking up and storing the
60       * {@link javax.portlet.PortletRequest}
61       */
62      String REQUEST = "struts.portlet.request";
63  
64      /***
65       * Key used for looking up and storing the
66       * {@link javax.portlet.PortletResponse}
67       */
68      String RESPONSE = "struts.portlet.response";
69      
70      /***
71       * Key used for looking up and storing the action that was invoked in the event phase.
72       */
73      String EVENT_ACTION = "struts.portlet.eventAction";
74  
75      /***
76       * Key used for looking up and storing the
77       * {@link javax.portlet.PortletConfig}
78       */
79      String PORTLET_CONFIG = "struts.portlet.config";
80  
81      /***
82       * Name of the action used as error handler
83       */
84      String ERROR_ACTION = "errorHandler";
85  
86      /***
87       * Key for the portlet namespace stored in the 
88       * {@link org.apache.struts2.portlet.context.PortletActionContext}.
89       */
90      String PORTLET_NAMESPACE = "struts.portlet.portletNamespace";
91      
92      /***
93       * Key for the mode-to-namespace map stored in the 
94       * {@link org.apache.struts2.portlet.context.PortletActionContext}.
95       */
96      String MODE_NAMESPACE_MAP = "struts.portlet.modeNamespaceMap";
97      
98      /***
99       * Key for the default action name for the portlet, stored in the 
100      * {@link org.apache.struts2.portlet.context.PortletActionContext}.
101      */
102     String DEFAULT_ACTION_FOR_MODE = "struts.portlet.defaultActionForMode";
103 }