package com.dragonsoft.tryapp.constants;

/**
 * Application constants. Declared in one place to prevent duplication. 
 * Organized by: global constants, ejb constants, and web application 
 * constants. Not broken up into more than one file because specific 
 * constants may change scope and be global, etc. (and this way code 
 * would not have to be modified at all).
 */
public class TryConstants {

    /*---- GLOBAL CONSTANTS ----*/

    /**
     * The real name of the application.
     */
    public static final String TRY_APP_TITLE = "Fire";

    /**
     * Indicates that the user is an administrator.
     */
    public static final String TRY_USR_LVL_ADMIN = "TRY_USR_LVL_ADMIN";

    /**
     * Indicates that the user is a professor.
     */
    public static final String TRY_USR_LVL_PROF = "TRY_USR_LVL_PROF";

    /**
     * Indicates that the user is a grader.
     */
    public static final String TRY_USR_LVL_GRD = "TRY_USR_LVL_GRD";

    /**
     * Indicates that the user is a student.
     */
    public static final String TRY_USR_LVL_STU = "TRY_USR_LVL_STU";

    /**
     * Indicates that the user is a guest (not logged in).
     */
    public static final String TRY_USR_LVL_GUEST = "TRY_USR_LVL_GUEST";

    /*---- EJB CONSTANTS ----*/

    /*---- WEB APPLICATION CONSTANTS ----*/

    /**
     * Text representation of a blank value.
     */
    public static final String BLANK_VALUE = "";

    /**
     * Text representation of boolean false.
     */
    public static final String IS_FALSE = "false";

    /**
     * Text representation of boolean true.
     */
    public static final String IS_TRUE = "true";

    /**
     * Format used to receive date inputs.
     */
    public static final String DATE_FORMAT_INPUT = "MM/dd/yyyy HH:mm:ss";

    /**
     * Format used to display dates.
     */
    public static final String DATE_FORMAT_DISPLAY = "MM/dd/yyyy hh:mm:ss a";

    /**
     * The path of the application on the server.
     * 
     * TODO: If time permits, remove all instances in the code where 
     * this value is hard coded.
     */
    public static final String TRY_APP_PATH = "/tryapp";

    /**
     * Key used to store WebAppUser instance in the HttpSession object.
     */
    public static final String TRY_SESSION_USR_OBJ = "webAppUser";

    /**
     * Key used to store TrySession instance in the HttpSession object.
     */
    public static final String TRY_SESSION_OBJ = "TRY_SESSION_OBJ";

    /**
     * Key used to store error information in the HttpServletRequest object.
     */
    public static final String TRY_ERRORS = "TRY_ERRORS";

    /**
     * Key used to save the previous values in the HttpServletRequest object.
     */
    public static final String OLD_BEAN = "OLD_BEAN";

    /**
     * Key used to pass information to a jsp page through the 
     * HttpServletRequest object.
     */
    public static final String INFO_BEAN = "INFO_BEAN";

    /**
     * The default username (before logging in).
     */
    public static final String TRY_USR_DEFAULT = "Guest";

} // TryConstants