org.objectweb.cjdbc.console.gui.session
Class GuiSession

java.lang.Object
  extended byorg.objectweb.cjdbc.console.gui.session.GuiSession

public class GuiSession
extends java.lang.Object

This class defines a GUISession

Version:
1.0
Author:
Nicolas Modrzyk

Field Summary
(package private)  java.util.ArrayList configurationFiles
           
(package private)  java.util.ArrayList controllerItems
           
(package private)  java.util.Hashtable databaseItems
           
private  boolean saveDatabaseInfoToDisk
           
 
Constructor Summary
GuiSession()
          Creates a new GUISession.java object no recorded values
 
Method Summary
 void addControllerToList(java.lang.String controller)
          Add a controller url to the list of controllers
 void addDatabaseToSession(java.lang.String databaseName, java.lang.String login, java.lang.String password)
          Add authentication to session
 void addFileToConfigurationFiles(java.io.File newFile)
          Add a file to the list of configuration files if it is not already in the session
 boolean checkControllerInSession(java.lang.String controller)
          checkif a controller is in the session
 java.lang.String getAuthenticatedDatabaseLogin(java.lang.String databaseName)
          Retrieve the login stored for this database
 java.lang.String getAuthenticatedDatabasePassword(java.lang.String databaseName)
          Retrieve the password stored for this database
 java.util.ArrayList getConfigurationFiles()
          Get the list of configuration files
 java.util.ArrayList getControllerItems()
          Returns the controllerItems value.
 java.util.Hashtable getDatabaseItems()
          Returns the databaseItems value.
 boolean isAuthenticatedDatabase(java.lang.String databaseName)
          Test if user was authenticated for this database
 void loadSessionFromFile(java.io.File sessionFile)
          Load a gui session from the give file
 void saveSessionToFile(java.io.File sessionFile)
          Save the current gui session into a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

saveDatabaseInfoToDisk

private final boolean saveDatabaseInfoToDisk
See Also:
Constant Field Values

controllerItems

java.util.ArrayList controllerItems

configurationFiles

java.util.ArrayList configurationFiles

databaseItems

java.util.Hashtable databaseItems
Constructor Detail

GuiSession

public GuiSession()
Creates a new GUISession.java object no recorded values

Method Detail

saveSessionToFile

public void saveSessionToFile(java.io.File sessionFile)
                       throws java.io.IOException
Save the current gui session into a file

Parameters:
sessionFile - the file to save the session in
Throws:
java.io.IOException - if writing causes a problem

loadSessionFromFile

public void loadSessionFromFile(java.io.File sessionFile)
                         throws java.io.IOException
Load a gui session from the give file

Parameters:
sessionFile - the file to load the session from
Throws:
java.io.IOException - if loading causes a problem

getControllerItems

public java.util.ArrayList getControllerItems()
Returns the controllerItems value.

Returns:
Returns the controllerItems.

addControllerToList

public void addControllerToList(java.lang.String controller)
Add a controller url to the list of controllers

Parameters:
controller - [ipAddress]:[portNumber]

checkControllerInSession

public boolean checkControllerInSession(java.lang.String controller)
checkif a controller is in the session

Parameters:
controller - [ipAddress]:[portNumber]
Returns:
true if controller is in session

getConfigurationFiles

public java.util.ArrayList getConfigurationFiles()
Get the list of configuration files

Returns:
the Vector of configuration files

addFileToConfigurationFiles

public void addFileToConfigurationFiles(java.io.File newFile)
Add a file to the list of configuration files if it is not already in the session

Parameters:
newFile - to add to the list

addDatabaseToSession

public void addDatabaseToSession(java.lang.String databaseName,
                                 java.lang.String login,
                                 java.lang.String password)
Add authentication to session

Parameters:
databaseName - name of the virtual database
login - login name
password - password associated to the login

isAuthenticatedDatabase

public boolean isAuthenticatedDatabase(java.lang.String databaseName)
Test if user was authenticated for this database

Parameters:
databaseName - name of the virtual database
Returns:
true if has been authenticated with success before, false otherwise

getAuthenticatedDatabaseLogin

public java.lang.String getAuthenticatedDatabaseLogin(java.lang.String databaseName)
Retrieve the login stored for this database

Parameters:
databaseName - name of the virtual database
Returns:
password as a String or null

getAuthenticatedDatabasePassword

public java.lang.String getAuthenticatedDatabasePassword(java.lang.String databaseName)
Retrieve the password stored for this database

Parameters:
databaseName - name of the virtual database
Returns:
password as a String or null

getDatabaseItems

public java.util.Hashtable getDatabaseItems()
Returns the databaseItems value.

Returns:
Returns the databaseItems.


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.