|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.beans.AbstractBean
org.jdesktop.swingx.auth.LoginService
org.jdesktop.swingx.auth.JDBCLoginService
public class JDBCLoginService
A login service for connecting to SQL based databases via JDBC
Constructor Summary | |
---|---|
JDBCLoginService()
Default JavaBean constructor |
|
JDBCLoginService(String jndiContext)
Create a new JDBCLoginService and initializes it to connect to a database using the given params. |
|
JDBCLoginService(String driver,
String url)
Create a new JDBCLoginService and initializes it to connect to a database using the given params. |
|
JDBCLoginService(String driver,
String url,
Properties props)
Create a new JDBCLoginService and initializes it to connect to a database using the given params. |
Method Summary | |
---|---|
boolean |
authenticate(String name,
char[] password,
String server)
This method is intended to be implemented by clients wishing to authenticate a user with a given password. |
Connection |
getConnection()
|
Properties |
getProperties()
|
String |
getUrl()
|
void |
setConnection(Connection conn)
|
void |
setProperties(Properties properties)
|
void |
setUrl(String url)
|
Methods inherited from class org.jdesktop.swingx.auth.LoginService |
---|
addLoginListener, cancelAuthentication, getServer, getSynchronous, getUserRoles, removeLoginListener, setServer, setSynchronous, startAuthentication |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JDBCLoginService(String driver, String url)
driver
- url
- public JDBCLoginService(String driver, String url, Properties props)
driver
- url
- props
- public JDBCLoginService(String jndiContext)
jndiContext
- public JDBCLoginService()
Method Detail |
---|
public String getUrl()
public void setUrl(String url)
url
- set the JDBC connection urlpublic Properties getProperties()
public void setProperties(Properties properties)
properties
- miscellaneous JDBC properties to use when connecting
to the database via the JDBC driverpublic Connection getConnection()
public void setConnection(Connection conn)
public boolean authenticate(String name, char[] password, String server) throws Exception
LoginService
authenticate
in class LoginService
name
- user namepassword
- user passwordserver
- Must be either a valid JDBC URL for the type of JDBC driver you are using,
or must be a valid JNDIContext from which to get the database connection
true
on authentication success
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |