org.openpermis.editor.policy.view
Class PolicySigningWizard

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

public class PolicySigningWizard
extends SigningWizard

Wizard to sign policies.

Since:
0.3.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
PolicySigningWizard(ApplicationContext context, org.openpermis.policy.bean.PolicyBean policy, KeyStoreReader keyStoreReader)
          Creates a wizard to sign policies.
 
Method Summary
 void cancel()
          Action to close the wizard without executing it.
 void chooseCertificate()
          Action to choose the certificate used.
 void chooseOutputFile()
          Action to choose the output file.
protected  JComponent createContentPane(ControlFactory factory)
          Creates the content pane of this dialog.
protected  String createPolicyString(org.openpermis.policy.bean.PolicyBean policyBean)
          Creates a string representation of the policy of this wizard.
protected  boolean createSignedPolicy(X509Certificate x509Cert4Signing, PrivateKey privateKey4Signing, File output)
          Creates a signed policy with the specified input X509 certificate, private key and output file.
 void execute()
          Action to execute the signing process.
protected  boolean initialize(Component parent)
          Initialize some wizard specific fields.
protected  void updateActions()
          Updates the actions according to the values in the wizard fields.
 
Methods inherited from class org.openpermis.editor.policy.view.SigningWizard
generateAttributeCertificate, writeAttributeCertificate
 
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, show, showErrorDialog, showErrorDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicySigningWizard

public PolicySigningWizard(ApplicationContext context,
                           org.openpermis.policy.bean.PolicyBean policy,
                           KeyStoreReader keyStoreReader)
Creates a wizard to sign policies.

Parameters:
context - the application context used to lookup the action and resource map.
policy - the policy to export to the ace file.
Since:
0.3.0
Method Detail

createPolicyString

protected String createPolicyString(org.openpermis.policy.bean.PolicyBean policyBean)
                             throws org.openpermis.policy.io.PolicyException
Creates a string representation of the policy of this wizard.

Parameters:
policyBean - the policy to create the string representation for.
Returns:
the string requested, null in case of an error.
Throws:
PolicyException - passed on.
Since:
0.3.0

createSignedPolicy

protected boolean createSignedPolicy(X509Certificate x509Cert4Signing,
                                     PrivateKey privateKey4Signing,
                                     File output)
Creates a signed policy with the specified input X509 certificate, private key and output file.

Parameters:
x509Cert4Signing - the X509 certificate used to sign the policy.
privateKey4Signing - the private key used to sign the policy.
output - the output file.
Returns:
true if the signed policy was created, false otherwise.
Since:
0.3.0

chooseCertificate

@Action
public void chooseCertificate()
Action to choose the certificate used.

Since:
0.9.0

chooseOutputFile

@Action
public void chooseOutputFile()
Action to choose the output file.

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

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.3.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.3.0


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