org.openpermis.editor.policy.view
Class TargetAccessRuleListTool

java.lang.Object
  extended by org.openpermis.editor.policy.view.AbstractView
      extended by org.openpermis.editor.policy.view.AbstractToolView<TargetAccessRuleListPresenter>
          extended by org.openpermis.editor.policy.view.TargetAccessRuleListTool
All Implemented Interfaces:
PropertyChangeListener, EventListener, ErrorReporter, Tool, View

public class TargetAccessRuleListTool
extends AbstractToolView<TargetAccessRuleListPresenter>
implements PropertyChangeListener

Tool view that displays all target access rules in a policy.

Since:
0.1.0

Field Summary
 
Fields inherited from class org.openpermis.editor.policy.view.AbstractToolView
DEFAULT_LOCATION
 
Constructor Summary
TargetAccessRuleListTool(org.jdesktop.application.ApplicationContext context, AdapterTrader trader)
          Creates an target access rules tool view.
 
Method Summary
 void addRule()
          Command to add a new target access rule.
protected  void attachPresenter(TargetAccessRuleListPresenter presenter, org.jdesktop.beansbinding.BindingGroup bindings)
          Attaches any listeners required to the new presenter and binds components.
 JComponent createContentPane()
          Creates the content pane of this view.
protected  void detachPresenter(TargetAccessRuleListPresenter presenter)
          Unlinks any listeners from the specified old presenter.
 void editRule()
          Command to edit the active target access rule.
 void propertyChange(PropertyChangeEvent event)
           
 void refresh(org.openpermis.policy.bean.PolicyBean policy, PolicyContext context)
          Instructs the tool to refresh itself with the specified policy.
 void removeRule()
          Command to remove the active target access rule.
protected  void updateActions()
          Prompts the tool to update its actions according to the presenter state.
 
Methods inherited from class org.openpermis.editor.policy.view.AbstractToolView
contentPaneCreated, createToolBar, getDefaultLocation, getPresenter, getToolBar, getToolIdentifier, setPresenter
 
Methods inherited from class org.openpermis.editor.policy.view.AbstractView
attach, canClose, canEditPart, closeView, detach, editPart, getActionMap, getAdapteeTrader, getContentPane, getIcon, getResourceMap, getTitle, getTitleParameters, getViewContext, label, openView, showStatusError, toolBar, 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, getIcon, getTitle
 

Constructor Detail

TargetAccessRuleListTool

public TargetAccessRuleListTool(org.jdesktop.application.ApplicationContext context,
                                AdapterTrader trader)
Creates an target access rules tool view.

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

addRule

@Action
public void addRule()
Command to add a new target access rule.

Since:
0.1.0

removeRule

@Action
public void removeRule()
Command to remove the active target access rule.

Since:
0.1.0

editRule

@Action
public void editRule()
Command to edit the active target access rule.

Since:
0.1.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.

Specified by:
refresh in interface Tool
Parameters:
policy - the policy to refresh with.
context - the policy context to use.
Since:
0.1.0

updateActions

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

The default implementation does nothing.

Overrides:
updateActions in class AbstractToolView<TargetAccessRuleListPresenter>
Since:
0.1.0

detachPresenter

protected void detachPresenter(TargetAccessRuleListPresenter 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<TargetAccessRuleListPresenter>
Parameters:
presenter - the presenter to unlink.
See Also:
AbstractToolView.setPresenter(Presenter)
Since:
0.1.0

attachPresenter

protected void attachPresenter(TargetAccessRuleListPresenter 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 initializes the content pane if necessary.

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

createContentPane

public 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.1.0

propertyChange

public void propertyChange(PropertyChangeEvent event)
Specified by:
propertyChange in interface PropertyChangeListener
Since:
0.1.0


PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:33
Copyright (c) 2002-2007 Ergon Informatik AG