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:
022: package org.apache.struts.apps.mailreader;
023:
024: /**
025: * <p>
026: * Manifest constants for the MailReader application.
027: * </p>
028: *
029: * @version $Rev: 471754 $ $Date: 2006-11-06 08:55:09 -0600 (Mon, 06 Nov 2006) $
030: */
031:
032: public final class Constants {
033:
034: // --- Tokens ----
035:
036: /**
037: * <p>
038: * The token representing a "create" task.
039: * </p>
040: */
041: public static final String CREATE = "Create";
042:
043: /**
044: * <p>
045: * The application scope attribute under which our user database
046: * is stored.
047: * </p>
048: */
049: public static final String DATABASE_KEY = "database";
050:
051: /**
052: * <p>
053: * The token representing a "edit" task.
054: * </p>
055: */
056: public static final String DELETE = "Delete";
057:
058: /**
059: * <p>
060: * The token representing a "edit" task.
061: * </p>
062: */
063: public static final String EDIT = "Edit";
064:
065: /**
066: * <p>
067: * The request attributes key under the WelcomeAction stores an ArrayList
068: * of error messages, if required resources are missing.
069: * </p>
070: */
071: public static final String ERROR_KEY = "ERROR";
072:
073: /**
074: * <p>
075: * The token representing a "failure" result for this application.
076: * </p>
077: */
078: public static final String FAILURE = "Failure";
079:
080: /**
081: * <p>
082: * The token representing a "logon" result for this application.
083: * </p>
084: */
085: public static final String LOGON = "Logon";
086:
087: /**
088: * <p>
089: * The package name for this application.
090: * </p>
091: */
092: public static final String PACKAGE = "org.apache.struts.apps.mailreader";
093:
094: /**
095: * <p>
096: * The token representing a "save" task.
097: * </p>
098: */
099: public static final String SAVE = "Save";
100:
101: /**
102: * <p>
103: * The session scope attribute under which the Subscription object
104: * currently selected by our logged-in User is stored.
105: * </p>
106: */
107: public static final String SUBSCRIPTION_KEY = "subscription";
108:
109: /**
110: * <p>
111: * The token representing a "success" result for this application.
112: * </p>
113: */
114: public static final String SUCCESS = "Success";
115:
116: /**
117: * <p>
118: * The session scope attribute under which the User object
119: * for the currently logged in user is stored.
120: * </p>
121: */
122: public static final String USER_KEY = "user";
123:
124: // ---- Error Messages ----
125:
126: /**
127: * <p>
128: * A static message in case database resource is not loaded.
129: * <p>
130: */
131: public static final String ERROR_DATABASE_NOT_LOADED = "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 = "ERROR: Message resources not loaded -- check servlet container logs for error messages.";
139:
140: // ---- Error Tokens ----
141:
142: /**
143: * <p>
144: * The resource key for an error with the transactional token.
145: * </p>
146: */
147: public static final String MSG_TRANSACTION_TOKEN = "error.transaction.token";
148:
149: // ---- Log Messages ----
150:
151: /**
152: * <p>
153: * The message to log when cancelling a transaction.
154: * </p>
155: */
156: public static final String LOG_CANCEL = " Transaction cancelled: ";
157:
158: /**
159: * <p>
160: * The message to log when forwarding to a result.
161: * </p>
162: */
163: public static final String LOG_RESULT = " Forwarding to result: ";
164:
165: /**
166: * <p>
167: * The message to log when forwarding to a 'failure' result.
168: * <p>
169: */
170: public static final String LOG_FAILURE = LOG_RESULT + FAILURE;
171:
172: /**
173: * <p>
174: * The message to log when forwarding to a 'logon' result.
175: * </p>
176: */
177: public static final String LOG_LOGON = LOG_RESULT + LOGON;
178:
179: /**
180: * <p>
181: * The message to log when populating a form.
182: * </p>
183: */
184: public static final String LOG_POPULATE_FORM = " Populating form from: ";
185:
186: /**
187: * <p>
188: * The message to log when populating a subscription.
189: * </p>
190: */
191: public static final String LOG_POPULATE_SUBSCRIPTION = " Populating subscription: ";
192:
193: /**
194: * <p>
195: * The message to log when populating a user.
196: * </p>
197: */
198: public static final String LOG_POPULATE_USER = " Populating user: ";
199:
200: /**
201: * <p>
202: * The message to log when forwarding to a 'success' result.
203: * </p>
204: */
205: public static final String LOG_PROCESSING = " Processing: ";
206:
207: /**
208: * <p>
209: * The message to log when forwarding to a 'success' result.
210: * </p>
211: */
212: public static final String LOG_SUCCESS = LOG_RESULT + SUCCESS;
213:
214: /**
215: * <p>
216: * The message to log when setting a transactional token.
217: * </p>
218: */
219: public static final String LOG_TOKEN = " Setting transactional control token";
220:
221: /**
222: * <p>
223: * The message to log when checking a transactional token.
224: * </p>
225: */
226: public static final String LOG_TOKEN_CHECK = " Checking transactional control token";
227:
228: }
|