org.openpermis.editor.policy.presenter
Class TargetAccessRulePresenter

java.lang.Object
  extended by org.openpermis.editor.policy.presenter.Presenter<M>
      extended by org.openpermis.editor.policy.presenter.PartPresenter<org.openpermis.policy.bean.TargetAccessRuleBean>
          extended by org.openpermis.editor.policy.presenter.TargetAccessRulePresenter

public class TargetAccessRulePresenter
extends PartPresenter<org.openpermis.policy.bean.TargetAccessRuleBean>

Presenter for a single TargetAccessRuleBean.

Since:
0.1.0

Field Summary
private  org.openpermis.policy.Predicate condition
          This target access rule's condition.
private static org.slf4j.Logger LOGGER
          The logger object of this class.
private  org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.bean.ObligationBean> obligations
          The obligations of this targetaccessrule-view as observable collection.
private  org.jdesktop.observablecollections.ObservableListListener obligationsUpdater
          Updater that keeps the model in sync with the observable obligation list.
private  org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.Role> roles
          The roles of this targetaccessrule-view as observable collection.
private  org.jdesktop.observablecollections.ObservableListListener rolesUpdater
          Updater that keeps the model in sync with the observable roles list.
private  org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.bean.TargetBean> targets
          The targets of this targetaccessrule-view as observable collection.
private  org.jdesktop.observablecollections.ObservableListListener targetsUpdater
          Updater that keeps the model in sync with the observable targets list.
 
Constructor Summary
TargetAccessRulePresenter(org.openpermis.policy.bean.TargetAccessRuleBean model, PolicyContext context)
          Creates a new target access rule presenter.
 
Method Summary
 void addObligation(EditPartCommand<org.openpermis.policy.bean.ObligationBean> editPartCommand)
           
 void addTarget(EditPartCommand<org.openpermis.policy.bean.TargetBean> editPartCommand)
           
private  org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.bean.ObligationBean> createObligationList(org.openpermis.policy.bean.TargetAccessRuleBean model)
          Creates the initial obligation list for the specified model.
private  org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.Role> createRoleList(org.openpermis.policy.bean.TargetAccessRuleBean model)
          Creates the initial role list for the specified model.
private  org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.bean.TargetBean> createTargetList(org.openpermis.policy.bean.TargetAccessRuleBean model)
          Creates the initial target list for the specified model.
 org.openpermis.policy.Predicate getCondition()
          Returns the condition.
 org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.bean.ObligationBean> getObligations()
          The list of obligations of this targetaccessrule.
 org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.Role> getRoles()
          The list of roles of this targetaccessrule.
 org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.bean.TargetBean> getTargets()
          The list of targets of this targetaccessrule.
 void removeActiveObligation(org.openpermis.policy.bean.ObligationBean activeObligation)
          Removes the active obligation in the whole policy.
 void removeActiveTarget(org.openpermis.policy.bean.TargetBean activeTarget)
          Removes the active target in the whole policy.
private  void updateAddedRolesAtPresenter(org.openpermis.policy.bean.RoleCollection modelRoles, org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.Role> list)
           
 void updateCondition()
          Handler for changes in the condition of a targetaccessrule bean.
 void updateConditionAtModel(org.openpermis.policy.Predicate predicate)
          Writes the condition in the presenter to the model.
private  void updateConditionAtPresenter()
          Writes the condition in the presenter according to the model.
private  void updateDeletedRolesAtPresenter(org.openpermis.policy.bean.RoleCollection modelRoles, org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.Role> list)
           
 void updateObligations()
          Handler for changes in the obligations of a targetaccessrule bean.
private  void updateObligationsAtModel()
          Writes the obligations in the presenter to the model.
private  void updateObligationsAtPresenter()
          Writes the obligations in the presenter according to the model.
 void updateRoles()
          Handler for changes in the roles of a targetaccessrule bean.
private  void updateRolesAtModel()
          Writes the roles in the presenter to the model.
private  void updateRolesAtPresenter()
          Writes the roles in the presenter according to the model.
 void updateTargets()
          Handler for changes in the targets of a targetaccessrule bean.
private  void updateTargetsAtModel()
          Writes the targets in the presenter to the model.
private  void updateTargetsAtPresenter()
          Writes the targets in the presenter according to the model.
 
Methods inherited from class org.openpermis.editor.policy.presenter.PartPresenter
change, change, containsSerial, createChangeCommand, createCollectionAtPresenter, dispose, execute, getActionPool, getAuthorityPool, getContext, getModelSerialNumber, getObligationPool, getPartBeanFactory, getResourceDomainPool, getRolePool, getSubjectDomainPool, getTargetPool, indexOfBySerial, sameSerial, updateCollectionAtPresenter
 
Methods inherited from class org.openpermis.editor.policy.presenter.Presenter
addPropertyChangeListener, firePropertyChange, getModel, getTitleParameters, removePropertyChangeListener, setTitleParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

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

Since:
0.1.0

targets

private final org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.bean.TargetBean> targets
The targets of this targetaccessrule-view as observable collection.

Since:
0.1.0

obligations

private final org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.bean.ObligationBean> obligations
The obligations of this targetaccessrule-view as observable collection.

Since:
0.3.0

roles

private final org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.Role> roles
The roles of this targetaccessrule-view as observable collection.

Since:
0.1.0

rolesUpdater

private final org.jdesktop.observablecollections.ObservableListListener rolesUpdater
Updater that keeps the model in sync with the observable roles list.

Since:
0.1.0

targetsUpdater

private final org.jdesktop.observablecollections.ObservableListListener targetsUpdater
Updater that keeps the model in sync with the observable targets list.

Since:
0.1.0

obligationsUpdater

private final org.jdesktop.observablecollections.ObservableListListener obligationsUpdater
Updater that keeps the model in sync with the observable obligation list.

Since:
0.3.0

condition

private org.openpermis.policy.Predicate condition
This target access rule's condition.

Since:
0.3.0
Constructor Detail

TargetAccessRulePresenter

public TargetAccessRulePresenter(org.openpermis.policy.bean.TargetAccessRuleBean model,
                                 PolicyContext context)
Creates a new target access rule presenter.

Parameters:
model - the target access rule to work on, must not be null.
context - policy context that provides additional information. *
Since:
0.1.0
Method Detail

getCondition

public org.openpermis.policy.Predicate getCondition()
Returns the condition.

Returns:
the returned condition.
Since:
0.3.0

createRoleList

private org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.Role> createRoleList(org.openpermis.policy.bean.TargetAccessRuleBean model)
Creates the initial role list for the specified model.

Parameters:
model - the model to create the list for.
Returns:
the list, never null.
Since:
0.1.0

createTargetList

private org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.bean.TargetBean> createTargetList(org.openpermis.policy.bean.TargetAccessRuleBean model)
Creates the initial target list for the specified model.

Parameters:
model - the model to create the list for.
Returns:
the list, never null.
Since:
0.1.0

createObligationList

private org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.bean.ObligationBean> createObligationList(org.openpermis.policy.bean.TargetAccessRuleBean model)
Creates the initial obligation list for the specified model.

Parameters:
model - the model to create the list for.
Returns:
the list, never null.
Since:
0.3.0

updateRolesAtModel

private void updateRolesAtModel()
Writes the roles in the presenter to the model.

Since:
0.1.0

updateTargetsAtModel

private void updateTargetsAtModel()
Writes the targets in the presenter to the model.

Since:
0.1.0

updateObligationsAtModel

private void updateObligationsAtModel()
Writes the obligations in the presenter to the model.

Since:
0.3.0

updateRolesAtPresenter

private void updateRolesAtPresenter()
Writes the roles in the presenter according to the model.

Since:
0.1.0

updateConditionAtModel

public void updateConditionAtModel(org.openpermis.policy.Predicate predicate)
Writes the condition in the presenter to the model.

Since:
0.3.0

updateConditionAtPresenter

private void updateConditionAtPresenter()
Writes the condition in the presenter according to the model.

Since:
0.3.0

updateAddedRolesAtPresenter

private void updateAddedRolesAtPresenter(org.openpermis.policy.bean.RoleCollection modelRoles,
                                         org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.Role> list)
Since:
0.3.0

updateDeletedRolesAtPresenter

private void updateDeletedRolesAtPresenter(org.openpermis.policy.bean.RoleCollection modelRoles,
                                           org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.Role> list)
Since:
0.3.0

updateTargetsAtPresenter

private void updateTargetsAtPresenter()
Writes the targets in the presenter according to the model.

Since:
0.1.0

updateObligationsAtPresenter

private void updateObligationsAtPresenter()
Writes the obligations in the presenter according to the model.

Since:
0.3.0

getRoles

public org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.Role> getRoles()
The list of roles of this targetaccessrule.

Returns:
the list of roles of this targetaccessrule.
Since:
0.1.0

getTargets

public org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.bean.TargetBean> getTargets()
The list of targets of this targetaccessrule.

Returns:
the list of target of this targetaccessrule.
Since:
0.1.0

getObligations

public org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.bean.ObligationBean> getObligations()
The list of obligations of this targetaccessrule.

Returns:
the list of obligations of this targetaccessrule.
Since:
0.3.0

removeActiveTarget

public void removeActiveTarget(org.openpermis.policy.bean.TargetBean activeTarget)
Removes the active target in the whole policy.

Since:
0.1.0

removeActiveObligation

public void removeActiveObligation(org.openpermis.policy.bean.ObligationBean activeObligation)
Removes the active obligation in the whole policy.

Since:
0.3.0

addTarget

public void addTarget(EditPartCommand<org.openpermis.policy.bean.TargetBean> editPartCommand)
Since:
0.1.0

addObligation

public void addObligation(EditPartCommand<org.openpermis.policy.bean.ObligationBean> editPartCommand)
Since:
0.3.0

updateTargets

public void updateTargets()
Handler for changes in the targets of a targetaccessrule bean.

Since:
0.1.0

updateObligations

public void updateObligations()
Handler for changes in the obligations of a targetaccessrule bean.

Since:
0.3.0

updateRoles

public void updateRoles()
Handler for changes in the roles of a targetaccessrule bean.

Since:
0.1.0

updateCondition

public void updateCondition()
Handler for changes in the condition of a targetaccessrule bean.

Since:
0.1.0


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