KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > appfuse > Constants


1 package org.appfuse;
2
3
4 /**
5  * Constant values used throughout the application.
6  *
7  * <p>
8  * <a HREF="Constants.java.htm"><i>View Source</i></a>
9  * </p>
10  *
11  * @author <a HREF="mailto:matt@raibledesigns.com">Matt Raible</a>
12  */

13 public class Constants {
14     //~ Static fields/initializers =============================================
15

16     /** The name of the ResourceBundle used in this application */
17     public static final String JavaDoc BUNDLE_KEY = "ApplicationResources";
18
19     /** The encryption algorithm key to be used for passwords */
20     public static final String JavaDoc ENC_ALGORITHM = "algorithm";
21
22     /** A flag to indicate if passwords should be encrypted */
23     public static final String JavaDoc ENCRYPT_PASSWORD = "encryptPassword";
24
25     /** File separator from System properties */
26     public static final String JavaDoc FILE_SEP = System.getProperty("file.separator");
27
28     /** User home from System properties */
29     public static final String JavaDoc USER_HOME = System.getProperty("user.home") + FILE_SEP;
30
31     /** The name of the configuration hashmap stored in application scope. */
32     public static final String JavaDoc CONFIG = "appConfig";
33
34     /**
35      * Session scope attribute that holds the locale set by the user. By setting this key
36      * to the same one that Struts uses, we get synchronization in Struts w/o having
37      * to do extra work or have two session-level variables.
38      */

39     public static final String JavaDoc PREFERRED_LOCALE_KEY = "org.apache.struts.action.LOCALE";
40     
41     /**
42      * The request scope attribute under which an editable user form is stored
43      */

44     public static final String JavaDoc USER_KEY = "userForm";
45
46     /**
47      * The request scope attribute that holds the user list
48      */

49     public static final String JavaDoc USER_LIST = "userList";
50
51     /**
52      * The request scope attribute for indicating a newly-registered user
53      */

54     public static final String JavaDoc REGISTERED = "registered";
55
56     /**
57      * The name of the Administrator role, as specified in web.xml
58      */

59     public static final String JavaDoc ADMIN_ROLE = "admin";
60
61     /**
62      * The name of the User role, as specified in web.xml
63      */

64     public static final String JavaDoc USER_ROLE = "user";
65
66     /**
67      * The name of the user's role list, a request-scoped attribute
68      * when adding/editing a user.
69      */

70     public static final String JavaDoc USER_ROLES = "userRoles";
71
72     /**
73      * The name of the available roles list, a request-scoped attribute
74      * when adding/editing a user.
75      */

76     public static final String JavaDoc AVAILABLE_ROLES = "availableRoles";
77
78     /**
79      * The name of the CSS Theme setting.
80      */

81     public static final String JavaDoc CSS_THEME = "csstheme";
82 }
83
Popular Tags