Moved PersistenceException into com.samskivert.io because it's not
specific to JDBC. git-svn-id: https://samskivert.googlecode.com/svn/trunk@330 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: PersistenceException.java,v 1.1 2001/09/20 01:53:19 mdb Exp $
|
// $Id: PersistenceException.java,v 1.2 2001/09/21 03:01:46 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -18,12 +18,12 @@
|
|||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
package com.samskivert.jdbc;
|
package com.samskivert.io;
|
||||||
|
|
||||||
import org.apache.commons.util.exception.NestableException;
|
import org.apache.commons.util.exception.NestableException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A persistence exception can be thrown when an error occurs in the
|
* A persistence exception can be thrown when an error occurs in
|
||||||
* underlying persistence code. By encapsulating errors, one retains the
|
* underlying persistence code. By encapsulating errors, one retains the
|
||||||
* ability to make changes to the implementation structure without
|
* ability to make changes to the implementation structure without
|
||||||
* affecting the interface to persistence services presented to the
|
* affecting the interface to persistence services presented to the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: ConnectionProvider.java,v 1.1 2001/09/20 01:53:19 mdb Exp $
|
// $Id: ConnectionProvider.java,v 1.2 2001/09/21 03:01:46 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -22,6 +22,8 @@ package com.samskivert.jdbc;
|
|||||||
|
|
||||||
import java.sql.*;
|
import java.sql.*;
|
||||||
|
|
||||||
|
import com.samskivert.io.PersistenceException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* As the repository aims to interface with whatever database pooling
|
* As the repository aims to interface with whatever database pooling
|
||||||
* services a project cares to use, it obtains all of its database
|
* services a project cares to use, it obtains all of its database
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: Repository.java,v 1.10 2001/09/20 01:53:19 mdb Exp $
|
// $Id: Repository.java,v 1.11 2001/09/21 03:01:46 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -23,6 +23,8 @@ package com.samskivert.jdbc;
|
|||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
import com.samskivert.io.PersistenceException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The repository class provides basic functionality upon which to build
|
* The repository class provides basic functionality upon which to build
|
||||||
* an interface to a repository of information stored in a database (a
|
* an interface to a repository of information stored in a database (a
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: SimpleRepository.java,v 1.2 2001/09/20 02:09:09 mdb Exp $
|
// $Id: SimpleRepository.java,v 1.3 2001/09/21 03:01:46 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -24,6 +24,7 @@ import java.sql.*;
|
|||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import com.samskivert.Log;
|
import com.samskivert.Log;
|
||||||
|
import com.samskivert.io.PersistenceException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The simple repository should be used for a repository that only needs
|
* The simple repository should be used for a repository that only needs
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: StaticConnectionProvider.java,v 1.1 2001/09/20 01:53:20 mdb Exp $
|
// $Id: StaticConnectionProvider.java,v 1.2 2001/09/21 03:01:46 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -25,6 +25,7 @@ import java.sql.*;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import com.samskivert.Log;
|
import com.samskivert.Log;
|
||||||
|
import com.samskivert.io.PersistenceException;
|
||||||
import com.samskivert.util.ConfigUtil;
|
import com.samskivert.util.ConfigUtil;
|
||||||
import com.samskivert.util.PropertiesUtil;
|
import com.samskivert.util.PropertiesUtil;
|
||||||
import com.samskivert.util.StringUtil;
|
import com.samskivert.util.StringUtil;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: UserExistsException.java,v 1.4 2001/09/20 01:53:20 mdb Exp $
|
// $Id: UserExistsException.java,v 1.5 2001/09/21 03:01:46 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
package com.samskivert.servlet.user;
|
package com.samskivert.servlet.user;
|
||||||
|
|
||||||
import com.samskivert.jdbc.PersistenceException;
|
import com.samskivert.io.PersistenceException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Thrown during user account creation when a user with the requested
|
* Thrown during user account creation when a user with the requested
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: UserManager.java,v 1.9 2001/09/20 01:53:20 mdb Exp $
|
// $Id: UserManager.java,v 1.10 2001/09/21 03:01:46 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -25,8 +25,8 @@ import java.util.Properties;
|
|||||||
import javax.servlet.http.*;
|
import javax.servlet.http.*;
|
||||||
|
|
||||||
import com.samskivert.Log;
|
import com.samskivert.Log;
|
||||||
|
import com.samskivert.io.PersistenceException;
|
||||||
import com.samskivert.jdbc.ConnectionProvider;
|
import com.samskivert.jdbc.ConnectionProvider;
|
||||||
import com.samskivert.jdbc.PersistenceException;
|
|
||||||
import com.samskivert.servlet.RedirectException;
|
import com.samskivert.servlet.RedirectException;
|
||||||
import com.samskivert.servlet.util.RequestUtils;
|
import com.samskivert.servlet.util.RequestUtils;
|
||||||
import com.samskivert.util.*;
|
import com.samskivert.util.*;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: UserRepository.java,v 1.17 2001/09/20 01:53:20 mdb Exp $
|
// $Id: UserRepository.java,v 1.18 2001/09/21 03:01:46 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -28,6 +28,7 @@ import java.util.Properties;
|
|||||||
import org.apache.regexp.*;
|
import org.apache.regexp.*;
|
||||||
|
|
||||||
import com.samskivert.Log;
|
import com.samskivert.Log;
|
||||||
|
import com.samskivert.io.PersistenceException;
|
||||||
import com.samskivert.jdbc.*;
|
import com.samskivert.jdbc.*;
|
||||||
import com.samskivert.jdbc.jora.*;
|
import com.samskivert.jdbc.jora.*;
|
||||||
import com.samskivert.util.HashIntMap;
|
import com.samskivert.util.HashIntMap;
|
||||||
@@ -81,7 +82,8 @@ public class UserRepository extends JORARepository
|
|||||||
*/
|
*/
|
||||||
public int createUser (String username, String password,
|
public int createUser (String username, String password,
|
||||||
String realname, String email)
|
String realname, String email)
|
||||||
throws InvalidUsernameException, UserExistsException, PersistenceException
|
throws InvalidUsernameException, UserExistsException,
|
||||||
|
PersistenceException
|
||||||
{
|
{
|
||||||
// check minimum length
|
// check minimum length
|
||||||
if (username.length() < MINIMUM_USERNAME_LENGTH) {
|
if (username.length() < MINIMUM_USERNAME_LENGTH) {
|
||||||
|
|||||||
Reference in New Issue
Block a user