uk.ac.starlink.table.jdbc
Class TextModelsAuthenticator

java.lang.Object
  extended byuk.ac.starlink.table.jdbc.TextModelsAuthenticator
All Implemented Interfaces:
JDBCAuthenticator

public class TextModelsAuthenticator
extends 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

Constructor Summary
TextModelsAuthenticator()
          Constructor.
 
Method Summary
 String[] authenticate()
          Obtains username and password.
 Document getPasswordDocument()
          Returns the text model for the password string.
 Document getUserDocument()
          Returns the text model for the username string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextModelsAuthenticator

public TextModelsAuthenticator()
Constructor.

Method Detail

getUserDocument

public Document getUserDocument()
Returns the text model for the username string.

Returns:
username document

getPasswordDocument

public Document getPasswordDocument()
Returns the text model for the password string.

Returns:
password document

authenticate

public 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 interface JDBCAuthenticator
Returns:
String[]{username,password}

Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved.