001: /*
002: * $Id: Constants.java 471754 2006-11-06 14:55:09Z husted $
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.struts.chain;
022:
023: /**
024: * <p>Global constants for the Chain of Responsibility Library.</p>
025: */
026: public final class Constants {
027: // -------------------------------------------------- Context Attribute Keys
028:
029: /**
030: * <p>The default context attribute under which the Action for the current
031: * request will be stored.</p>
032: */
033: public static final String ACTION_KEY = "action";
034:
035: /**
036: * <p>The default context attribute under which the ActionConfig for the
037: * current request will be stored.</p>
038: */
039: public static final String ACTION_CONFIG_KEY = "actionConfig";
040:
041: /**
042: * <p>The default context attribute under which the ActionForm for the
043: * current request will be stored.</p>
044: */
045: public static final String ACTION_FORM_KEY = "actionForm";
046:
047: /**
048: * <p>The default context attribute under which the ActionServet for the
049: * current application will be stored.</p>
050: */
051: public static final String ACTION_SERVLET_KEY = "actionServlet";
052:
053: /**
054: * <p>The default context attribute under which a boolean flag indicating
055: * whether this request has been cancelled will be stored.</p>
056: */
057: public static final String CANCEL_KEY = "cancel";
058:
059: /**
060: * <p>The default context attribute under which an Exception will be
061: * stored before passing it to an exception handler chain.</p>
062: */
063: public static final String EXCEPTION_KEY = "exception";
064:
065: /**
066: * <p>The default context attribute under which the ForwardConfig for the
067: * current request will be stored.</p>
068: */
069: public static final String FORWARD_CONFIG_KEY = "forwardConfig";
070:
071: /**
072: * <p>The default context attribute under which the include path for the
073: * current request will be stored.</p>
074: */
075: public static final String INCLUDE_KEY = "include";
076:
077: /**
078: * <p>The default context attribute under which the Locale for the current
079: * request will be stored.</p>
080: */
081: public static final String LOCALE_KEY = "locale";
082:
083: /**
084: * <p>The default context attribute under which the MessageResources for
085: * the current request will be stored.</p>
086: */
087: public static final String MESSAGE_RESOURCES_KEY = "messageResources";
088:
089: /**
090: * <p>The default context attribute under which the ModuleConfig for the
091: * current request will be stored.</p>
092: */
093: public static final String MODULE_CONFIG_KEY = "moduleConfig";
094:
095: /**
096: * <p>The default context attribute key under which a Boolean is stored,
097: * indicating the valid state of the current request. If not present, a
098: * value of Boolean.FALSE should be assumed.
099: */
100: public static final String VALID_KEY = "valid";
101:
102: // --------------------------------------------------------- Other Constants
103:
104: /**
105: * <p>The base part of the context attribute under which a Map containing
106: * the Action instances associated with this module are stored. This value
107: * must be suffixed with the module prefix in order to create a unique key
108: * per module.</p>
109: */
110: public static final String ACTIONS_KEY = "actions";
111:
112: /**
113: * <p>The context attribute under which the Catalog containing our defined
114: * command chains has been stored.</p>
115: */
116: public static final String CATALOG_ATTR = "org.apache.struts.chain.CATALOG";
117:
118: /**
119: * <p>The request attribute under which the path information is stored for
120: * processing during a RequestDispatcher.include() call.</p>
121: */
122: public static final String INCLUDE_PATH_INFO = "javax.servlet.include.path_info";
123:
124: /**
125: * <p>The request attribute under which the servlet path is stored for
126: * processing during a RequestDispatcher.include() call.</p>
127: */
128: public static final String INCLUDE_SERVLET_PATH = "javax.servlet.include.servlet_path";
129: }
|