View Javadoc

1   /*
2    * $Id: Constants.java 421119 2006-07-12 04:49:11Z wsmoak $
3    *
4    * Copyright 2003-2005 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.struts.chain;
19  
20  
21  /***
22   * <p>Global constants for the Chain of Responsibility Library.</p>
23   */
24  public final class Constants {
25      // -------------------------------------------------- Context Attribute Keys
26  
27      /***
28       * <p>The default context attribute under which the Action for the current
29       * request will be stored.</p>
30       */
31      public static final String ACTION_KEY = "action";
32  
33      /***
34       * <p>The default context attribute under which the ActionConfig for the
35       * current request will be stored.</p>
36       */
37      public static final String ACTION_CONFIG_KEY = "actionConfig";
38  
39      /***
40       * <p>The default context attribute under which the ActionForm for the
41       * current request will be stored.</p>
42       */
43      public static final String ACTION_FORM_KEY = "actionForm";
44  
45      /***
46       * <p>The default context attribute under which the ActionServet for the
47       * current application will be stored.</p>
48       */
49      public static final String ACTION_SERVLET_KEY = "actionServlet";
50  
51      /***
52       * <p>The default context attribute under which a boolean flag indicating
53       * whether this request has been cancelled will be stored.</p>
54       */
55      public static final String CANCEL_KEY = "cancel";
56  
57      /***
58       * <p>The default context attribute under which an Exception will be
59       * stored before passing it to an exception handler chain.</p>
60       */
61      public static final String EXCEPTION_KEY = "exception";
62  
63      /***
64       * <p>The default context attribute under which the ForwardConfig for the
65       * current request will be stored.</p>
66       */
67      public static final String FORWARD_CONFIG_KEY = "forwardConfig";
68  
69      /***
70       * <p>The default context attribute under which the include path for the
71       * current request will be stored.</p>
72       */
73      public static final String INCLUDE_KEY = "include";
74  
75      /***
76       * <p>The default context attribute under which the Locale for the current
77       * request will be stored.</p>
78       */
79      public static final String LOCALE_KEY = "locale";
80  
81      /***
82       * <p>The default context attribute under which the MessageResources for
83       * the current request will be stored.</p>
84       */
85      public static final String MESSAGE_RESOURCES_KEY = "messageResources";
86  
87      /***
88       * <p>The default context attribute under which the ModuleConfig for the
89       * current request will be stored.</p>
90       */
91      public static final String MODULE_CONFIG_KEY = "moduleConfig";
92  
93      /***
94       * <p>The default context attribute key under which a Boolean is stored,
95       * indicating the valid state of the current request.  If not present, a
96       * value of Boolean.FALSE should be assumed.
97       */
98      public static final String VALID_KEY = "valid";
99  
100     // --------------------------------------------------------- Other Constants
101 
102     /***
103      * <p>The base part of the context attribute under which a Map containing
104      * the Action instances associated with this module are stored. This value
105      * must be suffixed with the module prefix in order to create a unique key
106      * per module.</p>
107      */
108     public static final String ACTIONS_KEY = "actions";
109 
110     /***
111      * <p>The context attribute under which the Catalog containing our defined
112      * command chains has been stored.</p>
113      */
114     public static final String CATALOG_ATTR = "org.apache.struts.chain.CATALOG";
115 
116     /***
117      * <p>The request attribute under which the path information is stored for
118      * processing during a RequestDispatcher.include() call.</p>
119      */
120     public static final String INCLUDE_PATH_INFO =
121         "javax.servlet.include.path_info";
122 
123     /***
124      * <p>The request attribute under which the servlet path is stored for
125      * processing during a RequestDispatcher.include() call.</p>
126      */
127     public static final String INCLUDE_SERVLET_PATH =
128         "javax.servlet.include.servlet_path";
129 }