org.openpermis.editor.policy.view
Class CertificateChooser

java.lang.Object
  extended by org.openpermis.editor.policy.view.WizardDialog
      extended by org.openpermis.editor.policy.view.CertificateChooser

public class CertificateChooser
extends WizardDialog

Dialog allowing to choose a certificate.

Since:
0.9.0

Nested Class Summary
 
Nested classes/interfaces inherited from class org.openpermis.editor.policy.view.WizardDialog
WizardDialog.ContentStyle
 
Field Summary
 
Fields inherited from class org.openpermis.editor.policy.view.WizardDialog
CHOOSER_TEXT, NEXT_FOCUS, TEXT_AREA_ROWS, TEXT_FIELD_COLUMNS
 
Constructor Summary
CertificateChooser(ApplicationContext context, KeyStoreReader keyStoreReader)
          Creates a certificate browser to pick a certificate for signing.
 
Method Summary
 void cancel()
          Action to close the wizard without executing it.
protected  JComponent createContentPane(ControlFactory factory)
          Creates the content pane of this dialog.
 void execute()
          Action to execute the signing process.
 PrivateKey getSelectedPrivateKey()
          Returns the selected private key or null if no private key is selected.
 X509Certificate getSelectedX509Certificate()
          Returns the selected X509 certificate or null if no certificate is selected.
protected  boolean initialize(Component parent)
          Initialize some wizard specific fields.
 void resetKeystore()
          Resets the keystore.
 boolean show(Component parent)
          Only show if the keystore could be opened.
protected  void updateActions()
          Updates the actions according to the values in the wizard fields.
 
Methods inherited from class org.openpermis.editor.policy.view.WizardDialog
chooseFile, close, configure, configureButton, createButtonPane, createChooser, createDialogContent, createDisplayTextField, createFormBuilder, createHeaderPane, createLabel, createPasswordField, focusNextComponent, getAction, getActionMap, getApplicationContext, getButtonActions, getCancelAction, getContentStyle, getDefaultButton, getDialog, getDialogTitle, getExecuteAction, getResourceMap, getTitleDescriptionKey, getTitleIconKey, getTitleTextKey, sameAction, setNextFocusComponent, showErrorDialog, showErrorDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CertificateChooser

public CertificateChooser(ApplicationContext context,
                          KeyStoreReader keyStoreReader)
Creates a certificate browser to pick a certificate for signing.

Parameters:
context - the application context used to lookup the action and resource map.
Since:
0.9.0
Method Detail

getSelectedPrivateKey

public PrivateKey getSelectedPrivateKey()
Returns the selected private key or null if no private key is selected.

Returns:
the selectedPrivateKey.
Since:
0.9.0

getSelectedX509Certificate

public X509Certificate getSelectedX509Certificate()
Returns the selected X509 certificate or null if no certificate is selected.

Returns:
the selectedX509Certificate.
Since:
0.9.0

resetKeystore

public void resetKeystore()
Resets the keystore.

Since:
0.9.0

createContentPane

protected JComponent createContentPane(ControlFactory factory)
Description copied from class: WizardDialog
Creates the content pane of this dialog.

Overrides:
createContentPane in class WizardDialog
Parameters:
factory - the control factory to use for creating controls.
Returns:
the content pane requested.
Since:
0.9.0

updateActions

protected void updateActions()
Description copied from class: WizardDialog
Updates the actions according to the values in the wizard fields.

Specified by:
updateActions in class WizardDialog
Since:
0.9.0

show

public boolean show(Component parent)
Only show if the keystore could be opened.

Overrides:
show in class WizardDialog
Parameters:
parent - the parent component of the dialog.
Returns:
the result code of the dialog.
Since:
0.9.0

initialize

protected boolean initialize(Component parent)
Description copied from class: WizardDialog
Initialize some wizard specific fields.

Specified by:
initialize in class WizardDialog
Parameters:
parent - the parent component of the dialog.
Returns:
true if the initialization succeeded, false otherwise.
Since:
0.9.0

cancel

@Action
public void cancel()
Action to close the wizard without executing it.

Notes:
Do not call directly, this action is triggered by the wizard.
Since:
0.9.0

execute

@Action
public void execute()
Action to execute the signing process.

Notes:
Do not call directly, this action is triggered by the wizard.
Since:
0.9.0


OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:17:21
Copyright (c) 2002-2007 Ergon Informatik AG