001: /******************************************************************************
002: * JBoss, a division of Red Hat *
003: * Copyright 2006, Red Hat Middleware, LLC, and individual *
004: * contributors as indicated by the @authors tag. See the *
005: * copyright.txt in the distribution for a full listing of *
006: * individual contributors. *
007: * *
008: * This is free software; you can redistribute it and/or modify it *
009: * under the terms of the GNU Lesser General Public License as *
010: * published by the Free Software Foundation; either version 2.1 of *
011: * the License, or (at your option) any later version. *
012: * *
013: * This software is distributed in the hope that it will be useful, *
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of *
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
016: * Lesser General Public License for more details. *
017: * *
018: * You should have received a copy of the GNU Lesser General Public *
019: * License along with this software; if not, write to the Free *
020: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
021: * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
022: ******************************************************************************/package org.jboss.portal.core.ui.portlet.user;
023:
024: /** @author <a href="theute@jboss.org">Thomas Heute</a> $Revision: 8786 $ */
025: public class UserPortletConstants {
026:
027: public static final String SALT = "14m1r0nm4n";
028:
029: public static final String INFOMESSAGE = "infomessage";
030: public static final String ERRORMESSAGE = "errormessage";
031:
032: // Cookie names
033: public static String CK_USERNAME = "username";
034: public static String CK_PASS = "password";
035:
036: // Default values
037: public static int DEFAULT_USERSPERPAGE = 10;
038:
039: // Status return codes for the login.
040: public static final int LOGIN_STATUS_OK = 0;
041: public static final int LOGIN_STATUS_BAD_PASSWORD = 1;
042: public static final int LOGIN_STATUS_NO_SUCH_USER = 2;
043: public static final int LOGIN_STATUS_USER_DISABLED = 3;
044: public static final int LOGIN_STATUS_INVALID_NAME = 4;
045: public static final int LOGIN_STATUS_UNEXPECTED_ERROR = 5;
046:
047: public static final int PERMANENT_USER_MAX_INACTIVE = 60 * 60 * 24
048: * 5 * 1000; // 5 days in ms
049: public static final int TRANSIENT_USER_MAX_INACTIVE = 60 * 60; // 1 hours in seconds
050:
051: public static final String HASH = "hash";
052: public static final String USERID = "userid";
053:
054: // Portlet configuration
055:
056: public static final String EMAILFROM = "emailFrom";
057: public static final String SUBSCRIPTIONMODE = "subscriptionMode";
058: public static final String SUBSCRIPTIONMODE_AUTOMATIC = "automatic";
059: public static final String SUBSCRIPTIONMODE_EMAILVERIFICATION = "emailVerification";
060: public static final String DEFAULT_ROLE = "defaultRole";
061:
062: /** Timezone information : ((value + 1) * 2) - 1 = 2 * value + 1 */
063: public static final String[] TIME_ZONE_OFFSETS = {
064: "(GMT -12:00 hours) Eniwetok, Kwajalein",
065: null,
066: "(GMT -11:00 hours) Midway Island, Samoa",
067: null,
068: "(GMT -10:00 hours) Hawaii",
069: null,
070: "(GMT -9:00 hours) Alaska",
071: null,
072: "(GMT -8:00 hours) Pacific Time (US & Canada)",
073: null,
074: "(GMT -7:00 hours) Mountain Time (US & Canada)",
075: null,
076: "(GMT -6:00 hours) Central Time (US & Canada), Mexico City",
077: null,
078: "(GMT -5:00 hours) Eastern Time (US & Canada), Bogota, Lima, Quito",
079: null,
080: "(GMT -4:00 hours) Atlantic Time (Canada), Caracas, La Paz",
081: "(GMT -3:30 hours) Newfoundland",
082: "(GMT -3:00 hours) Brazil, Buenos Aires, Georgetown",
083: null,
084: "(GMT -2:00 hours) Mid-Atlantic",
085: null,
086: "(GMT -1:00 hours) Azores, Cape Verde Islands",
087: null,
088: "(GMT) Western Europe Time, London, Lisbon, Casablanca, Monrovia",
089: null,
090: "(GMT +1:00 hours) CET(Central Europe Time), Brussels, Copenhagen, Madrid, Paris",
091: null,
092: "(GMT +2:00 hours) EET(Eastern Europe Time), Kaliningrad, South Africa",
093: null,
094: "(GMT +3:00 hours) Baghdad, Kuwait, Riyadh, Moscow, St. Petersburg",
095: "(GMT +3:30 hours) Tehran",
096: "(GMT +4:00 hours) Abu Dhabi, Muscat, Baku, Tbilisi",
097: "(GMT +4:30 hours) Kabul",
098: "(GMT +5:00 hours) Ekaterinburg, Islamabad, Karachi, Tashkent",
099: "(GMT +5:30 hours) Bombay, Calcutta, Madras, New Delhi",
100: "(GMT +6:00 hours) Almaty, Dhaka, Colombo",
101: null,
102: "(GMT +7:00 hours) Bangkok, Hanoi, Jakarta",
103: null,
104: "(GMT +8:00 hours) Beijing, Perth, Singapore, Hong Kong, Chongqing, Urumqi, Taipei",
105: null,
106: "(GMT +9:00 hours) Tokyo, Seoul, Osaka, Sapporo, Yakutsk",
107: "(GMT +9:30 hours) Adelaide, Darwin",
108: "(GMT +10:00 hours) EAST(East Australian Standard)",
109: null,
110: "(GMT +11:00 hours) Magadan, Solomon Islands, New Caledonia",
111: null,
112: "(GMT +12:00 hours) Auckland, Wellington, Fiji, Kamchatka, Marshall Island",
113: null };
114:
115: public static final String DEFAULT_IMAGES_PATH = "images/user";
116: }
|