org.openpermis.editor.policy.presenter
Class DecisionPresenter

java.lang.Object
  extended by org.openpermis.editor.policy.presenter.Presenter<M>
      extended by org.openpermis.editor.policy.presenter.PartPresenter<org.openpermis.policy.bean.PolicyBean>
          extended by org.openpermis.editor.policy.presenter.DecisionPresenter
All Implemented Interfaces:
org.openpermis.policy.Identifiable, org.openpermis.Subject

public class DecisionPresenter
extends PartPresenter<org.openpermis.policy.bean.PolicyBean>
implements org.openpermis.Subject

Presentation model for the decision test view.

Since:
0.3.0

Constructor Summary
DecisionPresenter(org.openpermis.policy.bean.PolicyBean policy, PolicyContext context)
          Creates a new presenter.
 
Method Summary
 org.openpermis.policy.bean.ActionBean getAction()
          Gets the currently selected action.
 Set<org.openpermis.policy.Role> getAssignedRoles(org.openpermis.policy.TimeStamp timeStamp, Set<org.openpermis.policy.Role> roles)
           
 org.openpermis.policy.Authority getAuthority()
          Gets the currently selected authority.
 Color getDecisionColor()
          Gets the current decision as a colour value.
 String getDecisionText()
          Gets the current decision in text form.
 org.openpermis.policy.TimeStamp getEvaluationTimeStamp()
          Gets the current evaluation time for the decision tester.
 URI getIdentity()
           
 Set<org.openpermis.Subject> getIssuersOf(org.openpermis.policy.Role role)
           
 org.openpermis.editor.policy.presenter.DecisionPresenter.ParameterTableModel getParameterTableModel()
           
 org.openpermis.policy.Domain getResourceDomain()
          Gets the currently selected resource domain.
 org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.Role> getSelectedRoles()
          Gets the list where selected roles get stored.
 org.openpermis.basic.TimePeriod getValidityOf(org.openpermis.policy.Role role, org.openpermis.Subject issuer)
           
 boolean identityMandatory()
           
 void policyChanged()
           
 void setAction(org.openpermis.policy.bean.ActionBean action)
          Selects an action.
 void setAuthority(org.openpermis.policy.Authority authority)
          Sets the selected authority.
 void setEvaluationTimeStamp(org.openpermis.policy.TimeStamp timeStamp)
          Selects an evaluation time for the decision tester.
 void setResourceDomain(org.openpermis.policy.Domain domain)
          Selects a resource domain.
 
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
 

Constructor Detail

DecisionPresenter

public DecisionPresenter(org.openpermis.policy.bean.PolicyBean policy,
                         PolicyContext context)
Creates a new presenter.

Parameters:
policy - the policy whose access rules will be available for testing.
context - editor meta data for the policy.
Since:
0.3.0
Method Detail

getAuthority

public org.openpermis.policy.Authority getAuthority()
Gets the currently selected authority.

Returns:
the selected authority.
Since:
0.3.0

setAuthority

public void setAuthority(org.openpermis.policy.Authority authority)
Sets the selected authority.

Parameters:
authority - the selected authority.
Since:
0.3.0

getResourceDomain

public org.openpermis.policy.Domain getResourceDomain()
Gets the currently selected resource domain.

Returns:
the selected resource domain.
Since:
0.3.0

setResourceDomain

public void setResourceDomain(org.openpermis.policy.Domain domain)
Selects a resource domain.

Parameters:
domain - the selected resource domain.
Since:
0.3.0

getAction

public org.openpermis.policy.bean.ActionBean getAction()
Gets the currently selected action.

Returns:
the selected action.
Since:
0.3.0

setAction

public void setAction(org.openpermis.policy.bean.ActionBean action)
Selects an action.

Parameters:
action - the selected action.
Since:
0.3.0

getSelectedRoles

public org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.Role> getSelectedRoles()
Gets the list where selected roles get stored.

Returns:
the list of selected roles for which access decisions are evaluated.
Since:
0.3.0

getEvaluationTimeStamp

public org.openpermis.policy.TimeStamp getEvaluationTimeStamp()
Gets the current evaluation time for the decision tester.

Returns:
the evaluation time for the decision.
Since:
0.3.0

setEvaluationTimeStamp

public void setEvaluationTimeStamp(org.openpermis.policy.TimeStamp timeStamp)
Selects an evaluation time for the decision tester.

Parameters:
timeStamp - an evaluation time.
Since:
0.3.0

getDecisionText

public String getDecisionText()
Gets the current decision in text form.

Returns:
the decision for the current configuration.
Since:
0.3.0

getDecisionColor

public Color getDecisionColor()
Gets the current decision as a colour value.

Returns:
a colour value.
Since:
0.3.0

getParameterTableModel

public org.openpermis.editor.policy.presenter.DecisionPresenter.ParameterTableModel getParameterTableModel()
Since:
0.3.0

policyChanged

public void policyChanged()
Since:
0.3.0

getAssignedRoles

public Set<org.openpermis.policy.Role> getAssignedRoles(org.openpermis.policy.TimeStamp timeStamp,
                                                        Set<org.openpermis.policy.Role> roles)
Specified by:
getAssignedRoles in interface org.openpermis.Subject
Since:
0.3.0

getIssuersOf

public Set<org.openpermis.Subject> getIssuersOf(org.openpermis.policy.Role role)
Specified by:
getIssuersOf in interface org.openpermis.Subject
Since:
0.3.0

getValidityOf

public org.openpermis.basic.TimePeriod getValidityOf(org.openpermis.policy.Role role,
                                                     org.openpermis.Subject issuer)
Specified by:
getValidityOf in interface org.openpermis.Subject
Since:
0.3.0

getIdentity

public URI getIdentity()
Specified by:
getIdentity in interface org.openpermis.policy.Identifiable
Since:
0.3.0

identityMandatory

public boolean identityMandatory()
Since:
0.3.0


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