001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: *
017: * $Header:$
018: */
019: package org.apache.beehive.netui.pageflow;
020:
021: import org.apache.beehive.netui.pageflow.internal.InternalConstants;
022:
023: /**
024: * Constants related to Page Flow.
025: */
026: public interface PageFlowConstants {
027: /**
028: * The name of the special action in a user-defined {@link PageFlowController} (.jpf) that is
029: * processed when the URI for the .jpf is accessed.
030: */
031: public static final String BEGIN_ACTION_NAME = "begin";
032:
033: /**
034: * The extension used for hitting a {@link PageFlowController} through its URI.
035: */
036: public static final String PAGEFLOW_EXTENSION = ".jpf";
037:
038: /**
039: * The extension used for hitting a {@link PageFlowController} through its URI.
040: * @deprecated Use {@link #PAGEFLOW_EXTENSION} instead.
041: */
042: public static final String JPF_EXTENSION = PAGEFLOW_EXTENSION;
043:
044: /**
045: * The extension for Struts action URIs used with page flows.
046: */
047: public static final String ACTION_EXTENSION = ".do";
048:
049: /**
050: * The name of the {@link GlobalApp} class defined by the user for a web application.
051: *
052: * @deprecated This constant will be removed with no replacement.
053: */
054: public static final String GLOBALAPP_CLASSNAME = "global.Global";
055:
056: /**
057: * The name of the source file for the {@link GlobalApp} class defined by the user for a
058: * web application.
059: *
060: * @deprecated This constant will be removed with no replacement.
061: */
062: public static final String GLOBALAPP_SOURCEFILE_NAME = "Global.app";
063:
064: /**
065: * The filename prefix for Struts module configuration files generated from page flow source files.
066: */
067: public static final String PAGEFLOW_MODULE_CONFIG_PREFIX = "struts-config";
068:
069: /**
070: * The filename prefix for Struts module configuration files generated from page flow source files.
071: * @deprecated Use {@link #PAGEFLOW_MODULE_CONFIG_PREFIX} instead.
072: */
073: public static final String JPF_MODULE_CONFIG_PREFIX = PAGEFLOW_MODULE_CONFIG_PREFIX;
074:
075: /**
076: * The file extensioni for Struts configuration files generated by the Page Flow compiler.
077: */
078: public static final String PAGEFLOW_MODULE_CONFIG_EXTENSION = ".xml";
079:
080: /**
081: * The file extensioni for Struts configuration files generated by the Page Flow compiler.
082: * @deprecated Use {@link #PAGEFLOW_MODULE_CONFIG_EXTENSION} instead.
083: */
084: public static final String JPF_MODULE_CONFIG_EXTENSION = PAGEFLOW_MODULE_CONFIG_EXTENSION;
085:
086: /**
087: * The prefix for a button or imageButton that has an action.
088: * @deprecated This is an internal constant that will be removed without replacement.
089: */
090: public static final String ACTION_OVERRIDE = InternalConstants.ACTION_OVERRIDE_PREFIX;
091:
092: /**
093: * Servlet context-param that configures the maximum number of consecutive server forwards before error.
094: *
095: * @deprecated Instead of this context-param, use the <code>max-forwards-per-request</code> element within
096: * <code>pageflow-config</code> in /WEB-INF/netui-config.xml.
097: */
098: public static final String FORWARD_OVERFLOW_COUNT_PARAM = "jpf-forward-overflow-count";
099:
100: /**
101: * Servlet context-param that configures the maximum depth of the Page Flow nesting stack.
102: *
103: * @deprecated Instead of this context-param, use the <code>max-nesting-stack-depth</code> element within
104: * <code>pageflow-config</code> in /WEB-INF/netui-config.xml.
105: */
106: public static final String NESTING_OVERFLOW_COUNT_PARAM = "jpf-nesting-overflow-count";
107:
108: /**
109: * Default value for the maximum number of consecutive server forwards before error.
110: *
111: * @deprecated This constant will be removed without replacement in a future release. The value is read from
112: * netui-config.xsd (the schema for netui-config.xml).
113: */
114: public static final int DEFAULT_FORWARD_OVERFLOW_COUNT = 50;
115:
116: /**
117: * Default value for the maximum depth of the Page Flow nesting stack.
118: *
119: * @deprecated This constant will be removed without replacement in a future release. The value is read from
120: * netui-config.xsd (the schema for netui-config.xml).
121: */
122: public static final int DEFAULT_NESTING_OVERFLOW_COUNT = 25;
123:
124: /**
125: * Servlet context-param that configures whether to apply security constraints on server forwards to page
126: * flow actions. Normally, security constraints are not applied on server forwards.
127: *
128: * @deprecated Instead of this context-param, use the <code>ensure-secure-forwards</code> element within
129: * <code>pageflow-config</code> in /WEB-INF/beehive-netui-config.xml.
130: */
131: public static final String SECURE_FORWARDS_PARAM = "jpf-secure-forwards";
132:
133: /**
134: * The default classloader-relative directory for Struts module configuration files generated by the Page Flow compiler.
135: */
136: public static final String PAGEFLOW_MODULE_CONFIG_GEN_DIR = "/_pageflow";
137:
138: /**
139: * The default webapp-relative directory for Struts module configuration files generated by the Page Flow compiler.
140: * @deprecated Use {@link #PAGEFLOW_MODULE_CONFIG_GEN_DIR} instead.
141: */
142: public static final String JPF_MODULE_CONFIG_GEN_DIR = PAGEFLOW_MODULE_CONFIG_GEN_DIR;
143:
144: /**
145: * The name of an automatically-generated Forward that can be used from <i>any</i> Page Flow action, in situations
146: * where a framework servlet can handle the response itself. Currently, this happens when a nested page flow returns
147: * after being shown in a popup window. In the calling page flow, the handler for the return action would return
148: * something like <code>new Forward("_auto")</code>, and the framework would write out the correct javascript to
149: * close the popup window.
150: */
151: public static final String AUTO_VIEW_RENDER_FORWARD_NAME = "_auto";
152:
153: /**
154: * The default value of the extension used in the servlet path of the URI for a Forward to the
155: * framework servlet rendering the response. (See {@link #AUTO_VIEW_RENDER_FORWARD_NAME}) The
156: * extension is part of the <url-pattern> used to map a NetUI ViewRenderer Forward to the Servlet
157: * handling the rendering.
158: */
159: public static String DEFAULT_VIEW_RENDERING_EXTENSION = "render";
160:
161: /**
162: * The <param-name> of a web-app <context-param> used to configure the extension used
163: * in the servlet path of the URI for a Forward to the framework servlet rendering the response.
164: * (See {@link #AUTO_VIEW_RENDER_FORWARD_NAME}) The value for the extension should match the
165: * extension in the <url-pattern> used to map a NetUI ViewRenderer Forward to the Servlet
166: * handling the rendering. Setting the associated <param-value> overrides the default value
167: * of the "render" extension in the servlet-mapping, <url-pattern>*.render</url-pattern>.
168: */
169: public static String VIEW_RENDERING_EXTENSION_PARAM = "ViewRenderingExtension";
170:
171: /**
172: * The request attribute name for the view renderer object used by a
173: * framework servlet to render the response.
174: */
175: public static String VIEW_RENDERER_ATTRIBUTE_NAME = "NetuiViewRenderer";
176:
177: /**
178: * A string used in the path of the URI that identifies the command for the framework servlet
179: * to render a ViewRenderer (an attribute on the request) in the response.
180: */
181: public static String VIEW_RENDERER_URI_COMMAND = "returnActionViewRenderer";
182: }
|