org.openpermis.editor.policy.view
Class RoleAssignmentWizard

java.lang.Object
  extended by org.openpermis.editor.policy.view.RoleAssignmentWizard

public class RoleAssignmentWizard
extends Object

Wizard to create an attribute certificates assigning roles to a subject.

Since:
0.3.0

Constructor Summary
RoleAssignmentWizard(org.jdesktop.application.ApplicationContext context, org.openpermis.policy.bean.PolicyBean policy)
          Creates a wizard to create an attribute certificates assigning roles to a subject.
 
Method Summary
 void cancel()
          Action to close the wizard without executing it.
protected  boolean createAttributeCertificate(File input, char[] pw, File output)
          Creates a an attribute certificate with the specified input pkcs12 file, password and output file.
protected  org.openpermis.cert.KeyStoreReader createKeyStoreReader(File input, char[] pw)
          Creates a key store reader for the specified input file and password.
 void execute()
          Action to execute the signing process.
protected  org.openpermis.cert.AttributeCertificate generateAttributeCertificate(org.openpermis.cert.KeyStoreReader rd, org.openpermis.cert.Attribute rolesAttribute)
          Generates an attribute certificate for the specified key store reader and policy.
 void show(Component parent)
          Starts the wizard.
protected  void showErrorDialog(Component parent, String key, Object... args)
          Shows an error dialog with the specified title, message and paramters.
protected  void showErrorDialog(String key, Object... args)
          Shows an error dialog with the specified title, message and paramters.
protected  boolean writeAttributeCertificate(File output, org.openpermis.cert.AttributeCertificate ac)
          Encodes and writes an attribute certificate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoleAssignmentWizard

public RoleAssignmentWizard(org.jdesktop.application.ApplicationContext context,
                            org.openpermis.policy.bean.PolicyBean policy)
Creates a wizard to create an attribute certificates assigning roles to a subject.

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

showErrorDialog

protected void showErrorDialog(String key,
                               Object... args)
Shows an error dialog with the specified title, message and paramters.

Parameters:
key - translation key for the title.
args - optional parameters for the title and message.
Since:
0.3.0

showErrorDialog

protected void showErrorDialog(Component parent,
                               String key,
                               Object... args)
Shows an error dialog with the specified title, message and paramters.

Parameters:
parent - the parent component to show the error dialog for.
key - translation key for the title.
args - optional parameters for the title and message.
Since:
0.3.0

show

public void show(Component parent)
Starts the wizard.

Parameters:
parent - the parent component of the dialog.
Since:
0.3.0

createKeyStoreReader

protected org.openpermis.cert.KeyStoreReader createKeyStoreReader(File input,
                                                                  char[] pw)
Creates a key store reader for the specified input file and password.

Parameters:
input - the input file to read the pkcs12 data from.
pw - the password for the pkcs12 file.
Returns:
the key store reader requested, null if the key store cannot be read.
Since:
0.3.0

generateAttributeCertificate

protected org.openpermis.cert.AttributeCertificate generateAttributeCertificate(org.openpermis.cert.KeyStoreReader rd,
                                                                                org.openpermis.cert.Attribute rolesAttribute)
Generates an attribute certificate for the specified key store reader and policy.

Parameters:
rd - the key store reader to use for creation of the attribute certificate.
rolesAttribute - the roles attribute.
Returns:
the attribute certificate generated, null in case of an error.
Since:
0.3.0

writeAttributeCertificate

protected boolean writeAttributeCertificate(File output,
                                            org.openpermis.cert.AttributeCertificate ac)
Encodes and writes an attribute certificate.

Parameters:
output - the output file to write to.
ac - the certificate to write.
Returns:
true if the output file was written, false in case of an error.
Since:
0.3.0

createAttributeCertificate

protected boolean createAttributeCertificate(File input,
                                             char[] pw,
                                             File output)
Creates a an attribute certificate with the specified input pkcs12 file, password and output file.

Parameters:
input - the pkcs12 input file.
pw - the password for the pkcs12 input file.
output - the output file.
Returns:
true if the attribute certificate was created, false otherwise.
Since:
0.3.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


PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:15:11
Copyright (c) 2002-2007 Ergon Informatik AG