Package uk.ac.starlink.table.jdbc
Class TextModelsAuthenticator
- java.lang.Object
-
- uk.ac.starlink.table.jdbc.TextModelsAuthenticator
-
- All Implemented Interfaces:
JDBCAuthenticator
public class TextModelsAuthenticator extends java.lang.Object implements JDBCAuthenticator
JDBC authenticator which keeps its data in the models of text GUI components (Document
objects). The advantage of this is that multiple GUI compoents can share the same data, and changing the password in one will have the effect of changing it in all.- Since:
- 13 Feb 2006
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description TextModelsAuthenticator()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
authenticate()
Obtains username and password.javax.swing.text.Document
getPasswordDocument()
Returns the text model for the password string.javax.swing.text.Document
getUserDocument()
Returns the text model for the username string.
-
-
-
Method Detail
-
getUserDocument
public javax.swing.text.Document getUserDocument()
Returns the text model for the username string.- Returns:
- username document
-
getPasswordDocument
public javax.swing.text.Document getPasswordDocument()
Returns the text model for the password string.- Returns:
- password document
-
authenticate
public java.lang.String[] authenticate()
Description copied from interface:JDBCAuthenticator
Obtains username and password. The return value is a two-element array containing the username and password to be used, in that order. Either or both of these may be null.- Specified by:
authenticate
in interfaceJDBCAuthenticator
- Returns:
- String[]{username,password}
-
-