org.openpermis.editor.policy.view
Class RoleAssignmentRuleEditor

java.lang.Object
  extended by org.openpermis.editor.policy.view.AbstractView
      extended by org.openpermis.editor.policy.view.AbstractEditor<RoleAssignmentRulePresenter>
          extended by org.openpermis.editor.policy.view.RoleAssignmentRuleEditor
All Implemented Interfaces:
ErrorReporter, Editor, View

public class RoleAssignmentRuleEditor
extends AbstractEditor<RoleAssignmentRulePresenter>

Tool view that displays a role assignment rule.

Since:
0.3.0

Field Summary
private  JCheckBox absolutePeriodCheckBox
           
private  JComboBox authority
          Chooser for the authority.
private  org.openpermis.policy.TimeStamp defaultZoneTimeStamp
           
private  JLabel delegationDepthLabel
           
private  org.jdesktop.swingx.JXDatePicker endDatePicker
           
private static org.slf4j.Logger LOGGER
          The logger object of this class.
private  JCheckBox maximumUpToCheckBox
           
private  org.jdesktop.swingx.JXDatePicker maximumUpToDatePicker
           
private  int maximumUpToDays
           
private static int MILLIS_IN_A_DAY
           
private  JCheckBox minimumFromCheckBox
           
private  org.jdesktop.swingx.JXDatePicker minimumFromDatePicker
           
private  int minimumFromDays
           
private  JCheckBox minimumUpToCheckBox
           
private  org.jdesktop.swingx.JXDatePicker minimumUpToDatePicker
           
private  int minimumUpToDays
           
private  org.jdesktop.swingx.JXDatePicker referenceDatePicker
           
private  CheckList<org.openpermis.policy.Role> roleList
          The list of roles in the role assignment rule.
private  org.jdesktop.swingx.JXDatePicker startDatePicker
           
private  JComboBox subjectDomain
          Chooser for the subject domain of the rule.
 
Constructor Summary
RoleAssignmentRuleEditor(org.jdesktop.application.ApplicationContext context, AdapterTrader trader, RoleAssignmentRulePresenter presenter)
          Creates role assignment rule editor.
 
Method Summary
 void addAuthority()
           
 void addSubjectDomain()
           
private  Date addToReference(int daysNumber)
           
private  JComponent attributeAuthority()
           
protected  void bind(org.jdesktop.beansbinding.BindingGroup bindings)
          Binds all components to the presenter.
private  JComponent depthAndConstraints()
           
 void editAuthority()
           
 void editSubjectDomain()
           
private  int extractMaximumUpToDays()
           
private  int extractMinimumFromDays()
           
private  int extractMinimumUpToDays()
           
 void fillContentPane(JPanel panel)
           
 void removeAuthority()
           
 void removeSubjectDomain()
           
private  JComponent roleList()
           
 void setConstraint(org.openpermis.basic.TimePeriodConstraint newConstraint)
          Sets the constraint.
private  void setMaximumValidUpToDayNumber(int daysNumber)
           
private  void setMinimumValidFromDayNumber(int daysNumber)
           
private  void setMinimumValidUpToDayNumber(int daysNumber)
           
private  JComponent subjectDomainChooser()
           
 void updateConstraintAtModel()
          Updates the the constraints in the model.
 
Methods inherited from class org.openpermis.editor.policy.view.AbstractEditor
adjustTitleParameters, canClose, contentPaneCreated, createContentPane, dispose, getModelSerialNumber, getPresenter, getTitleParameters, showYesNoDialog
 
Methods inherited from class org.openpermis.editor.policy.view.AbstractView
attach, canEditPart, closeView, detach, editPart, getActionMap, getAdapteeTrader, getContentPane, getIcon, getResourceMap, getTitle, 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, detach, getContentPane, getIcon, getTitle
 

Field Detail

LOGGER

private static final org.slf4j.Logger LOGGER
The logger object of this class.

Since:
0.3.0

MILLIS_IN_A_DAY

private static final int MILLIS_IN_A_DAY
Constant Field Value:
86400000
Since:
0.3.0

authority

private JComboBox authority
Chooser for the authority.

Since:
0.3.0

subjectDomain

private JComboBox subjectDomain
Chooser for the subject domain of the rule.

Since:
0.3.0

roleList

private CheckList<org.openpermis.policy.Role> roleList
The list of roles in the role assignment rule.

Since:
0.3.0

delegationDepthLabel

private JLabel delegationDepthLabel
Since:
0.3.0

absolutePeriodCheckBox

private JCheckBox absolutePeriodCheckBox
Since:
0.3.0

startDatePicker

private org.jdesktop.swingx.JXDatePicker startDatePicker
Since:
0.3.0

endDatePicker

private org.jdesktop.swingx.JXDatePicker endDatePicker
Since:
0.3.0

referenceDatePicker

private org.jdesktop.swingx.JXDatePicker referenceDatePicker
Since:
0.3.0

minimumFromCheckBox

private JCheckBox minimumFromCheckBox
Since:
0.3.0

minimumFromDatePicker

private org.jdesktop.swingx.JXDatePicker minimumFromDatePicker
Since:
0.3.0

minimumFromDays

private int minimumFromDays
Since:
0.3.0

minimumUpToCheckBox

private JCheckBox minimumUpToCheckBox
Since:
0.3.0

minimumUpToDatePicker

private org.jdesktop.swingx.JXDatePicker minimumUpToDatePicker
Since:
0.3.0

minimumUpToDays

private int minimumUpToDays
Since:
0.3.0

maximumUpToCheckBox

private JCheckBox maximumUpToCheckBox
Since:
0.3.0

maximumUpToDatePicker

private org.jdesktop.swingx.JXDatePicker maximumUpToDatePicker
Since:
0.3.0

maximumUpToDays

private int maximumUpToDays
Since:
0.3.0

defaultZoneTimeStamp

private org.openpermis.policy.TimeStamp defaultZoneTimeStamp
Since:
0.3.0
Constructor Detail

RoleAssignmentRuleEditor

public RoleAssignmentRuleEditor(org.jdesktop.application.ApplicationContext context,
                                AdapterTrader trader,
                                RoleAssignmentRulePresenter presenter)
Creates role assignment rule editor.

Parameters:
context - the application context used to lookup the action and resource map.
presenter - the presenter of this view.
Since:
0.3.0
Method Detail

updateConstraintAtModel

public void updateConstraintAtModel()
Updates the the constraints in the model.

Since:
0.3.0

setConstraint

public void setConstraint(org.openpermis.basic.TimePeriodConstraint newConstraint)
Sets the constraint.

Parameters:
newConstraint - the constraint.
Since:
0.3.0

extractMaximumUpToDays

private int extractMaximumUpToDays()
Since:
0.3.0

extractMinimumUpToDays

private int extractMinimumUpToDays()
Since:
0.3.0

extractMinimumFromDays

private int extractMinimumFromDays()
Since:
0.3.0

setMaximumValidUpToDayNumber

private void setMaximumValidUpToDayNumber(int daysNumber)
Since:
0.3.0

setMinimumValidUpToDayNumber

private void setMinimumValidUpToDayNumber(int daysNumber)
Since:
0.3.0

setMinimumValidFromDayNumber

private void setMinimumValidFromDayNumber(int daysNumber)
Since:
0.3.0

addToReference

private Date addToReference(int daysNumber)
Since:
0.3.0

addAuthority

@Action
public void addAuthority()
Since:
0.3.0

removeAuthority

@Action
public void removeAuthority()
Since:
0.3.0

editAuthority

@Action
public void editAuthority()
Since:
0.3.0

addSubjectDomain

@Action
public void addSubjectDomain()
Since:
0.3.0

removeSubjectDomain

@Action
public void removeSubjectDomain()
Since:
0.3.0

editSubjectDomain

@Action
public void editSubjectDomain()
Since:
0.3.0

bind

protected void bind(org.jdesktop.beansbinding.BindingGroup bindings)
Description copied from class: AbstractEditor
Binds all components to the presenter.

This method is called after creation of the content pane.

Specified by:
bind in class AbstractEditor<RoleAssignmentRulePresenter>
Parameters:
bindings - the binding group to add bindings to.
Since:
0.3.0

attributeAuthority

private JComponent attributeAuthority()
Since:
0.3.0

subjectDomainChooser

private JComponent subjectDomainChooser()
Since:
0.3.0

roleList

private JComponent roleList()
Since:
0.3.0

depthAndConstraints

private JComponent depthAndConstraints()
Since:
0.3.0

fillContentPane

public void fillContentPane(JPanel panel)
Specified by:
fillContentPane in class AbstractEditor<RoleAssignmentRulePresenter>
Since:
0.3.0


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