org.openpermis.editor.policy.view
Class RoleAssignmentTool

java.lang.Object
  extended by org.openpermis.editor.policy.view.AbstractView
      extended by org.openpermis.editor.policy.view.AbstractToolView<RoleAssignmentPresenter>
          extended by org.openpermis.editor.policy.view.RoleAssignmentTool
All Implemented Interfaces:
ErrorReporter, Tool, View

public class RoleAssignmentTool
extends AbstractToolView<RoleAssignmentPresenter>

Displays (1) the possible list of roles to assign, (2) the list of subjects that hold a specific role, and (3) the list of subjects that may hold a specific role. Allows to assign roles to subjects.

Since:
0.9.0

Constructor Summary
RoleAssignmentTool(ApplicationContext context, Adapter adapter, IdentityFinderComponent identityFinderComponent, SubjectFinderComponent subjectFinderComponent, KeyStoreReader keyStoreReader)
          Creates a role assignment tool view.
 
Method Summary
 void assignRole()
           
protected  void attachPresenter(RoleAssignmentPresenter presenter, org.jdesktop.beansbinding.BindingGroup bindings)
          Attaches any listeners required to the new presenter and binds components.
 void commitChanges()
           
 void connect()
           
protected  void contentPaneCreated()
          Hook called after the content pane has been created.
protected  JComponent createContentPane()
          Creates the content pane of this view.
protected  void detachPresenter(RoleAssignmentPresenter presenter)
          Unlinks any listeners from the specified old presenter.
 String getDefaultLocation()
          Returns the desired default location relative to the working area for this tool view.
 void openIdentityFinder()
           
 void openKeystoreChooser()
           
 void openSubjectFinder()
           
 void refresh(org.openpermis.policy.bean.PolicyBean policy, PolicyContext context)
          Instructs the tool to refresh itself with the specified policy.
 void revokeRole()
           
protected  void updateContent()
          Prompts the tool to update its content according to the presenter state.
 
Methods inherited from class org.openpermis.editor.policy.view.AbstractToolView
createToolBar, getPresenter, getToolBar, getToolIdentifier, setPresenter
 
Methods inherited from class org.openpermis.editor.policy.view.AbstractView
attach, canClose, canEditPart, closeView, createEditor, createFormBuilder, createTranslationConverter, detach, editPart, getAction, getActionMap, getAdapteeTrader, getApplicationContext, getContentPane, getControlFactory, getDefaultFocusComponent, getIcon, getParentView, getResourceMap, getTitle, getTitleParameters, getViewContext, isEmbedded, openView, setEnabled, setParentView, showStatusError, updateTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openpermis.editor.policy.view.View
attach, canClose, detach, getContentPane, getDefaultFocusComponent, getIcon, getParentView, getTitle, isEmbedded, setParentView
 

Constructor Detail

RoleAssignmentTool

public RoleAssignmentTool(ApplicationContext context,
                          Adapter adapter,
                          IdentityFinderComponent identityFinderComponent,
                          SubjectFinderComponent subjectFinderComponent,
                          KeyStoreReader keyStoreReader)
Creates a role assignment tool view.

Parameters:
context - application meta data for the tool.
adapter - to convert objects.
identityFinderComponent - the identity finder component used in the tool.
subjectFinderComponent - the subject finder component used in the tool.
Since:
0.9.0
Method Detail

openSubjectFinder

@Action
public void openSubjectFinder()
Since:
0.9.0

openIdentityFinder

@Action
public void openIdentityFinder()
Since:
0.9.0

openKeystoreChooser

@Action
public void openKeystoreChooser()
Since:
0.9.0

connect

@Action
public void connect()
Since:
0.9.0

assignRole

@Action
public void assignRole()
Since:
0.9.0

revokeRole

@Action
public void revokeRole()
Since:
0.9.0

commitChanges

@Action
public void commitChanges()
Since:
0.9.0

createContentPane

protected JComponent createContentPane()
Description copied from class: AbstractView
Creates the content pane of this view.

Specified by:
createContentPane in class AbstractView
Returns:
the content pane of this view, must not be null.
Since:
0.9.0

refresh

public void refresh(org.openpermis.policy.bean.PolicyBean policy,
                    PolicyContext context)
Description copied from interface: Tool
Instructs the tool to refresh itself with the specified policy.

Called whenever the policy that this view renders changes.

Parameters:
policy - the policy to refresh with.
context - the policy context to use.
Since:
0.9.0

attachPresenter

protected void attachPresenter(RoleAssignmentPresenter presenter,
                               org.jdesktop.beansbinding.BindingGroup bindings)
Description copied from class: AbstractToolView
Attaches any listeners required to the new presenter and binds components.

The default implementation does nothing.

Overrides:
attachPresenter in class AbstractToolView<RoleAssignmentPresenter>
Parameters:
presenter - the new presenter to attach to.
bindings - the binding group to add bindings to.
Since:
0.9.0

detachPresenter

protected void detachPresenter(RoleAssignmentPresenter presenter)
Description copied from class: AbstractToolView
Unlinks any listeners from the specified old presenter.

This is called before a new presenter is set.

The default implementation removes any bean bindings.

Overrides:
detachPresenter in class AbstractToolView<RoleAssignmentPresenter>
Parameters:
presenter - the presenter to unlink.
See Also:
AbstractToolView.setPresenter(Presenter)
Since:
0.9.0

contentPaneCreated

protected void contentPaneCreated()
Description copied from class: AbstractView
Hook called after the content pane has been created.

Overrides:
contentPaneCreated in class AbstractToolView<RoleAssignmentPresenter>
Since:
0.9.0

updateContent

protected void updateContent()
Description copied from class: AbstractToolView
Prompts the tool to update its content according to the presenter state.

The default implementation does nothing.

Overrides:
updateContent in class AbstractToolView<RoleAssignmentPresenter>
Since:
0.9.0

getDefaultLocation

public String getDefaultLocation()
Description copied from interface: Tool
Returns the desired default location relative to the working area for this tool view.

Specified by:
getDefaultLocation in interface Tool
Overrides:
getDefaultLocation in class AbstractToolView<RoleAssignmentPresenter>
Returns:
the desired default location of this tool view.
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