uk.org.ogsadai.client.databrowser
Class DBMenuController

java.lang.Object
  |
  +--uk.org.ogsadai.client.databrowser.DBMenuController

public class DBMenuController
extends java.lang.Object

Controller for the various menus on the main GUI menubar. Acts as the controller in the MVC pattern, ie a buffer between the views and the model. In this case the views are the available selections from dropdown menus on the menu bar.

Version:
$Revision: 1.11 $
Author:
Paul J Graham, EPCC

Field Summary
private static java.lang.String ABOUT
           
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
private  DBGUI mGUI
           
private  DBModel mModel
           
 
Constructor Summary
DBMenuController(DBGUI gui, DBModel model)
          Construct the controller for the drop down menus of the GUI
 
Method Summary
 void about()
          Displays the "About" dialog
 void configureMessageLevelSecurityDescriptor()
          Pops up a dialog displaying message level security options and saves the selected configuration to a security descriptor.
 void enableTransportLevelEncryption()
          Switches on transport level encryption.
 void exit()
          Exit the program
 java.awt.Component getParent()
           
 void launchJoinDialog()
          Launch the dialog for running a join
 void retrieveSchema()
          Retrieves the schema from the database and displays it in a new window.
 void runJoin(DBJoinParameter parameters)
          Run a join.
 void setMessageLevelSecurityDescriptor()
          Pops up a file chooser dialog and configures the current data service resource for message level security with the selected security descriptor.
private  java.io.File writeMLSDescriptor(boolean privacy, boolean integrity, java.lang.String auth, java.lang.String delegation)
          Writes the specified message level security configuration to a security descriptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

mGUI

private DBGUI mGUI

mModel

private DBModel mModel

ABOUT

private static final java.lang.String ABOUT
See Also:
Constant Field Values
Constructor Detail

DBMenuController

public DBMenuController(DBGUI gui,
                        DBModel model)
Construct the controller for the drop down menus of the GUI

Parameters:
gui - The main GUI
model - The data model
Method Detail

exit

public void exit()
Exit the program


about

public void about()
Displays the "About" dialog


getParent

public java.awt.Component getParent()
Returns:
The parent component of this GUI component

launchJoinDialog

public void launchJoinDialog()
Launch the dialog for running a join


runJoin

public void runJoin(DBJoinParameter parameters)
Run a join. Is run as a GUIThread to keep the GUI responsive.

Parameters:
parameters - The parameters for the join

retrieveSchema

public void retrieveSchema()
Retrieves the schema from the database and displays it in a new window.


enableTransportLevelEncryption

public void enableTransportLevelEncryption()
Switches on transport level encryption.


setMessageLevelSecurityDescriptor

public void setMessageLevelSecurityDescriptor()
Pops up a file chooser dialog and configures the current data service resource for message level security with the selected security descriptor.


configureMessageLevelSecurityDescriptor

public void configureMessageLevelSecurityDescriptor()
Pops up a dialog displaying message level security options and saves the selected configuration to a security descriptor. The current data service resource is then is then configured for message level security with this security descriptor.


writeMLSDescriptor

private java.io.File writeMLSDescriptor(boolean privacy,
                                        boolean integrity,
                                        java.lang.String auth,
                                        java.lang.String delegation)
Writes the specified message level security configuration to a security descriptor. The path of the security descriptor file is chosen by the user, using a file selector dialog.

Parameters:
privacy - is privacy switched on?
integrity - is integrity switched on?
auth - authentication mechanism
delegation - delegation level
Returns:
the security descriptor