View Javadoc

1   /*
2    * $Id: Constants.java 360442 2005-12-31 20:10:04Z husted $
3    *
4    * Copyright 1999-2004 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  
19  
20  package org.apache.struts.apps.mailreader;
21  
22  
23  /***
24   * <p>
25   * Manifest constants for the MailReader application.
26   * </p>
27   *
28   * @version $Rev: 360442 $ $Date: 2005-12-31 13:10:04 -0700 (Sat, 31 Dec 2005) $
29   */
30  
31  public final class Constants {
32  
33      // --- Tokens ----
34  
35      /***
36       * <p>
37       * The token representing a "create" task.
38       * </p>
39       */
40      public static final String CREATE = "Create";
41  
42      /***
43       * <p>
44       * The application scope attribute under which our user database
45       * is stored.
46       * </p>
47       */
48      public static final String DATABASE_KEY = "database";
49  
50      /***
51       * <p>
52       * The token representing a "edit" task.
53       * </p>
54       */
55      public static final String DELETE = "Delete";
56  
57      /***
58       * <p>
59       * The token representing a "edit" task.
60       * </p>
61       */
62      public static final String EDIT = "Edit";
63  
64      /***
65       * <p>
66       * The request attributes key under the WelcomeAction stores an ArrayList
67       * of error messages, if required resources are missing.
68       * </p>
69       */
70      public static final String ERROR_KEY = "ERROR";
71  
72      /***
73       * <p>
74       * The token representing a "failure" result for this application.
75       * </p>
76       */
77      public static final String FAILURE = "Failure";
78  
79      /***
80       * <p>
81       * The token representing a "logon" result for this application.
82       * </p>
83       */
84      public static final String LOGON = "Logon";
85  
86      /***
87       * <p>
88       * The package name for this application.
89       * </p>
90       */
91      public static final String PACKAGE = "org.apache.struts.apps.mailreader";
92  
93      /***
94       * <p>
95       * The token representing a "save" task.
96       * </p>
97       */
98      public static final String SAVE = "Save";
99  
100     /***
101      * <p>
102      * The session scope attribute under which the Subscription object
103      * currently selected by our logged-in User is stored.
104      * </p>
105      */
106     public static final String SUBSCRIPTION_KEY = "subscription";
107 
108     /***
109      * <p>
110      * The token representing a "success" result for this application.
111      * </p>
112      */
113     public static final String SUCCESS = "Success";
114 
115     /***
116      * <p>
117      * The session scope attribute under which the User object
118      * for the currently logged in user is stored.
119      * </p>
120      */
121     public static final String USER_KEY = "user";
122 
123     // ---- Error Messages ----
124 
125     /***
126      * <p>
127      * A static message in case database resource is not loaded.
128      * <p>
129      */
130     public static final String ERROR_DATABASE_NOT_LOADED =
131             "ERROR:  User database not loaded -- check servlet container logs for error messages.";
132 
133     /***
134      * <p>
135      * A static message in case message resource is not loaded.
136      * </p>
137      */
138     public static final String ERROR_MESSAGES_NOT_LOADED =
139             "ERROR:  Message resources not loaded -- check servlet container logs for error messages.";
140 
141     // ---- Error Tokens ----
142 
143     /***
144      * <p>
145      * The resource key for an error with the transactional token.
146      * </p>
147      */
148     public static final String MSG_TRANSACTION_TOKEN = "error.transaction.token";
149 
150     // ---- Log Messages ----
151 
152     /***
153      * <p>
154      * The message to log when cancelling a transaction.
155      * </p>
156      */
157     public static final String LOG_CANCEL = " Transaction cancelled: ";
158 
159     /***
160      * <p>
161      * The message to log when forwarding to a result.
162      * </p>
163      */
164     public static final String LOG_RESULT = " Forwarding to result: ";
165 
166     /***
167      * <p>
168      * The message to log when forwarding to a 'failure' result.
169      * <p>
170      */
171     public static final String LOG_FAILURE = LOG_RESULT + FAILURE;
172 
173     /***
174      * <p>
175      * The message to log when forwarding to a 'logon' result.
176      * </p>
177      */
178     public static final String LOG_LOGON = LOG_RESULT + LOGON;
179 
180     /***
181      * <p>
182      * The message to log when populating a form.
183      * </p>
184      */
185     public static final String LOG_POPULATE_FORM = " Populating form from: ";
186 
187     /***
188      * <p>
189      * The message to log when populating a subscription.
190      * </p>
191      */
192     public static final String LOG_POPULATE_SUBSCRIPTION = " Populating subscription: ";
193 
194     /***
195      * <p>
196      * The message to log when populating a user.
197      * </p>
198      */
199     public static final String LOG_POPULATE_USER = " Populating user: ";
200 
201     /***
202      * <p>
203      * The message to log when forwarding to a 'success' result.
204      * </p>
205      */
206     public static final String LOG_PROCESSING = " Processing: ";
207 
208     /***
209      * <p>
210      * The message to log when forwarding to a 'success' result.
211      * </p>
212      */
213     public static final String LOG_SUCCESS = LOG_RESULT + SUCCESS;
214 
215     /***
216      * <p>
217      * The message to log when setting a transactional token.
218      * </p>
219      */
220     public static final String LOG_TOKEN = " Setting transactional control token";
221 
222     /***
223      * <p>
224      * The message to log when checking a transactional token.
225      * </p>
226      */
227     public static final String LOG_TOKEN_CHECK = " Checking transactional control token";
228 
229 }