From: Sandy M. <san...@us...> - 2004-04-27 21:41:42
|
Update of /cvsroot/gatormail/GatorMail/src/java/edu/ufl/osg/webmail/prefs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13196/src/java/edu/ufl/osg/webmail/prefs Modified Files: DBPrefsPlugIn.java TransientPrefsProvider.java Log Message: Remove some depreciated code that was for WebSphere Index: TransientPrefsProvider.java =================================================================== RCS file: /cvsroot/gatormail/GatorMail/src/java/edu/ufl/osg/webmail/prefs/TransientPrefsProvider.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TransientPrefsProvider.java 22 Feb 2004 08:00:05 -0000 1.2 --- TransientPrefsProvider.java 27 Apr 2004 21:41:31 -0000 1.3 *************** *** 1,5 **** /* * This file is part of GatorMail, a servlet based webmail. ! * Copyright (C) 2003 The Open Systems Group / University of Florida * * GatorMail is free software; you can redistribute it and/or modify --- 1,5 ---- /* * This file is part of GatorMail, a servlet based webmail. ! * Copyright (C) 2003-2004 The Open Systems Group / University of Florida * * GatorMail is free software; you can redistribute it and/or modify *************** *** 26,30 **** /** ! * TODO: Write me * * @author sandymac --- 26,30 ---- /** ! * Sets up a preferences provider that doesn't presist changes. * * @author sandymac Index: DBPrefsPlugIn.java =================================================================== RCS file: /cvsroot/gatormail/GatorMail/src/java/edu/ufl/osg/webmail/prefs/DBPrefsPlugIn.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DBPrefsPlugIn.java 22 Feb 2004 08:00:05 -0000 1.2 --- DBPrefsPlugIn.java 27 Apr 2004 21:41:30 -0000 1.3 *************** *** 1,5 **** /* * This file is part of GatorMail, a servlet based webmail. ! * Copyright (C) 2003 The Open Systems Group / University of Florida * * GatorMail is free software; you can redistribute it and/or modify --- 1,5 ---- /* * This file is part of GatorMail, a servlet based webmail. ! * Copyright (C) 2003-2004 The Open Systems Group / University of Florida * * GatorMail is free software; you can redistribute it and/or modify *************** *** 46,50 **** /** ! * TODO: Write me * * @author sandymac --- 46,50 ---- /** ! * Sets up a databased backed preference presistance engine. * * @author sandymac *************** *** 62,68 **** private String jdbcUrl = null; private DataSource dataSource; - private String username = null; - private String password = null; - private String passwordEncoded = null; public void init(final ActionServlet servlet, final ModuleConfig config) throws ServletException { --- 62,65 ---- *************** *** 165,168 **** --- 162,166 ---- public void destroy() { servlet.getServletContext().removeAttribute(Constants.PREFERENCES_PROVIDER); + config = null; } *************** *** 170,180 **** logger.debug("getConnection() Thread: " + Thread.currentThread().getName()); if (dataSource != null) { ! if (getUsername() == null) { ! return dataSource.getConnection(); ! } else { ! final String password = getPassword(); ! ! return dataSource.getConnection(getUsername(), password); ! } } else { return DriverManager.getConnection(getJdbcUrl()); --- 168,172 ---- logger.debug("getConnection() Thread: " + Thread.currentThread().getName()); if (dataSource != null) { ! return dataSource.getConnection(); } else { return DriverManager.getConnection(getJdbcUrl()); *************** *** 205,265 **** this.jdbcUrl = jdbcUrl; } - - /** - * @deprecated These are only temporary until we move off of WebSphere. - */ - public String getUsername() { - return username; - } - - /** - * @deprecated These are only temporary until we move off of WebSphere. - */ - public void setUsername(final String username) { - this.username = username; - } - - /** - * @deprecated These are only temporary until we move off of WebSphere. - */ - private synchronized String getPassword() { - if (getPasswordEncoded() != null) { - try { - final InputStream in = MimeUtility.decode(new ByteArrayInputStream(password.getBytes("US-ASCII")), getPasswordEncoded()); - final BufferedReader br = new BufferedReader(new InputStreamReader(in)); - // XXX This assumes there is no new line in the password. - password = br.readLine(); - br.close(); - } catch (MessagingException e) { - e.printStackTrace(); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - } - setPasswordEncoded(null); - return password; - } - - /** - * @deprecated These are only temporary until we move off of WebSphere. - */ - public synchronized void setPassword(final String password) { - this.password = password; - } - - /** - * @deprecated These are only temporary until we move off of WebSphere. - */ - private String getPasswordEncoded() { - return passwordEncoded; - } - - /** - * @deprecated These are only temporary until we move off of WebSphere. - */ - public void setPasswordEncoded(final String passwordEncoded) { - this.passwordEncoded = passwordEncoded; - } } \ No newline at end of file --- 197,199 ---- |