001: /*
002: * $Id: PortletActionConstants.java 568895 2007-08-23 08:57:36Z rgielen $
003: *
004: * Licensed to the Apache Software Foundation (ASF) under one
005: * or more contributor license agreements. See the NOTICE file
006: * distributed with this work for additional information
007: * regarding copyright ownership. The ASF licenses this file
008: * to you under the Apache License, Version 2.0 (the
009: * "License"); you may not use this file except in compliance
010: * with the License. You may obtain a copy of the License at
011: *
012: * http://www.apache.org/licenses/LICENSE-2.0
013: *
014: * Unless required by applicable law or agreed to in writing,
015: * software distributed under the License is distributed on an
016: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017: * KIND, either express or implied. See the License for the
018: * specific language governing permissions and limitations
019: * under the License.
020: */
021: package org.apache.struts2.portlet;
022:
023: /**
024: * Interface defining some constants used in the Struts portlet implementation
025: *
026: */
027: public interface PortletActionConstants {
028: /**
029: * Default action name to use when no default action has been configured in the portlet
030: * init parameters.
031: */
032: String DEFAULT_ACTION_NAME = "default";
033:
034: /**
035: * Action name parameter name
036: */
037: String ACTION_PARAM = "struts.portlet.action";
038:
039: /**
040: * Key for parameter holding the last executed portlet mode.
041: */
042: String MODE_PARAM = "struts.portlet.mode";
043:
044: /**
045: * Key used for looking up and storing the portlet phase
046: */
047: String PHASE = "struts.portlet.phase";
048:
049: /**
050: * Constant used for the render phase (
051: * {@link javax.portlet.Portlet#render(javax.portlet.RenderRequest, javax.portlet.RenderResponse)})
052: */
053: Integer RENDER_PHASE = new Integer(1);
054:
055: /**
056: * Constant used for the event phase (
057: * {@link javax.portlet.Portlet#processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)})
058: */
059: Integer EVENT_PHASE = new Integer(2);
060:
061: /**
062: * Key used for looking up and storing the
063: * {@link javax.portlet.PortletRequest}
064: */
065: String REQUEST = "struts.portlet.request";
066:
067: /**
068: * Key used for looking up and storing the
069: * {@link javax.portlet.PortletResponse}
070: */
071: String RESPONSE = "struts.portlet.response";
072:
073: /**
074: * Key used for looking up and storing the action that was invoked in the event phase.
075: */
076: String EVENT_ACTION = "struts.portlet.eventAction";
077:
078: /**
079: * Key used for looking up and storing the
080: * {@link javax.portlet.PortletConfig}
081: */
082: String PORTLET_CONFIG = "struts.portlet.config";
083:
084: /**
085: * Name of the action used as error handler
086: */
087: String ERROR_ACTION = "errorHandler";
088:
089: /**
090: * Key for the portlet namespace stored in the
091: * {@link org.apache.struts2.portlet.context.PortletActionContext}.
092: */
093: String PORTLET_NAMESPACE = "struts.portlet.portletNamespace";
094:
095: /**
096: * Key for the mode-to-namespace map stored in the
097: * {@link org.apache.struts2.portlet.context.PortletActionContext}.
098: */
099: String MODE_NAMESPACE_MAP = "struts.portlet.modeNamespaceMap";
100:
101: /**
102: * Key for the default action name for the portlet, stored in the
103: * {@link org.apache.struts2.portlet.context.PortletActionContext}.
104: */
105: String DEFAULT_ACTION_FOR_MODE = "struts.portlet.defaultActionForMode";
106:
107: /**
108: * Key for request attribute indicating if the action has been reset.
109: */
110: String ACTION_RESET = "struts.portlet.actionReset";
111:
112: /**
113: * Key for session attribute indicating the location of the render direct action.
114: */
115: String RENDER_DIRECT_LOCATION = "struts.portlet.renderDirectLocation";
116:
117: /**
118: * Session key where the value stack from the event phase is stored.
119: */
120: String STACK_FROM_EVENT_PHASE = "struts.portlet.valueStackFromEventPhase";
121:
122: /**
123: * Default name of dispatcher servlet in web.xml
124: */
125: String DEFAULT_DISPATCHER_SERVLET_NAME = "Struts2PortletDispatcherServlet";
126: }
|