Only in GatorMail: .classpath Only in GatorMail-1.0.11: .cvsignore Only in GatorMail: .project Only in GatorMail: bin Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/SessionProvider.class and GatorMail/build/classes/edu/ufl/osg/webmail/SessionProvider.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/User$Activity.class and GatorMail/build/classes/edu/ufl/osg/webmail/User$Activity.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/User.class and GatorMail/build/classes/edu/ufl/osg/webmail/User.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/WebMailAuthenticator.class and GatorMail/build/classes/edu/ufl/osg/webmail/WebMailAuthenticator.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/actions/AddressBkAction.class and GatorMail/build/classes/edu/ufl/osg/webmail/actions/AddressBkAction.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/actions/DeleteAddressAction.class and GatorMail/build/classes/edu/ufl/osg/webmail/actions/DeleteAddressAction.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/actions/FolderAction$AttachmentTerm.class and GatorMail/build/classes/edu/ufl/osg/webmail/actions/FolderAction$AttachmentTerm.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/actions/FolderAction$FromEmailTerm.class and GatorMail/build/classes/edu/ufl/osg/webmail/actions/FolderAction$FromEmailTerm.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/actions/FolderAction.class and GatorMail/build/classes/edu/ufl/osg/webmail/actions/FolderAction.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/actions/LoginAction.class and GatorMail/build/classes/edu/ufl/osg/webmail/actions/LoginAction.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/actions/SaveAddressAction.class and GatorMail/build/classes/edu/ufl/osg/webmail/actions/SaveAddressAction.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/actions/SaveAddressesAction.class and GatorMail/build/classes/edu/ufl/osg/webmail/actions/SaveAddressesAction.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/actions/SendAction.class and GatorMail/build/classes/edu/ufl/osg/webmail/actions/SendAction.class differ Only in GatorMail/build/classes/edu/ufl/osg/webmail/beans: AddressBkItem.class Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/data/AddressBkDAO.class and GatorMail/build/classes/edu/ufl/osg/webmail/data/AddressBkDAO.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/data/AddressBkDAO_DB.class and GatorMail/build/classes/edu/ufl/osg/webmail/data/AddressBkDAO_DB.class differ Only in GatorMail/build/classes/edu/ufl/osg/webmail/data: AddressBkDAO_FAKE.class Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/data/AddressList.class and GatorMail/build/classes/edu/ufl/osg/webmail/data/AddressList.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/data/AddressSort.class and GatorMail/build/classes/edu/ufl/osg/webmail/data/AddressSort.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/data/DAOFactory.class and GatorMail/build/classes/edu/ufl/osg/webmail/data/DAOFactory.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/data/UserInfoDAO.class and GatorMail/build/classes/edu/ufl/osg/webmail/data/UserInfoDAO.class differ Only in GatorMail/build/classes/edu/ufl/osg/webmail/data: UserInfoDAO_DB.class Only in GatorMail/build/classes/edu/ufl/osg/webmail/data: UserInfoDAO_FAKE.class Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/data/UserInfoDAO_LDAP.class and GatorMail/build/classes/edu/ufl/osg/webmail/data/UserInfoDAO_LDAP.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/forms/AddressForm.class and GatorMail/build/classes/edu/ufl/osg/webmail/forms/AddressForm.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/imap/IMAPSessionProvider.class and GatorMail/build/classes/edu/ufl/osg/webmail/imap/IMAPSessionProvider.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/prefs/DBPrefsPlugIn.class and GatorMail/build/classes/edu/ufl/osg/webmail/prefs/DBPrefsPlugIn.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/prefs/DBPrefsProvider$DBProperties.class and GatorMail/build/classes/edu/ufl/osg/webmail/prefs/DBPrefsProvider$DBProperties.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/util/Util$DateSort.class and GatorMail/build/classes/edu/ufl/osg/webmail/util/Util$DateSort.class differ Files GatorMail-1.0.11/build/classes/edu/ufl/osg/webmail/util/Util.class and GatorMail/build/classes/edu/ufl/osg/webmail/util/Util.class differ Files GatorMail-1.0.11/build/ear/GatorMail.ear and GatorMail/build/ear/GatorMail.ear differ Files GatorMail-1.0.11/build/jar/GatorMail.jar and GatorMail/build/jar/GatorMail.jar differ diff -urb GatorMail-1.0.11/build/jsp/tiles/addressbook/addAddress.jsp GatorMail/build/jsp/tiles/addressbook/addAddress.jsp --- GatorMail-1.0.11/build/jsp/tiles/addressbook/addAddress.jsp 2004-07-31 07:15:35.265625000 -0400 +++ GatorMail/build/jsp/tiles/addressbook/addAddress.jsp 2004-08-04 14:06:49.031250000 -0400 @@ -17,6 +17,22 @@ + Home Phone + + + + Work Phone + + + + Mobile Phone + + + + Pager Phone + + +   diff -urb GatorMail-1.0.11/build/jsp/tiles/addressbook/addressbook.jsp GatorMail/build/jsp/tiles/addressbook/addressbook.jsp --- GatorMail-1.0.11/build/jsp/tiles/addressbook/addressbook.jsp 2004-07-31 07:15:35.703125000 -0400 +++ GatorMail/build/jsp/tiles/addressbook/addressbook.jsp 2004-08-04 14:06:49.140625000 -0400 @@ -1,7 +1,7 @@ <%@page contentType="text/html" import="edu.ufl.osg.webmail.Constants, java.util.HashMap, java.util.Map, - javax.mail.internet.InternetAddress"%> + edu.ufl.osg.webmail.beans.AddressBkItem"%> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@taglib uri="/tags/struts-html" prefix="html"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> @@ -31,10 +31,12 @@ %> <% - InternetAddress internetAddress = (InternetAddress)pageContext.getAttribute("internetAddress"); - composeParams.put("to", internetAddress.toString()); - deleteParams.put("email", internetAddress.getAddress()); - deleteParams.put("name", internetAddress.getPersonal()); + AddressBkItem internetAddress = (AddressBkItem)pageContext.getAttribute("internetAddress"); + composeParams.put("to", internetAddress.getEmail()); + deleteParams.put("objectID", internetAddress.getObjectID()); + deleteParams.put("userID", internetAddress.getUserID()); + deleteParams.put("domain", internetAddress.getDomain()); + deleteParams.put("email", internetAddress.getEmail()); %> @@ -44,10 +46,10 @@ - + - + @@ -59,5 +61,4 @@ - diff -urb GatorMail-1.0.11/build/jsp/tiles/common/footer.jsp GatorMail/build/jsp/tiles/common/footer.jsp --- GatorMail-1.0.11/build/jsp/tiles/common/footer.jsp 2004-07-31 07:15:35.812500000 -0400 +++ GatorMail/build/jsp/tiles/common/footer.jsp 2004-08-04 14:06:49.015625000 -0400 @@ -11,7 +11,7 @@ University of Florida

Site maintained by The Open Systems Group / - Last Modified: July 31 2004 + Last Modified: August 4 2004

<% diff -urb GatorMail-1.0.11/build/jsp/tiles/compose/message.jsp GatorMail/build/jsp/tiles/compose/message.jsp --- GatorMail-1.0.11/build/jsp/tiles/compose/message.jsp 2004-07-31 07:15:35.296875000 -0400 +++ GatorMail/build/jsp/tiles/compose/message.jsp 2004-08-04 14:06:49.468750000 -0400 @@ -78,8 +78,8 @@ - diff -urb GatorMail-1.0.11/build/jsp/tiles/login/loginFooter.jsp GatorMail/build/jsp/tiles/login/loginFooter.jsp --- GatorMail-1.0.11/build/jsp/tiles/login/loginFooter.jsp 2004-07-31 07:15:35.437500000 -0400 +++ GatorMail/build/jsp/tiles/login/loginFooter.jsp 2004-08-04 14:06:49.828125000 -0400 @@ -16,5 +16,5 @@ Northeast Regional Data Center / University of Florida
Site maintained by The Open Systems Group -
Last Modified: July 31 2004 +
Last Modified: August 4 2004

diff -urb GatorMail-1.0.11/build/props/gatormail.properties GatorMail/build/props/gatormail.properties --- GatorMail-1.0.11/build/props/gatormail.properties 2004-07-31 07:15:34.015625000 -0400 +++ GatorMail/build/props/gatormail.properties 2004-08-02 08:38:19.281250000 -0400 @@ -1,5 +1,5 @@ # "guard" passwords in this file against casual viewing -passwordsBase64Encoded=true +passwordsBase64Encoded=false # Address Book # maximum entries allowed per addressbook @@ -12,12 +12,12 @@ maxsizeAttachments=5242880 # DataBase configuration -dbUser= -dbCredentials= +dbUser=jordie +dbCredentials=matrix # If true, then use DataSource for DB connections, # If false, then use DriverManager (jdbc 1.0). -useDataSource=true +useDataSource=false ## SP #useDataSource=true ## Local @@ -34,8 +34,8 @@ dbDriverClassName= jdbcUrl= # MySQL pros -#dbDriverClassName=org.gjt.mm.mysql.Driver -#jdbcUrl=jdbc:mysql://localhost/public +dbDriverClassName=org.gjt.mm.mysql.Driver +jdbcUrl=jdbc:mysql://209.208.197.52/jordie # ldap configuration ldapAttrPermId=uflEduUniversityId diff -urb GatorMail-1.0.11/build/props/log4j.properties GatorMail/build/props/log4j.properties --- GatorMail-1.0.11/build/props/log4j.properties 2004-07-31 07:15:34.031250000 -0400 +++ GatorMail/build/props/log4j.properties 2004-08-02 08:38:19.250000000 -0400 @@ -7,3 +7,5 @@ # A1 uses PatternLayout. log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=[%d] %-5p %c %x - %m%n + +#testing this thing. Files GatorMail-1.0.11/build/war/GatorMail.war and GatorMail/build/war/GatorMail.war differ Only in GatorMail/build/webinf/classes: log4j.properties diff -urb GatorMail-1.0.11/build/webinf/struts-config.xml GatorMail/build/webinf/struts-config.xml --- GatorMail-1.0.11/build/webinf/struts-config.xml 2004-07-31 07:15:36.000000000 -0400 +++ GatorMail/build/webinf/struts-config.xml 2004-08-04 14:06:50.281250000 -0400 @@ -457,9 +457,12 @@ I don't know why 'domain' must be lowercase but 'SMTP' and 'IMAP' must be uppercase. --> - - - + + + + @@ -482,16 +485,18 @@ - - +--> - - - - + + + + + + + diff -urb GatorMail-1.0.11/build.xml GatorMail/build.xml --- GatorMail-1.0.11/build.xml 2004-05-03 18:05:42.000000000 -0400 +++ GatorMail/build.xml 2004-08-01 19:24:26.000000000 -0400 @@ -254,6 +254,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + Only in GatorMail-1.0.11/docs: .cvsignore diff -urb GatorMail-1.0.11/docs/gatormail.ddl GatorMail/docs/gatormail.ddl --- GatorMail-1.0.11/docs/gatormail.ddl 2004-02-09 18:08:58.000000000 -0500 +++ GatorMail/docs/gatormail.ddl 2004-08-04 13:35:08.609375000 -0400 @@ -1,5 +1,27 @@ # Tested on mySQL and Postgresql -create table addressbook(userid char(8), entry varchar(70)); +#create table addressbook(userid char(8), entry varchar(70)); + +#Expanded addressbook may have more stuff down the road. +create table addressbook( + object_id VARCHAR(32) NOT NULL, + userid char(32) NOT NULL, + domain varchar(64) NOT NULL, + entry varchar(255), + adbk_name varchar(255), + adbk_email varchar(255), + adbk_home_phone varchar(25), + adbk_pager_phone varchar(25), + adbk_mobile_phone varchar(25), + adbk_work_phone varchar(25), + object_title VARCHAR(255), + object_company VARCHAR(255), + object_notes TEXT, + PRIMARY KEY(object_id) ); + +create index addressbook_idx on preferences(userid, domain); + +#note: vpopmail has a id that is 32 chars +# therefore we need to define it as such here. # Create an index for the userid, tested on mySQL and PostgreSQL create index addressbook_idx on addressbook(userid); @@ -8,5 +30,14 @@ #create index addressbook_idx on addressbook(userid) cluster; -# Create preferences table in DB2 (and probably others) -CREATE TABLE preferences(userid char(8) NOT NULL, key varchar(128) NOT NULL, entry varchar(1024) NOT NULL); \ No newline at end of file +# Create preferences table in DB2 +CREATE TABLE preferences(userid char(8) NOT NULL, pref_key varchar(128) NOT NULL, entry varchar(1024) NOT NULL); + +# choose what mysql table to create. dont do both commands. +# Create preferences table in MySQL +CREATE TABLE preferences(userid char(8) NOT NULL, pref_key varchar(128) NOT NULL, entry TEXT NOT NULL); + +# Create preferences table in MySQL for Virtual Domains +CREATE TABLE preferences(userid char(8) NOT NULL, domain char(64) NOT NULL, pref_key varchar(128) NOT NULL, entry TEXT NOT NULL); +create index preferences_idx on preferences(userid, domain); + diff -urb GatorMail-1.0.11/lib/struts-1.1/struts-config_1_0.dtd GatorMail/lib/struts-1.1/struts-config_1_0.dtd --- GatorMail-1.0.11/lib/struts-1.1/struts-config_1_0.dtd 2004-02-09 18:08:56.000000000 -0500 +++ GatorMail/lib/struts-1.1/struts-config_1_0.dtd 2004-08-01 19:46:07.000000000 -0400 @@ -11,7 +11,7 @@ "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd"> - $Id: struts-config_1_0.dtd,v 1.1.1.1 2004/02/09 23:08:57 sandymac Exp $ + $Id: struts-config_1_0.dtd,v 1.3 2004/08/01 23:46:07 verma Exp $ --> diff -urb GatorMail-1.0.11/lib/struts-1.1/struts-config_1_1.dtd GatorMail/lib/struts-1.1/struts-config_1_1.dtd --- GatorMail-1.0.11/lib/struts-1.1/struts-config_1_1.dtd 2004-02-09 18:08:56.000000000 -0500 +++ GatorMail/lib/struts-1.1/struts-config_1_1.dtd 2004-08-01 19:46:07.000000000 -0400 @@ -8,7 +8,7 @@ "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> - $Id: struts-config_1_1.dtd,v 1.1.1.1 2004/02/09 23:08:57 sandymac Exp $ + $Id: struts-config_1_1.dtd,v 1.3 2004/08/01 23:46:07 verma Exp $ --> diff -urb GatorMail-1.0.11/lib/struts-1.1/tiles-config.dtd GatorMail/lib/struts-1.1/tiles-config.dtd --- GatorMail-1.0.11/lib/struts-1.1/tiles-config.dtd 2004-02-09 18:08:56.000000000 -0500 +++ GatorMail/lib/struts-1.1/tiles-config.dtd 2004-08-01 19:46:07.000000000 -0400 @@ -9,7 +9,7 @@ "-//Apache Software Foundation//DTD Tiles Configuration//EN" "http://jakarta.apache.org/struts/dtds/tiles-config.dtd"> - $Id: tiles-config.dtd,v 1.1.1.1 2004/02/09 23:08:56 sandymac Exp $ + $Id: tiles-config.dtd,v 1.3 2004/08/01 23:46:07 verma Exp $ --> diff -urb GatorMail-1.0.11/lib/struts-1.1/tiles-config_1_1.dtd GatorMail/lib/struts-1.1/tiles-config_1_1.dtd --- GatorMail-1.0.11/lib/struts-1.1/tiles-config_1_1.dtd 2004-02-09 18:08:56.000000000 -0500 +++ GatorMail/lib/struts-1.1/tiles-config_1_1.dtd 2004-08-01 19:46:07.000000000 -0400 @@ -8,7 +8,7 @@ "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd"> - $Id: tiles-config_1_1.dtd,v 1.1.1.1 2004/02/09 23:08:56 sandymac Exp $ + $Id: tiles-config_1_1.dtd,v 1.3 2004/08/01 23:46:07 verma Exp $ --> diff -urb GatorMail-1.0.11/lib/struts-1.1/validation_1_1.dtd GatorMail/lib/struts-1.1/validation_1_1.dtd --- GatorMail-1.0.11/lib/struts-1.1/validation_1_1.dtd 2004-02-09 18:08:56.000000000 -0500 +++ GatorMail/lib/struts-1.1/validation_1_1.dtd 2004-08-01 19:46:07.000000000 -0400 @@ -9,7 +9,7 @@ "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd"> - $Id: validation_1_1.dtd,v 1.1.1.1 2004/02/09 23:08:56 sandymac Exp $ + $Id: validation_1_1.dtd,v 1.3 2004/08/01 23:46:07 verma Exp $ --> diff -urb GatorMail-1.0.11/lib/struts-1.1/validator-rules_1_1.dtd GatorMail/lib/struts-1.1/validator-rules_1_1.dtd --- GatorMail-1.0.11/lib/struts-1.1/validator-rules_1_1.dtd 2004-02-09 18:08:56.000000000 -0500 +++ GatorMail/lib/struts-1.1/validator-rules_1_1.dtd 2004-08-01 19:46:07.000000000 -0400 @@ -9,7 +9,7 @@ "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd"> - $Id: validator-rules_1_1.dtd,v 1.1.1.1 2004/02/09 23:08:56 sandymac Exp $ + $Id: validator-rules_1_1.dtd,v 1.3 2004/08/01 23:46:07 verma Exp $ --> diff -urb GatorMail-1.0.11/src/gatormail.properties GatorMail/src/gatormail.properties --- GatorMail-1.0.11/src/gatormail.properties 2004-02-18 17:17:42.000000000 -0500 +++ GatorMail/src/gatormail.properties 2004-08-01 19:24:26.000000000 -0400 @@ -1,5 +1,5 @@ # "guard" passwords in this file against casual viewing -passwordsBase64Encoded=true +passwordsBase64Encoded=false # Address Book # maximum entries allowed per addressbook @@ -12,12 +12,12 @@ maxsizeAttachments=5242880 # DataBase configuration -dbUser=@DBUSER@ -dbCredentials=@DBCREDS@ +dbUser=jordie +dbCredentials=matrix # If true, then use DataSource for DB connections, # If false, then use DriverManager (jdbc 1.0). -useDataSource=@USEDATASOURCE@ +useDataSource=false ## SP #useDataSource=true ## Local @@ -34,8 +34,8 @@ dbDriverClassName=@JDBCDRIVER@ jdbcUrl=@JDBCURL@ # MySQL pros -#dbDriverClassName=org.gjt.mm.mysql.Driver -#jdbcUrl=jdbc:mysql://localhost/public +dbDriverClassName=org.gjt.mm.mysql.Driver +jdbcUrl=jdbc:mysql://209.208.197.52/jordie # ldap configuration ldapAttrPermId=uflEduUniversityId Only in GatorMail/src/java/edu/ufl/osg/webmail: ComposeSavedException.class Only in GatorMail/src/java/edu/ufl/osg/webmail: Constants.class Only in GatorMail/src/java/edu/ufl/osg/webmail: ForwardingExceptionHandler.class Only in GatorMail/src/java/edu/ufl/osg/webmail: InvalidSessionException.class Only in GatorMail/src/java/edu/ufl/osg/webmail: SessionExpiredException.class Only in GatorMail/src/java/edu/ufl/osg/webmail: SessionProvider.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/SessionProvider.java GatorMail/src/java/edu/ufl/osg/webmail/SessionProvider.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/SessionProvider.java 2004-02-22 02:59:54.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/SessionProvider.java 2004-08-01 19:24:26.000000000 -0400 @@ -42,7 +42,7 @@ * @param request The ServletRequest. * @return A user object. */ - public User getUser(String username, String password, ServletRequest request); + public User getUser(String username, String domain, String password, ServletRequest request); /** * Returns a JavaMail Authenticator to be used when the JavaMail session Only in GatorMail/src/java/edu/ufl/osg/webmail: User$Activity.class Only in GatorMail/src/java/edu/ufl/osg/webmail: User.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/User.java GatorMail/src/java/edu/ufl/osg/webmail/User.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/User.java 2004-02-24 18:49:28.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/User.java 2004-08-01 19:46:07.000000000 -0400 @@ -45,12 +45,13 @@ * * @author sandymac * @author drakee - * @version $Revision: 1.4 $ + * @version $Revision: 1.3 $ */ public class User implements Serializable, HttpSessionBindingListener { private static final Logger logger = Logger.getLogger(User.class.getName()); private String username; + private String domain; private String password; private String email; private String displayName; @@ -66,9 +67,11 @@ /** * Creates a new instance of IMAPUser */ - public User(final String username, final String password) { + public User(final String username, final String domain, final String password) { setUsername(username); + setDomain(domain); setPassword(password); + } /** @@ -317,4 +320,18 @@ return time; } } + /** + * @return + */ + public String getDomain() { + return domain; + } + + /** + * @param string + */ + public void setDomain(String string) { + domain = string; + } + } Only in GatorMail/src/java/edu/ufl/osg/webmail: WebMailAuthenticator.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/WebMailAuthenticator.java GatorMail/src/java/edu/ufl/osg/webmail/WebMailAuthenticator.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/WebMailAuthenticator.java 2004-02-22 02:59:54.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/WebMailAuthenticator.java 2004-08-01 19:24:26.000000000 -0400 @@ -51,7 +51,10 @@ * none is provided. */ public PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(user.getUsername(), user.getPassword()); + // this is the required format for username. + // inorder to make this program virtual host compatable we have to + // insert the domain name in the username field only for imap authentication. + return new PasswordAuthentication(user.getUsername()+"@"+user.getDomain(), user.getPassword()); } /** Only in GatorMail/src/java/edu/ufl/osg/webmail: WebMailTilesPlugin$DefinitionsFactoryWrapper.class Only in GatorMail/src/java/edu/ufl/osg/webmail: WebMailTilesPlugin.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: ActionsUtil.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java GatorMail/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java 2004-04-20 16:08:10.000000000 -0400 +++ GatorMail/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java 2004-08-01 19:46:07.000000000 -0400 @@ -63,7 +63,7 @@ * @author sandymac * @author drakee * @since Feb 26, 2003 2:44:15 PM - * @version $Revision: 1.6 $ + * @version $Revision: 1.3 $ */ final class ActionsUtil { private static final Logger logger = Logger.getLogger(ActionsUtil.class.getName()); Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: AddressBkAction.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/actions/AddressBkAction.java GatorMail/src/java/edu/ufl/osg/webmail/actions/AddressBkAction.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/actions/AddressBkAction.java 2004-02-22 20:05:34.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/actions/AddressBkAction.java 2004-08-02 10:18:42.265625000 -0400 @@ -59,7 +59,7 @@ * logic throws an exception */ public ActionForward execute(final ActionMapping mapping, final ActionForm form, final HttpServletRequest request, final HttpServletResponse response) throws Exception { - logger.debug("=== AddressBkAction.execute() begin ==="); + logger.info("=== AddressBkAction.execute() begin ==="); ActionsUtil.checkSession(request); final HttpSession session = request.getSession(); @@ -71,10 +71,11 @@ request.setAttribute(Constants.ADDRESSBK_LIMIT, String.valueOf(maxsize)); final AddressList addressList = Util.getAddressList(session); + logger.info("addresslist size: " + addressList.size()); final int size = addressList.size(); request.setAttribute(Constants.ADDRESSBK_USAGE, String.valueOf(size)); - logger.debug("=== AddressBkAction.execute() end ==="); + logger.info("=== AddressBkAction.execute() end ==="); return mapping.findForward("success"); } } Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: AttachmentAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: ChangeSubscribedAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: CheckCookiesAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: CheckSessionAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: ComposeAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: ComposeResumeAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: CreateFolderAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: DeleteAddressAction.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/actions/DeleteAddressAction..java GatorMail/src/java/edu/ufl/osg/webmail/actions/DeleteAddressAction.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/actions/DeleteAddressAction..java 2004-02-22 02:59:54.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/actions/DeleteAddressAction.java 2004-08-04 13:21:38.218750000 -0400 @@ -20,11 +20,10 @@ package edu.ufl.osg.webmail.actions; -import edu.ufl.osg.webmail.Constants; -import edu.ufl.osg.webmail.beans.ResultBean; -import edu.ufl.osg.webmail.data.AddressList; -import edu.ufl.osg.webmail.forms.AddressForm; -import edu.ufl.osg.webmail.util.Util; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + import org.apache.log4j.Logger; import org.apache.struts.action.Action; import org.apache.struts.action.ActionError; @@ -33,10 +32,13 @@ import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; -import javax.mail.internet.InternetAddress; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; +import edu.ufl.osg.webmail.Constants; +import edu.ufl.osg.webmail.User; +import edu.ufl.osg.webmail.beans.AddressBkItem; +import edu.ufl.osg.webmail.beans.ResultBean; +import edu.ufl.osg.webmail.data.AddressList; +import edu.ufl.osg.webmail.forms.AddressForm; +import edu.ufl.osg.webmail.util.Util; /** * Deletes one or more addressbook entries. @@ -60,35 +62,55 @@ * logic throws an exception */ public ActionForward execute(final ActionMapping mapping, final ActionForm form, final HttpServletRequest request, final HttpServletResponse response) throws Exception { - logger.debug("=== DeleteAddressAction.execute() begin ==="); + logger.info("=== DeleteAddressAction.execute() begin ==="); ActionsUtil.checkSession(request); final ActionErrors errors = new ActionErrors(); final AddressForm addressForm = (AddressForm)form; + final String objectID = addressForm.getObjectID(); + final String userid = addressForm.getUserID(); + final String domain = addressForm.getDomain(); final String email = addressForm.getEmail(); final String name = addressForm.getName(); - + final String homePhone = addressForm.getHomePhone(); + final String pagerPhone = addressForm.getPager(); + final String mobilePhone = addressForm.getMobilePhone(); + final String workPhone = addressForm.getWorkPhone(); + + logger.info("trying to delete: " + userid + ", " + + domain + ", " + + email + ", " + + name); final HttpSession session = request.getSession(); final AddressList addressList = Util.getAddressList(session); - final InternetAddress internetAddress = new InternetAddress(email, name); + final User user = Util.getUser(session); + //final InternetAddress internetAddress = new InternetAddress(email, name); + final AddressBkItem addressItem = new AddressBkItem(objectID, user.getUsername(), + user.getDomain(), + email, name, + homePhone, + pagerPhone, + mobilePhone, + workPhone); // search and destroy if (addressList.containsEmail(email)) { - // remove in memory and on disk - addressList.removeAddress(internetAddress); - logger.debug("removed from addressbook. entry: " + internetAddress); + logger.info("removal successful: " +addressList.removeAddress(addressItem)); + + logger.info("removed from addressbook. entry: " + addressItem); + logger.info("AddressList size now: " + addressList.size()); // store the success message final ResultBean result = new ResultBean(Util.getFromBundle("deleteAddress.result.success")); request.setAttribute(Constants.RESULT, result); } else { // address entry doesn't exist - final ActionError error = new ActionError("error.deleteAddress.notexist", internetAddress.toString()); + final ActionError error = new ActionError("error.deleteAddress.notexist", addressItem.toString()); errors.add(ActionErrors.GLOBAL_ERROR, error); saveErrors(request, errors); return mapping.findForward("fail"); } - logger.debug("=== DeleteAddressAction.execute() end ==="); + logger.info("=== DeleteAddressAction.execute() end ==="); return mapping.findForward("success"); } } \ No newline at end of file Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: DeleteFolderAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: DeleteMessageAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: DeleteMessagesAction$DeleteMessageSort.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: DeleteMessagesAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: EmptyTrashAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: FolderAction$AttachmentTerm.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: FolderAction$FromEmailTerm.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: FolderAction.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/actions/FolderAction.java GatorMail/src/java/edu/ufl/osg/webmail/actions/FolderAction.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/actions/FolderAction.java 2004-04-20 15:34:56.000000000 -0400 +++ GatorMail/src/java/edu/ufl/osg/webmail/actions/FolderAction.java 2004-08-01 19:46:07.000000000 -0400 @@ -59,7 +59,7 @@ * * @author sandymac * @author drakee - * @version $Revision: 1.5 $ + * @version $Revision: 1.3 $ */ public class FolderAction extends Action { private static final Logger logger = Logger.getLogger(FolderAction.class.getName()); @@ -103,7 +103,7 @@ * exception */ public ActionForward execute(final ActionMapping mapping, final ActionForm form, final HttpServletRequest request, final HttpServletResponse response) throws Exception { - logger.debug("=== FolderAction.execute() begin ==="); + logger.info("=== FolderAction.execute() begin ==="); ActionsUtil.checkSession(request); final FolderForm folderForm = (FolderForm) form; @@ -164,7 +164,12 @@ final Folder inbox = Util.getFolder(session, "INBOX"); // Populate Quota info - final List quotaList = ActionsUtil.getQuotaList(inbox); + List quotaList = null; + try{ + quotaList = ActionsUtil.getQuotaList(inbox); + } catch (Exception ex ) { + // TODO: for some reason SOMETIMES this does not work. figure it out + } request.setAttribute("quotaList", quotaList); Util.releaseFolder(inbox); // clean up Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: FolderManageAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: FolderManageModifyAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: ForwardAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: LoginAction.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/actions/LoginAction.java GatorMail/src/java/edu/ufl/osg/webmail/actions/LoginAction.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/actions/LoginAction.java 2004-04-20 16:08:10.000000000 -0400 +++ GatorMail/src/java/edu/ufl/osg/webmail/actions/LoginAction.java 2004-08-01 19:46:07.000000000 -0400 @@ -50,6 +50,7 @@ import java.net.UnknownHostException; import java.util.Properties; import java.util.Date; +import java.util.StringTokenizer; /** @@ -57,7 +58,7 @@ * * @author sandymac * @author drakee - * @version $Revision: 1.5 $ + * @version $Revision: 1.3 $ */ public class LoginAction extends Action { private static final Logger logger = Logger.getLogger(LoginAction.class.getName()); @@ -95,16 +96,32 @@ ActionErrors errors = new ActionErrors(); final String action = (String)PropertyUtils.getSimpleProperty(form, "action"); - final String username = (String)PropertyUtils.getSimpleProperty(form, "username"); + final String usernameField = (String)PropertyUtils.getSimpleProperty(form, "username"); final String password = (String)PropertyUtils.getSimpleProperty(form, "password"); + // NV - take the domain out at this level. Therefore it is not a problem down the road. + String username=null; + String domain=null; + logger.info("usernameField: " + usernameField); + if ( usernameField != null ) { + StringTokenizer st = new StringTokenizer(usernameField, "@"); + while (st != null && st.hasMoreElements()) { + username = (String)st.nextElement(); + domain = (String)st.nextElement(); + } + } // XXX: I'm not sure this is right? What if the user presses enter w/o clicking the button - if ((action == null) && (username == null) && (password == null)) { + if ((action == null) || (username == null)|| (domain == null) || (password == null)) { return mapping.findForward("login"); } - final User user = sessionProvider.getUser(username, password, request); + // NV - session provider should really take into account the domain. + final User user = sessionProvider.getUser(username, domain, password, request); // Authenticator auth = sessionProvider.getAuthenticator(user); + logger.info("user is: " + user.getUsername()); + logger.info("domain is: " + user.getDomain()); + logger.info("email is: " + user.getEmail()); + Store mailStore = null; try { mailStore = user.getMailStore(); @@ -177,7 +194,6 @@ // initialize necessary session objects for this user errors = initializeObjects(user, errors, session); - // logout and show error page, if errors if (!errors.isEmpty()) { saveErrors(request, errors); @@ -185,6 +201,8 @@ } final PreferencesProvider pp = (PreferencesProvider) getServlet().getServletContext().getAttribute(Constants.PREFERENCES_PROVIDER); + logger.info("just about to get the preferences."); + final Properties prefs = pp.getPreferences(user, session); prefs.setProperty("user.login.last", new Date().toString()); @@ -310,6 +328,6 @@ private static void setUserInfo(final User user) throws UserInfoDAOException { final UserInfoDAO userInfoDAO = DAOFactory.getInstance().getUserInfoDAO(); userInfoDAO.setUserInfo(user); - logger.debug("set user: " + user); + logger.info("set user: " + user + " uid: " + user.getPermId()); } } Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: LogoutAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: MessageAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: ModifyComposeAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: ModifyFolderAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: ModifyMessageAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: MoveCopyAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: NextMessageAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: PerformDeleteFolderAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: PreferencesAction.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java GatorMail/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java 2004-04-19 19:29:42.000000000 -0400 +++ GatorMail/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java 2004-08-01 19:46:07.000000000 -0400 @@ -40,7 +40,7 @@ * * @author sandymac * @since Aug 28, 2003 1:28:15 PM - * @version $Revision: 1.4 $ + * @version $Revision: 1.3 $ */ public final class PreferencesAction extends Action { private static final Logger logger = Logger.getLogger(PreferencesAction.class.getName()); Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: PrevMessageAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: PrinterFriendlyAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: RawMessageAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: RenameFolderAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: ReplyAction$ReplyContent.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: ReplyAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: SaveAddressAction.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/actions/SaveAddressAction.java GatorMail/src/java/edu/ufl/osg/webmail/actions/SaveAddressAction.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/actions/SaveAddressAction.java 2004-02-22 02:59:54.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/actions/SaveAddressAction.java 2004-08-04 13:55:30.921875000 -0400 @@ -20,13 +20,10 @@ package edu.ufl.osg.webmail.actions; -import edu.ufl.osg.webmail.Constants; -import edu.ufl.osg.webmail.beans.ResultBean; -import edu.ufl.osg.webmail.data.AddressList; -import edu.ufl.osg.webmail.data.ConfigDAO; -import edu.ufl.osg.webmail.data.DAOFactory; -import edu.ufl.osg.webmail.forms.AddressForm; -import edu.ufl.osg.webmail.util.Util; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + import org.apache.log4j.Logger; import org.apache.struts.action.Action; import org.apache.struts.action.ActionError; @@ -35,10 +32,15 @@ import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; -import javax.mail.internet.InternetAddress; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; +import edu.ufl.osg.webmail.Constants; +import edu.ufl.osg.webmail.User; +import edu.ufl.osg.webmail.beans.AddressBkItem; +import edu.ufl.osg.webmail.beans.ResultBean; +import edu.ufl.osg.webmail.data.AddressList; +import edu.ufl.osg.webmail.data.ConfigDAO; +import edu.ufl.osg.webmail.data.DAOFactory; +import edu.ufl.osg.webmail.forms.AddressForm; +import edu.ufl.osg.webmail.util.Util; /** * Saves an address entry into user's address book. @@ -62,13 +64,13 @@ * logic throws an exception */ public ActionForward execute(final ActionMapping mapping, final ActionForm form, final HttpServletRequest request, final HttpServletResponse response) throws Exception { - logger.debug("=== SaveAddressAction.execute() begin ==="); + logger.info("=== SaveAddressAction.execute() begin ==="); ActionsUtil.checkSession(request); final ActionErrors errors = new ActionErrors(); final HttpSession session = request.getSession(); final AddressList addressList = Util.getAddressList(session); - + final User user = Util.getUser(session); // check that there won't be too many entries in the addressbook final ConfigDAO configDAO = DAOFactory.getInstance().getConfigDAO(); final String maxsizeStr = configDAO.getProperty("maxsizeAddressbook"); @@ -83,16 +85,25 @@ // go ahead and add the entry final AddressForm addressForm = (AddressForm)form; - final InternetAddress iAddress = new InternetAddress(addressForm.getEmail(), addressForm.getName()); + String objectID = addressForm.getObjectID(); + + final AddressBkItem iAddress = new AddressBkItem(objectID, user.getUsername(), user.getDomain(), addressForm.getEmail(), addressForm.getName()); + // TODO: Add the rest of the items here. + + /** + * Allow dups if (addressList.contains(iAddress)) { logger.error("addressList already contains " + iAddress); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.address.duplicate", iAddress.toString())); saveErrors(request, errors); return mapping.findForward("fail"); } + */ // add entry to both in-memory list and backend storage + // first generate the random sequence + iAddress.setObjectID(Util.generateRandomString(32)); addressList.addAddress(iAddress); logger.debug("saved to addressbook. entry: " + iAddress); Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: SaveAddressesAction.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/actions/SaveAddressesAction..java GatorMail/src/java/edu/ufl/osg/webmail/actions/SaveAddressesAction.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/actions/SaveAddressesAction..java 2004-02-22 02:59:54.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/actions/SaveAddressesAction.java 2004-08-02 08:37:31.109375000 -0400 @@ -20,13 +20,14 @@ package edu.ufl.osg.webmail.actions; -import edu.ufl.osg.webmail.Constants; -import edu.ufl.osg.webmail.beans.ResultBean; -import edu.ufl.osg.webmail.data.AddressList; -import edu.ufl.osg.webmail.data.ConfigDAO; -import edu.ufl.osg.webmail.data.DAOFactory; -import edu.ufl.osg.webmail.forms.AddressesForm; -import edu.ufl.osg.webmail.util.Util; +import java.util.ArrayList; +import java.util.List; + +import javax.mail.internet.InternetAddress; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + import org.apache.log4j.Logger; import org.apache.struts.action.Action; import org.apache.struts.action.ActionError; @@ -35,12 +36,14 @@ import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; -import javax.mail.internet.InternetAddress; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; -import java.util.ArrayList; -import java.util.List; +import edu.ufl.osg.webmail.Constants; +import edu.ufl.osg.webmail.beans.AddressBkItem; +import edu.ufl.osg.webmail.beans.ResultBean; +import edu.ufl.osg.webmail.data.AddressList; +import edu.ufl.osg.webmail.data.ConfigDAO; +import edu.ufl.osg.webmail.data.DAOFactory; +import edu.ufl.osg.webmail.forms.AddressesForm; +import edu.ufl.osg.webmail.util.Util; /** * Saves a list of addresses into a user's address book. @@ -64,7 +67,7 @@ * logic throws an exception */ public ActionForward execute(final ActionMapping mapping, final ActionForm form, final HttpServletRequest request, final HttpServletResponse response) throws Exception { - logger.debug("=== SaveAddressesAction.execute() begin ==="); + logger.info("=== SaveAddressesAction.execute() begin ==="); ActionsUtil.checkSession(request); final ActionErrors errors = new ActionErrors(); @@ -108,7 +111,7 @@ } for (int i = 0; i < newSize; i++) { - final InternetAddress iAddress = (InternetAddress)newAddressList.get(i); + final AddressBkItem iAddress = (AddressBkItem)newAddressList.get(i); // add entry to both in-memory list and backend storage addressList.addAddress(iAddress); logger.debug("saved entry " + i + " to addressbook."); Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: SelectAddressesAction.class Only in GatorMail/src/java/edu/ufl/osg/webmail/actions: SendAction.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/actions/SendAction.java GatorMail/src/java/edu/ufl/osg/webmail/actions/SendAction.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/actions/SendAction.java 2004-02-22 20:05:34.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/actions/SendAction.java 2004-07-31 22:19:53.656250000 -0400 @@ -90,7 +90,7 @@ * logic throws an exception */ public ActionForward execute(final ActionMapping mapping, final ActionForm form, final HttpServletRequest request, final HttpServletResponse response) throws Exception { - logger.debug("=== SendAction.execute() begin ==="); + logger.info("=== SendAction.execute() begin ==="); ActionsUtil.checkSession(request); // validation @@ -121,6 +121,12 @@ final MimeMessage message = new MimeMessage(session); final User user = Util.getUser(httpSession); + logger.info("the following are the address Fields: [" + + getFromAddress(user, httpSession) + ", " + + to + ", " + + bcc + ", " + + cc + "]" + ); message.setFrom(getFromAddress(user, httpSession)); message.setRecipients(RecipientType.TO, to); message.setRecipients(RecipientType.CC, cc); Only in GatorMail/src/java/edu/ufl/osg/webmail/beans: AddressBkItem.java Only in GatorMail/src/java/edu/ufl/osg/webmail/beans: FolderBean.class Only in GatorMail/src/java/edu/ufl/osg/webmail/beans: QuotaResourceBean.class Only in GatorMail/src/java/edu/ufl/osg/webmail/beans: ResultBean.class Only in GatorMail/src/java/edu/ufl/osg/webmail/data: AddressBkDAO.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/data/AddressBkDAO.java GatorMail/src/java/edu/ufl/osg/webmail/data/AddressBkDAO.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/data/AddressBkDAO.java 2004-02-22 02:59:56.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/data/AddressBkDAO.java 2004-08-04 13:31:02.453125000 -0400 @@ -20,7 +20,7 @@ package edu.ufl.osg.webmail.data; -import javax.mail.internet.InternetAddress; +import edu.ufl.osg.webmail.beans.AddressBkItem; /** * Interface for interacting with the addressbook store. @@ -30,9 +30,10 @@ */ public interface AddressBkDAO { - public AddressList getAddressList(String permId) throws AddressBkDAOException; + public AddressList getAddressList(String userID, String domain) throws AddressBkDAOException; - public void addEntry(String permId, InternetAddress internetAddress) throws AddressBkDAOException; + public void addEntry(String objectID, String userID, String domain, AddressBkItem internetAddress) throws AddressBkDAOException; + + public void removeEntry(String objectID) throws AddressBkDAOException; - public void removeEntry(String permId, InternetAddress internetAddress) throws AddressBkDAOException; } Only in GatorMail/src/java/edu/ufl/osg/webmail/data: AddressBkDAOException.class Only in GatorMail/src/java/edu/ufl/osg/webmail/data: AddressBkDAO_DB.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/data/AddressBkDAO_DB.java GatorMail/src/java/edu/ufl/osg/webmail/data/AddressBkDAO_DB.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/data/AddressBkDAO_DB.java 2004-02-22 03:00:04.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/data/AddressBkDAO_DB.java 2004-08-04 13:55:04.031250000 -0400 @@ -19,15 +19,6 @@ package edu.ufl.osg.webmail.data; -import org.apache.log4j.Logger; - -import javax.mail.MessagingException; -import javax.mail.internet.InternetAddress; -import javax.mail.internet.MimeUtility; -import javax.mail.internet.AddressException; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.sql.DataSource; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -42,6 +33,17 @@ import java.util.ArrayList; import java.util.Collection; +import javax.mail.MessagingException; +import javax.mail.internet.MimeUtility; +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.sql.DataSource; + +import org.apache.log4j.Logger; + +import edu.ufl.osg.webmail.beans.AddressBkItem; +import edu.ufl.osg.webmail.util.Util; + /** * Implementation for interacting with the address book store. * @@ -123,18 +125,24 @@ } } - public AddressList getAddressList(final String permId) throws AddressBkDAOException { + public AddressList getAddressList(final String userID, final String domain) throws AddressBkDAOException { Connection con = null; final Collection coll = new ArrayList(); try { con = getConnection(); - final PreparedStatement ps = con.prepareStatement("SELECT entry " + "FROM addressbook " + "WHERE userid = ?"); - ps.setString(1, permId); + final PreparedStatement ps = con.prepareStatement("SELECT object_id, userid, domain, adbk_name, adbk_email " + "FROM addressbook " + "WHERE userid = ?"); + ps.setString(1, userID); final ResultSet rs = ps.executeQuery(); while (rs.next()) { try { - coll.add(new InternetAddress(rs.getString(1))); - } catch (AddressException e) { + AddressBkItem item = new AddressBkItem(); + item.setObjectID(rs.getString(1)); + item.setUserID(rs.getString(2)); + item.setDomain(rs.getString(3)); + item.setName(rs.getString(4)); + item.setEmail(rs.getString(5)); + coll.add(item); + } catch (Exception e) { e.printStackTrace(); //To change body of catch statement use Options | File Templates. } } @@ -149,19 +157,27 @@ } throw new AddressBkDAOException(e.getMessage()); } - final AddressList lst = new AddressList(permId); + final AddressList lst = new AddressList(userID, domain); lst.addAll(coll); return lst; } - public void addEntry(final String permId, final InternetAddress internetAddress) throws AddressBkDAOException { + public void addEntry(final String objectID, final String userID, final String domain, final AddressBkItem internetAddress) throws AddressBkDAOException { Connection con = null; try { con = getConnection(); - final PreparedStatement ps = con.prepareStatement("INSERT INTO addressbook " + "(userid, entry) " + "VALUES (?, ?)"); - ps.setString(1, permId); - ps.setString(2, internetAddress.toString()); - + final PreparedStatement ps = con.prepareStatement("INSERT INTO addressbook " + + "(object_id," + "userid, " + "domain, " + "adbk_email, " + "adbk_name, " + "adbk_home_phone, " + "adbk_pager_phone, " + "adbk_mobile_phone, " + "adbk_work_phone) " + + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"); + ps.setString(1, objectID); + ps.setString(2, userID); + ps.setString(3, domain); + ps.setString(4, internetAddress.getEmail()); + ps.setString(5, internetAddress.getName()); + ps.setString(6, ""); + ps.setString(7, ""); + ps.setString(8, ""); + ps.setString(9, ""); final int count = ps.executeUpdate(); if (count == 0) { throw new AddressBkDAOException("Address book insert failed for entry: " + internetAddress.toString()); @@ -178,18 +194,17 @@ } } - public void removeEntry(final String permId, final InternetAddress internetAddress) throws AddressBkDAOException { + public void removeEntry(final String objectID) throws AddressBkDAOException { Connection con = null; try { con = getConnection(); - final PreparedStatement ps = con.prepareStatement("DELETE FROM addressbook " + "WHERE userid = ? " + "AND entry = ?"); - ps.setString(1, permId); - ps.setString(2, internetAddress.toString()); + final PreparedStatement ps = con.prepareStatement("DELETE FROM addressbook " + "WHERE object_id = ? "); + ps.setString(1, objectID); final int count = ps.executeUpdate(); if (count == 0) { - logger.error("address book delete failed. permId: " + permId + ", entry: " + internetAddress.toString()); - throw new AddressBkDAOException("Address book delete failed for entry: " + internetAddress.toString()); + logger.error("address book delete failed. objectID: " + objectID); + throw new AddressBkDAOException("Address book delete failed for objectID: " + objectID); } con.close(); } catch (Exception e) { @@ -202,4 +217,6 @@ throw new AddressBkDAOException(e.getMessage()); } } + + } Only in GatorMail/src/java/edu/ufl/osg/webmail/data: AddressBkDAO_FAKE.class Only in GatorMail/src/java/edu/ufl/osg/webmail/data: AddressList.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/data/AddressList.java GatorMail/src/java/edu/ufl/osg/webmail/data/AddressList.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/data/AddressList.java 2004-02-22 03:00:04.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/data/AddressList.java 2004-08-04 13:31:51.015625000 -0400 @@ -22,6 +22,8 @@ import org.apache.log4j.Logger; +import edu.ufl.osg.webmail.beans.AddressBkItem; + import javax.mail.internet.InternetAddress; import java.util.ArrayList; import java.util.Collection; @@ -32,8 +34,8 @@ import java.util.ListIterator; /** - * This is the Container for holding InternetAddresses. It is self-sorting. - * This is what is retrieved from the AddressBkDAO, and all InternetAddress + * This is the Container for holding AddressBkItems. It is self-sorting. + * This is what is retrieved from the AddressBkDAO, and all AddressBkItems * objects are accessed through here. * * @author drakee @@ -44,12 +46,15 @@ private static Comparator addressSort = new AddressSort(); private String permId; + private String user; + private String domain; private List addressList; private transient AddressBkDAO addressBkDAO; // constructor - public AddressList(final String permId) throws AddressBkDAOException { - this.permId = permId; + public AddressList(final String user, final String domain) throws AddressBkDAOException { + this.user = user; + this.domain = domain; //this.addressSort = new AddressSort(); this.addressList = new ArrayList(); } @@ -60,27 +65,30 @@ public boolean containsEmail(final String email) { final int size = addressList.size(); for (int i = 0; i < size; i++) { - final InternetAddress internetAddress = (InternetAddress)addressList.get(i); - if (internetAddress.getAddress().equals(email)) + final AddressBkItem internetAddress = (AddressBkItem)addressList.get(i); + if (internetAddress.getEmail().equals(email)) return true; } return false; } /** - * Adds Email entry into both in-memory list and backend storage. + * Adds Address book entry into both in-memory list and backend storage. + * This is a modified version of addAddress(InternetAddress) method. + * It is expanded to handle more fields in the address book. -NV + * */ - public boolean addAddress(final InternetAddress internetAddress) throws AddressBkDAOException { - getAddressBkDAO().addEntry(permId, internetAddress); - return add(internetAddress); + public boolean addAddress(final AddressBkItem item) throws AddressBkDAOException { + getAddressBkDAO().addEntry(item.getObjectID(), user, domain, item); + return add(item); } /** * Removes Email entry from both in-memory list and backend storage. */ - public boolean removeAddress(final InternetAddress internetAddress) throws AddressBkDAOException { - getAddressBkDAO().removeEntry(permId, internetAddress); - return remove(internetAddress); + public boolean removeAddress(final AddressBkItem item) throws AddressBkDAOException { + getAddressBkDAO().removeEntry(item.getObjectID()); + return remove(item); } public String toString() { @@ -106,13 +114,13 @@ // satisfy the List interface: //////////////////////////////////////////////////////////// public void add(final int index, final Object element) { - if (!(element instanceof InternetAddress)) return; + if (!(element instanceof AddressBkItem)) return; addressList.add(index, element); sort(); } public boolean add(final Object o) { - if (!(o instanceof InternetAddress)) return false; + if (!(o instanceof AddressBkItem)) return false; addressList.add(o); sort(); return true; @@ -122,7 +130,7 @@ final Iterator it = c.iterator(); while (it.hasNext()) { final Object o = it.next(); - if (!(o instanceof InternetAddress)) return false; + if (!(o instanceof AddressBkItem)) return false; } addressList.addAll(c); sort(); @@ -133,7 +141,7 @@ final Iterator it = c.iterator(); while (it.hasNext()) { final Object o = it.next(); - if (!(o instanceof InternetAddress)) return false; + if (!(o instanceof AddressBkItem)) return false; } addressList.addAll(index, c); sort(); @@ -193,7 +201,12 @@ } public boolean remove(final Object o) { - return addressList.remove(o); + // TODO: need to keep removing if dups are present. + boolean somethingRemoved = false; + while ( addressList.remove(o) ) { + somethingRemoved = true; + } + return somethingRemoved; } public boolean removeAll(final Collection c) { @@ -205,7 +218,7 @@ } public Object set(final int index, final Object element) { - if (!(element instanceof InternetAddress)) return null; + if (!(element instanceof AddressBkItem)) return null; return addressList.set(index, element); } Only in GatorMail/src/java/edu/ufl/osg/webmail/data: AddressSort.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/data/AddressSort.java GatorMail/src/java/edu/ufl/osg/webmail/data/AddressSort.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/data/AddressSort.java 2004-02-22 03:00:04.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/data/AddressSort.java 2004-08-04 11:00:33.765625000 -0400 @@ -20,9 +20,10 @@ package edu.ufl.osg.webmail.data; -import javax.mail.internet.InternetAddress; import java.util.Comparator; +import edu.ufl.osg.webmail.beans.AddressBkItem; + /** * @author drakee * @version $Revision: 1.2 $ @@ -33,18 +34,28 @@ * value, it will resort to comparing the email addresses. */ public int compare(final Object o1, final Object o2) { - final InternetAddress a1 = (InternetAddress)o1; - final InternetAddress a2 = (InternetAddress)o2; + final AddressBkItem a1 = (AddressBkItem)o1; + final AddressBkItem a2 = (AddressBkItem)o2; // entry comparisons get first priority - if (a1.getPersonal().compareTo(a2.getPersonal()) < 0) { + if ( a1.getName()==null || a2.getName() == null) { + if (a1.getName() == null ) return -1; + else return 1; + } + if (a1.getName().compareTo(a2.getName()) < 0) { return -1; - } else if (a1.getPersonal().compareTo(a2.getPersonal()) > 0) { + } else if (a1.getName().compareTo(a2.getName()) > 0) { return 1; } + // entries are equal, so let's compare email addresses - if (a1.getAddress().compareTo(a2.getAddress()) < 0) { + if ( a1.getEmail()==null || a2.getEmail() == null) { + if (a1.getEmail() == null ) return -1; + else return 1; + } + + if (a1.getEmail().compareTo(a2.getEmail()) < 0) { return -1; - } else if (a1.getAddress().compareTo(a2.getAddress()) > 0) { + } else if (a1.getEmail().compareTo(a2.getEmail()) > 0) { return 1; } return 0; // should never get here Only in GatorMail/src/java/edu/ufl/osg/webmail/data: AttachDAO.class Only in GatorMail/src/java/edu/ufl/osg/webmail/data: AttachDAOException.class Only in GatorMail/src/java/edu/ufl/osg/webmail/data: AttachDAO_FILE.class Only in GatorMail/src/java/edu/ufl/osg/webmail/data: AttachList.class Only in GatorMail/src/java/edu/ufl/osg/webmail/data: AttachObj.class Only in GatorMail/src/java/edu/ufl/osg/webmail/data: ConfigDAO.class Only in GatorMail/src/java/edu/ufl/osg/webmail/data: ConfigDAOException.class Only in GatorMail/src/java/edu/ufl/osg/webmail/data: ConfigDAO_FILE.class Only in GatorMail/src/java/edu/ufl/osg/webmail/data: DAOFactory.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/data/DAOFactory.java GatorMail/src/java/edu/ufl/osg/webmail/data/DAOFactory.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/data/DAOFactory.java 2004-02-22 03:00:04.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/data/DAOFactory.java 2004-08-01 19:24:26.000000000 -0400 @@ -68,8 +68,11 @@ * @return the concrete implementation of AddressBkDAO */ public AddressBkDAO getAddressBkDAO() throws AddressBkDAOException { - if (addressBkDAO == null) + if (addressBkDAO == null) { addressBkDAO = new AddressBkDAO_DB(); + //addressBkDAO = new AddressBkDAO_FAKE(); + } + return addressBkDAO; } @@ -90,8 +93,11 @@ * @return the concrete implementation of UserInfoDAO */ public UserInfoDAO getUserInfoDAO() throws UserInfoDAOException { - if (userInfoDAO == null) - userInfoDAO = new UserInfoDAO_LDAP(); + if (userInfoDAO == null){ + //userInfoDAO = new UserInfoDAO_FAKE(); + userInfoDAO = new UserInfoDAO_DB(); + } + return userInfoDAO; } Only in GatorMail/src/java/edu/ufl/osg/webmail/data: UserInfoDAO.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/data/UserInfoDAO.java GatorMail/src/java/edu/ufl/osg/webmail/data/UserInfoDAO.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/data/UserInfoDAO.java 2004-02-22 03:00:04.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/data/UserInfoDAO.java 2004-08-01 19:24:26.000000000 -0400 @@ -34,28 +34,28 @@ * Used when piercing privacy, since no password is passed in. * @param username the user ID whose display name we want. */ - public String getDisplayName(String username) throws UserInfoDAOException; + public String getDisplayName(String username, String domain) throws UserInfoDAOException; /** * Get the display name for the user. * @param username the user ID whose display name we want. * @param password the credentials for username. */ - public String getDisplayName(String username, String password) throws UserInfoDAOException; + public String getDisplayName(String username, String domain, String password) throws UserInfoDAOException; /** * Get the permanent ID code to represent the username. * Used when piercing privacy, since no password is passed in. * @param username the user id whose permanent ID we want. */ - public String getPermId(String username) throws UserInfoDAOException; + public String getPermId(String username, String domain) throws UserInfoDAOException; /** * Get the permanent ID code to represent the username. * @param username the user id whose permanent ID we want. * @param password the credentials for username. */ - public String getPermId(String username, String password) throws UserInfoDAOException; + public String getPermId(String username, String domain, String password) throws UserInfoDAOException; /** * Set the User object with all available information. When appropriate Only in GatorMail/src/java/edu/ufl/osg/webmail/data: UserInfoDAOException.class Only in GatorMail/src/java/edu/ufl/osg/webmail/data: UserInfoDAO_DB.class Only in GatorMail/src/java/edu/ufl/osg/webmail/data: UserInfoDAO_DB.java Only in GatorMail/src/java/edu/ufl/osg/webmail/data: UserInfoDAO_FAKE.class Only in GatorMail/src/java/edu/ufl/osg/webmail/data: UserInfoDAO_FAKE.java Only in GatorMail/src/java/edu/ufl/osg/webmail/data: UserInfoDAO_LDAP.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/data/UserInfoDAO_LDAP.java GatorMail/src/java/edu/ufl/osg/webmail/data/UserInfoDAO_LDAP.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/data/UserInfoDAO_LDAP.java 2004-02-22 03:00:04.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/data/UserInfoDAO_LDAP.java 2004-08-01 19:24:26.000000000 -0400 @@ -121,14 +121,14 @@ /** * get the user's display name, using a password. */ - public String getDisplayName(final String username) throws UserInfoDAOException { + public String getDisplayName(final String username, final String domain) throws UserInfoDAOException { return getDisplayName(username, null); } /** * get the user's display name, using a password. */ - public String getDisplayName(final String username, final String password) throws UserInfoDAOException { + public String getDisplayName(final String username, final String domain, final String password) throws UserInfoDAOException { String displayName = null; try { final Properties props = fetchInfo(displayNameArray, username, password); @@ -146,14 +146,14 @@ /** * set the permanent ID (UF ID in this case). */ - public String getPermId(final String username) throws UserInfoDAOException { + public String getPermId(final String username, final String domain) throws UserInfoDAOException { return getPermId(username, null); } /** * get the permanent ID (UF ID in this case). */ - public String getPermId(final String username, final String password) throws UserInfoDAOException { + public String getPermId(final String username, final String domain, final String password) throws UserInfoDAOException { String permId = null; try { final Properties props = fetchInfo(permIdArray, username, password); Only in GatorMail/src/java/edu/ufl/osg/webmail/formatters: EmailFormat.class Only in GatorMail/src/java/edu/ufl/osg/webmail/formatters: SizeFormat.class Only in GatorMail/src/java/edu/ufl/osg/webmail/formatters: SubjectFormat.class Only in GatorMail/src/java/edu/ufl/osg/webmail/forms: AddressForm.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/forms/AddressForm.java GatorMail/src/java/edu/ufl/osg/webmail/forms/AddressForm.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/forms/AddressForm.java 2004-02-22 03:00:04.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/forms/AddressForm.java 2004-08-04 13:19:57.625000000 -0400 @@ -35,8 +35,16 @@ */ public final class AddressForm extends ActionForm { private static final Logger logger = Logger.getLogger(AddressForm.class.getName()); + private String objectID; + private String userID; + private String domain; private String name; private String email; + private String homePhone; + private String workPhone; + private String mobilePhone; + private String pager; + /** * @param mapping The mapping used to select this instance @@ -45,6 +53,8 @@ public void reset(final ActionMapping mapping, final HttpServletRequest request) { setName(null); setEmail(null); + setUserID(null); + setDomain(null); } /** @@ -98,4 +108,102 @@ public void setName(final String name) { this.name = name; } + /** + * @return + */ + public String getDomain() { + return domain; + } + + /** + * @return + */ + public String getUserID() { + return userID; + } + + /** + * @param string + */ + public void setDomain(String string) { + domain = string; + } + + /** + * @param string + */ + public void setUserID(String string) { + userID = string; + } + + /** + * @return + */ + public String getHomePhone() { + return homePhone; + } + + /** + * @return + */ + public String getMobilePhone() { + return mobilePhone; + } + + /** + * @return + */ + public String getPager() { + return pager; + } + + /** + * @return + */ + public String getWorkPhone() { + return workPhone; + } + + /** + * @param string + */ + public void setHomePhone(String string) { + homePhone = string; + } + + /** + * @param string + */ + public void setMobilePhone(String string) { + mobilePhone = string; + } + + /** + * @param string + */ + public void setPager(String string) { + pager = string; + } + + /** + * @param string + */ + public void setWorkPhone(String string) { + workPhone = string; + } + + /** + * @return + */ + public String getObjectID() { + return objectID; + } + + /** + * @param string + */ + public void setObjectID(String string) { + objectID = string; + } + } Only in GatorMail/src/java/edu/ufl/osg/webmail/forms: AddressesForm.class Only in GatorMail/src/java/edu/ufl/osg/webmail/forms: AttachmentForm.class Only in GatorMail/src/java/edu/ufl/osg/webmail/forms: ComposeForm.class Only in GatorMail/src/java/edu/ufl/osg/webmail/forms: DeleteMessageForm.class Only in GatorMail/src/java/edu/ufl/osg/webmail/forms: DeleteMessagesForm.class Only in GatorMail/src/java/edu/ufl/osg/webmail/forms: EmptyTrashForm.class Only in GatorMail/src/java/edu/ufl/osg/webmail/forms: FolderActionForm.class Only in GatorMail/src/java/edu/ufl/osg/webmail/forms: FolderForm.class Only in GatorMail/src/java/edu/ufl/osg/webmail/forms: FormsUtil.class Only in GatorMail/src/java/edu/ufl/osg/webmail/forms: LoginForm.class Only in GatorMail/src/java/edu/ufl/osg/webmail/forms: MessageForm.class Only in GatorMail/src/java/edu/ufl/osg/webmail/forms: ModifyFolderForm.class Only in GatorMail/src/java/edu/ufl/osg/webmail/forms: MoveCopyForm.class Only in GatorMail/src/java/edu/ufl/osg/webmail/forms: MultiMessageForm.class Only in GatorMail/src/java/edu/ufl/osg/webmail/forms: NewFolderForm.class Only in GatorMail/src/java/edu/ufl/osg/webmail/forms: PreferencesForm.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/forms/PreferencesForm.java GatorMail/src/java/edu/ufl/osg/webmail/forms/PreferencesForm.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/forms/PreferencesForm.java 2004-04-19 19:29:42.000000000 -0400 +++ GatorMail/src/java/edu/ufl/osg/webmail/forms/PreferencesForm.java 2004-08-01 19:46:07.000000000 -0400 @@ -36,7 +36,7 @@ * * @author sandymac * @since Aug 28, 2003 1:13:03 PM - * @version $Revision: 1.4 $ + * @version $Revision: 1.3 $ */ public class PreferencesForm extends ActionForm { private static final Logger logger = Logger.getLogger(PreferencesForm.class.getName()); Only in GatorMail/src/java/edu/ufl/osg/webmail/imap: IMAPPlugin.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/imap/IMAPPlugin.java GatorMail/src/java/edu/ufl/osg/webmail/imap/IMAPPlugin.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/imap/IMAPPlugin.java 2004-02-22 03:00:04.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/imap/IMAPPlugin.java 2004-08-01 19:46:07.000000000 -0400 @@ -33,7 +33,7 @@ /** * @author sandymac - * @version $Revision: 1.4 $ + * @version $Revision: 1.3 $ */ public class IMAPPlugin implements PlugIn { private static final String STORE_PROTOCOL_KEY = "mail.store.protocol"; Only in GatorMail/src/java/edu/ufl/osg/webmail/imap: IMAPSessionProvider.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/imap/IMAPSessionProvider.java GatorMail/src/java/edu/ufl/osg/webmail/imap/IMAPSessionProvider.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/imap/IMAPSessionProvider.java 2004-02-22 03:00:04.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/imap/IMAPSessionProvider.java 2004-08-01 19:46:07.000000000 -0400 @@ -32,7 +32,7 @@ /** * @author sandymac - * @version $Revision: 1.4 $ + * @version $Revision: 1.3 $ */ public class IMAPSessionProvider implements SessionProvider { private final Properties props; @@ -46,9 +46,9 @@ this.domain = domain; } - public User getUser(final String username, final String password, final ServletRequest request) { + public User getUser(final String username, final String domain, final String password, final ServletRequest request) { // User user = new IMAPUser(username, password); - final User user = new User(username, password); + final User user = new User(username, domain, password); user.setEmail(user.getUsername() + "@" + getDomain()); // other user properties will get populated lazily return user; Only in GatorMail/src/java/edu/ufl/osg/webmail/prefs: DBPrefsPlugIn.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/prefs/DBPrefsPlugIn.java GatorMail/src/java/edu/ufl/osg/webmail/prefs/DBPrefsPlugIn.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/prefs/DBPrefsPlugIn.java 2004-04-27 18:41:30.000000000 -0400 +++ GatorMail/src/java/edu/ufl/osg/webmail/prefs/DBPrefsPlugIn.java 2004-08-01 10:16:57.000000000 -0400 @@ -60,6 +60,8 @@ private String contextName = null; private String jdbcDriver = null; private String jdbcUrl = null; + private String jdbcUser = null; + private String jdbcPassword = null; private DataSource dataSource; public void init(final ActionServlet servlet, final ModuleConfig config) throws ServletException { @@ -165,11 +167,12 @@ } public Connection getConnection() throws SQLException { - logger.debug("getConnection() Thread: " + Thread.currentThread().getName()); + logger.info("getConnection() Thread: " + Thread.currentThread().getName()); if (dataSource != null) { return dataSource.getConnection(); } else { - return DriverManager.getConnection(getJdbcUrl()); + // I dont like username password info in the url -NV + return DriverManager.getConnection(getJdbcUrl(), jdbcUser, jdbcPassword); } } @@ -196,4 +199,32 @@ public void setJdbcUrl(final String jdbcUrl) { this.jdbcUrl = jdbcUrl; } + /** + * @return + */ + public String getJdbcPassword() { + return jdbcPassword; + } + + /** + * @return + */ + public String getJdbcUser() { + return jdbcUser; + } + + /** + * @param string + */ + public void setJdbcPassword(String string) { + jdbcPassword = string; + } + + /** + * @param string + */ + public void setJdbcUser(String string) { + jdbcUser = string; + } + } \ No newline at end of file Only in GatorMail/src/java/edu/ufl/osg/webmail/prefs: DBPrefsProvider$CacheEntry.class Only in GatorMail/src/java/edu/ufl/osg/webmail/prefs: DBPrefsProvider$ConnectionProvider.class Only in GatorMail/src/java/edu/ufl/osg/webmail/prefs: DBPrefsProvider$DBProperties.class Only in GatorMail/src/java/edu/ufl/osg/webmail/prefs: DBPrefsProvider.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/prefs/DBPrefsProvider.java GatorMail/src/java/edu/ufl/osg/webmail/prefs/DBPrefsProvider.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/prefs/DBPrefsProvider.java 2004-02-22 03:00:04.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/prefs/DBPrefsProvider.java 2004-08-01 12:02:05.750000000 -0400 @@ -210,7 +210,7 @@ PreparedStatement ps = null; try { - ps = connection.prepareStatement("SELECT key, entry " + "FROM preferences " + "WHERE userid = ?"); + ps = connection.prepareStatement("SELECT pref_key, entry " + "FROM preferences " + "WHERE userid = ?"); ps.setString(1, userKey); } catch (SQLException se) { @@ -307,9 +307,10 @@ PreparedStatement ps = null; try { - ps = connection.prepareStatement("DELETE FROM preferences WHERE userid = ? AND key = ?"); + ps = connection.prepareStatement("DELETE FROM preferences WHERE userid = ? AND domain = ? AND pref_key = ?"); ps.setString(1, getUserKey()); - ps.setString(2, key); + ps.setString(2, getUser().getDomain()); + ps.setString(3, key); } catch (SQLException se) { logger.error("Problem creating a prepared statment.", se); @@ -350,10 +351,12 @@ PreparedStatement ps = null; try { - ps = connection.prepareStatement("INSERT INTO preferences " + "(userid, key, entry) " + "VALUES (?, ?, ?)"); + logger.info("INSERT INTO preferences "); + ps = connection.prepareStatement("INSERT INTO preferences " + "(userid, domain, pref_key, entry) " + "VALUES (?, ?, ?, ?)"); ps.setString(1, getUserKey()); - ps.setString(2, key); - ps.setString(3, value); + ps.setString(2, getUser().getDomain()); + ps.setString(3, key); + ps.setString(4, value); } catch (SQLException se) { logger.error("Problem creating a prepared statment.", se); Only in GatorMail/src/java/edu/ufl/osg/webmail/prefs: PreferencesProvider.class Only in GatorMail/src/java/edu/ufl/osg/webmail/prefs: ReadOnlyPrefsPlugIn.class Only in GatorMail/src/java/edu/ufl/osg/webmail/prefs: ReadOnlyPrefsProvider.class Only in GatorMail/src/java/edu/ufl/osg/webmail/prefs: TransientPrefsPlugIn.class Only in GatorMail/src/java/edu/ufl/osg/webmail/prefs: TransientPrefsProvider.class Only in GatorMail/src/java/edu/ufl/osg/webmail/prefs: UFDBPrefsPlugIn.class Only in GatorMail/src/java/edu/ufl/osg/webmail/prefs: UFDBPrefsProvider.class Only in GatorMail/src/java/edu/ufl/osg/webmail/tags: CheckLogin.class Only in GatorMail/src/java/edu/ufl/osg/webmail/tags: CheckLogout.class Only in GatorMail/src/java/edu/ufl/osg/webmail/tags: FormatWriteTag.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/tags/FormatWriteTag.java GatorMail/src/java/edu/ufl/osg/webmail/tags/FormatWriteTag.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/tags/FormatWriteTag.java 2004-02-22 20:05:34.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/tags/FormatWriteTag.java 2004-08-01 19:46:07.000000000 -0400 @@ -1,7 +1,7 @@ /* - * $Header: /cvsroot/gatormail/GatorMail/src/java/edu/ufl/osg/webmail/tags/FormatWriteTag.java,v 1.3 2004/02/23 01:05:34 sandymac Exp $ + * $Header: /home/cvs/verma/GatorMail/src/java/edu/ufl/osg/webmail/tags/FormatWriteTag.java,v 1.3 2004/08/01 23:46:07 verma Exp $ * $Revision: 1.3 $ - * $Date: 2004/02/23 01:05:34 $ + * $Date: 2004/08/01 23:46:07 $ * * ==================================================================== * @@ -103,7 +103,7 @@ * output stream, optionally filtering characters that are sensitive in HTML. * * @author Craig R. McClanahan - * @version $Revision: 1.3 $ $Date: 2004/02/23 01:05:34 $ + * @version $Revision: 1.3 $ $Date: 2004/08/01 23:46:07 $ */ public class FormatWriteTag extends WriteTag { /** The format class to be instantiated */ Only in GatorMail/src/java/edu/ufl/osg/webmail/util: NoCacheFilter.class Only in GatorMail/src/java/edu/ufl/osg/webmail/util: Util$DateSort.class Only in GatorMail/src/java/edu/ufl/osg/webmail/util: Util.class diff -urb GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/util/Util.java GatorMail/src/java/edu/ufl/osg/webmail/util/Util.java --- GatorMail-1.0.11/src/java/edu/ufl/osg/webmail/util/Util.java 2004-02-22 03:00:04.000000000 -0500 +++ GatorMail/src/java/edu/ufl/osg/webmail/util/Util.java 2004-08-04 14:06:41.671875000 -0400 @@ -20,20 +20,19 @@ package edu.ufl.osg.webmail.util; -import com.sun.mail.imap.IMAPFolder; -import edu.ufl.osg.webmail.Constants; -import edu.ufl.osg.webmail.User; -import edu.ufl.osg.webmail.data.AddressBkDAO; -import edu.ufl.osg.webmail.data.AddressBkDAOException; -import edu.ufl.osg.webmail.data.AddressList; -import edu.ufl.osg.webmail.data.AttachDAOException; -import edu.ufl.osg.webmail.data.AttachList; -import edu.ufl.osg.webmail.data.DAOFactory; -import org.apache.log4j.Logger; -import org.apache.struts.tiles.ComponentDefinition; -import org.apache.struts.tiles.DefinitionsFactory; -import org.apache.struts.tiles.DefinitionsFactoryException; -import org.apache.struts.tiles.TilesUtilImpl; +import java.io.IOException; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.lang.ref.Reference; +import java.lang.ref.WeakReference; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.ResourceBundle; import javax.mail.BodyPart; import javax.mail.Flags; @@ -49,19 +48,24 @@ import javax.servlet.ServletContext; import javax.servlet.ServletRequest; import javax.servlet.http.HttpSession; -import java.io.IOException; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.util.Comparator; -import java.util.Date; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.ResourceBundle; -import java.util.ArrayList; -import java.lang.ref.WeakReference; -import java.lang.ref.Reference; + +import org.apache.log4j.Logger; +import org.apache.struts.tiles.ComponentDefinition; +import org.apache.struts.tiles.DefinitionsFactory; +import org.apache.struts.tiles.DefinitionsFactoryException; +import org.apache.struts.tiles.TilesUtilImpl; + +import com.sun.mail.imap.IMAPFolder; + +import edu.ufl.osg.webmail.Constants; +import edu.ufl.osg.webmail.User; +import edu.ufl.osg.webmail.beans.AddressBkItem; +import edu.ufl.osg.webmail.data.AddressBkDAO; +import edu.ufl.osg.webmail.data.AddressBkDAOException; +import edu.ufl.osg.webmail.data.AddressList; +import edu.ufl.osg.webmail.data.AttachDAOException; +import edu.ufl.osg.webmail.data.AttachList; +import edu.ufl.osg.webmail.data.DAOFactory; /** * Utility class with generic convience methods for use in various places. @@ -242,7 +246,13 @@ // no address book in session - look it up final User user = getUser(session); final AddressBkDAO addressBkDAO = DAOFactory.getInstance().getAddressBkDAO(); - addressList = addressBkDAO.getAddressList(user.getPermId()); + logger.info("getting addressbook for: " + user.getUsername()+"@"+user.getDomain()); + addressList = addressBkDAO.getAddressList(user.getUsername(), user.getDomain()); + logger.info("found " + addressList.size() + " items. Listing..."); + for ( int i=0; i< addressList.size(); i++ ) { + logger.info(((AddressBkItem)addressList.get(i)).getUserID()+", "+ + ((AddressBkItem)addressList.get(i)).getDomain()); + } session.setAttribute(Constants.ADDRESS_LIST, addressList); } else { // just get it from the session addressList = (AddressList)session.getAttribute(Constants.ADDRESS_LIST); @@ -492,4 +502,19 @@ public static Date getWebappinit() { return webAppInit; } + + public static String generateRandomString(int length) { + StringBuffer s=new StringBuffer(); + for(int i=0;i< length; i++) + { + int nextChar=(int)(Math.random()*62); + if(nextChar<10) //0-9 + s.append(""+nextChar); + else if (nextChar<36) //a-z + s.append((char)(nextChar-10+'a')) ; + else + s.append((char)(nextChar-36+'A')) ; + } + return s.toString(); + } } Only in GatorMail/src/java/edu/ufl/osg/webmail/wrappers: FolderWrapper.class Only in GatorMail/src/java/edu/ufl/osg/webmail/wrappers: MessageWrapper.class Only in GatorMail/src/java: log4j.properties diff -urb GatorMail-1.0.11/src/log4j.properties GatorMail/src/log4j.properties --- GatorMail-1.0.11/src/log4j.properties 2004-03-05 14:13:24.000000000 -0500 +++ GatorMail/src/log4j.properties 2004-08-01 19:24:26.000000000 -0400 @@ -7,3 +7,5 @@ # A1 uses PatternLayout. log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=[%d] %-5p %c %x - %m%n + +#testing this thing. diff -urb GatorMail-1.0.11/src/webapp/WEB-INF/struts-config.xml GatorMail/src/webapp/WEB-INF/struts-config.xml --- GatorMail-1.0.11/src/webapp/WEB-INF/struts-config.xml 2004-04-27 18:41:32.000000000 -0400 +++ GatorMail/src/webapp/WEB-INF/struts-config.xml 2004-08-02 09:51:48.609375000 -0400 @@ -457,9 +457,12 @@ I don't know why 'domain' must be lowercase but 'SMTP' and 'IMAP' must be uppercase. --> - - - + + + + @@ -482,16 +485,18 @@ - - +--> - - - - + + + + + + + diff -urb GatorMail-1.0.11/src/webapp/tiles/addressbook/addAddress.jsp GatorMail/src/webapp/tiles/addressbook/addAddress.jsp --- GatorMail-1.0.11/src/webapp/tiles/addressbook/addAddress.jsp 2004-02-20 11:45:14.000000000 -0500 +++ GatorMail/src/webapp/tiles/addressbook/addAddress.jsp 2004-08-03 11:34:55.531250000 -0400 @@ -17,6 +17,22 @@ + Home Phone + + + + Work Phone + + + + Mobile Phone + + + + Pager Phone + + +   diff -urb GatorMail-1.0.11/src/webapp/tiles/addressbook/addressbook.jsp GatorMail/src/webapp/tiles/addressbook/addressbook.jsp --- GatorMail-1.0.11/src/webapp/tiles/addressbook/addressbook.jsp 2004-02-20 11:45:14.000000000 -0500 +++ GatorMail/src/webapp/tiles/addressbook/addressbook.jsp 2004-08-04 13:33:17.625000000 -0400 @@ -1,7 +1,7 @@ <%@page contentType="text/html" import="edu.ufl.osg.webmail.Constants, java.util.HashMap, java.util.Map, - javax.mail.internet.InternetAddress"%> + edu.ufl.osg.webmail.beans.AddressBkItem"%> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@taglib uri="/tags/struts-html" prefix="html"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> @@ -31,10 +31,12 @@ %> <% - InternetAddress internetAddress = (InternetAddress)pageContext.getAttribute("internetAddress"); - composeParams.put("to", internetAddress.toString()); - deleteParams.put("email", internetAddress.getAddress()); - deleteParams.put("name", internetAddress.getPersonal()); + AddressBkItem internetAddress = (AddressBkItem)pageContext.getAttribute("internetAddress"); + composeParams.put("to", internetAddress.getEmail()); + deleteParams.put("objectID", internetAddress.getObjectID()); + deleteParams.put("userID", internetAddress.getUserID()); + deleteParams.put("domain", internetAddress.getDomain()); + deleteParams.put("email", internetAddress.getEmail()); %> @@ -44,10 +46,10 @@ - + - + @@ -59,5 +61,4 @@ - diff -urb GatorMail-1.0.11/src/webapp/tiles/compose/message.jsp GatorMail/src/webapp/tiles/compose/message.jsp --- GatorMail-1.0.11/src/webapp/tiles/compose/message.jsp 2004-02-20 14:42:58.000000000 -0500 +++ GatorMail/src/webapp/tiles/compose/message.jsp 2004-08-04 12:50:48.546875000 -0400 @@ -78,8 +78,8 @@ -