org.ssonet.examples.catalog
Class ConflictDialog

java.lang.Object
  |
  +--org.ssonet.examples.catalog.ConflictDialog
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class ConflictDialog
extends java.lang.Object
implements java.awt.event.ActionListener

This dialog can be used by an application to show the user, that a security goal negotiation conflict has occured, and asks the user, whether he wants to prevent this conflict by accepting the communication partners setting, or not.


Field Summary
(package private)  javax.swing.JDialog dialog
           
 
Constructor Summary
ConflictDialog(java.awt.Component parent, java.lang.String securityGoal, java.lang.String ownLevel, java.lang.String withOrWithout)
          Creates the conflict dialog.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Performs actions, when buttons in the dialog are pressed.
static boolean getAnswer(java.awt.Component parent, java.lang.String applicationName, int securityGoal, org.ssonet.net.ActionConfiguration ownConfig)
          Shows the ConflictDialog and returns the users answer.
static boolean getAnswer(int securityGoal, org.ssonet.net.ActionConfiguration ownConfig)
          Shows the ConflictDialog and returns the users answer.
static boolean getAnswer(java.lang.String applicationName, int securityGoal, org.ssonet.net.ActionConfiguration ownConfig)
          Shows the ConflictDialog and returns the users answer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dialog

javax.swing.JDialog dialog
Constructor Detail

ConflictDialog

public ConflictDialog(java.awt.Component parent,
                      java.lang.String securityGoal,
                      java.lang.String ownLevel,
                      java.lang.String withOrWithout)
Creates the conflict dialog. This method should not be used by an application. An application should use one of the getAnswer() methods.

Parameters:
parent - the parent component for this dialog.
securityGoal - the security goal name, where the conflict occured
ownLevel - the name of the users security goal setting
withOrWithout - "with", if the user should enforce the security goal; "without", if not.
Method Detail

getAnswer

public static boolean getAnswer(int securityGoal,
                                org.ssonet.net.ActionConfiguration ownConfig)
Shows the ConflictDialog and returns the users answer.

Parameters:
securityGoal - the security goal ID of the conflicting security goal, @see SSONETConstants .
ownConfig - the security goal configuration for the transaction
Returns:
true, if the user gives in, false, if not.

getAnswer

public static boolean getAnswer(java.lang.String applicationName,
                                int securityGoal,
                                org.ssonet.net.ActionConfiguration ownConfig)
Shows the ConflictDialog and returns the users answer.

Parameters:
applicationName - a string used as the first part of the dialogs title
securityGoal - the security goal ID of the conflicting security goal, @see SSONETConstants .
ownConfig - the security goal configuration for the transaction
Returns:
true, if the user gives in, false, if not.

getAnswer

public static boolean getAnswer(java.awt.Component parent,
                                java.lang.String applicationName,
                                int securityGoal,
                                org.ssonet.net.ActionConfiguration ownConfig)
Shows the ConflictDialog and returns the users answer.

Parameters:
parent - the parent component for this dialog. The dialog is located relative to the parent component,
applicationName - a string used as the first part of the dialogs title
securityGoal - the security goal ID of the conflicting security goal, @see SSONETConstants .
ownConfig - the security goal configuration for the transaction
Returns:
true, if the user gives in, false, if not.
See Also:
Window.setLocationRelativeTo(java.awt.Component)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Performs actions, when buttons in the dialog are pressed.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
event - the ActionEvent generated by the buttons.


Copyright © 2003 DRIM Team. All Rights Reserved.